[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v12 13/36] qapi: Hoist tag collision check to Va
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH v12 13/36] qapi: Hoist tag collision check to Variants.check() |
Date: |
Wed, 18 Nov 2015 11:08:58 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Eric Blake <address@hidden> writes:
> *** WARNING: THE ATTACHED DOCUMENT(S) CONTAIN MACROS ***
> *** MACROS MAY CONTAIN MALICIOUS CODE ***
> *** Open only if you can verify and trust the sender ***
> *** Please contact address@hidden if you have questions or concerns **
Looks like infosec crapped over your commit message.
> Checking that a given QAPISchemaObjectTypeVariant.name is a
> member of the corresponding QAPISchemaEnumType of the owning
> QAPISchemaObjectTypeVariants.tag_member ensures that there are
> no collisions in the generated C union for those tag values
> (since the enum itself should have no collisions).
>
> However, ever since its introduction in f51d8c3d, this was the
> only additional action of of Variant.check(), beyond calling
> the superclass Member.check(). This forces a difference in
> .check() signatures, just to pass the enum type down.
>
> Simplify things by instead doing the tag name check as part of
> Variants.check(), at which point we can rely on inheritance
> instead of overriding Variant.check().
>
> Signed-off-by: Eric Blake <address@hidden>
Can bury the infosec turd on merge.
- [Qemu-devel] [PATCH v12 00/36] qapi member collision, alternate layout (post-introspection cleanups, subset D), Eric Blake, 2015/11/18
- [Qemu-devel] [PATCH v12 04/36] qapi: Drop obsolete tag value collision assertions, Eric Blake, 2015/11/18
- [Qemu-devel] [PATCH v12 05/36] qapi: Simplify QAPISchemaObjectTypeMember.check(), Eric Blake, 2015/11/18
- [Qemu-devel] [PATCH v12 10/36] qapi: Simplify QAPISchemaObjectTypeVariants.check(), Eric Blake, 2015/11/18
- [Qemu-devel] [PATCH v12 13/36] qapi: Hoist tag collision check to Variants.check(), Eric Blake, 2015/11/18
- Re: [Qemu-devel] [PATCH v12 13/36] qapi: Hoist tag collision check to Variants.check(),
Markus Armbruster <=
- [Qemu-devel] [PATCH v12 03/36] qapi-types: Simplify gen_struct_field[s], Eric Blake, 2015/11/18
- [Qemu-devel] [PATCH v12 11/36] qapi: Check for qapi collisions involving variant members, Eric Blake, 2015/11/18
- [Qemu-devel] [PATCH v12 01/36] qapi: Track simple union tag in object.local_members, Eric Blake, 2015/11/18
- [Qemu-devel] [PATCH v12 02/36] qapi-types: Consolidate gen_struct() and gen_union(), Eric Blake, 2015/11/18
- [Qemu-devel] [PATCH v12 08/36] qapi: Eliminate QAPISchemaObjectType.check() variable members, Eric Blake, 2015/11/18
- [Qemu-devel] [PATCH v12 15/36] qapi: Track owner of each object member, Eric Blake, 2015/11/18
- [Qemu-devel] [PATCH v12 25/36] qapi: Add alias for ErrorClass, Eric Blake, 2015/11/18
- [Qemu-devel] [PATCH v12 09/36] qapi: Factor out QAPISchemaObjectTypeMember.check_clash(), Eric Blake, 2015/11/18