>>> On 26.02.16 at 07:22, <zhaoshengl...@huawei.com> wrote: > --- a/xen/include/xen/acpi.h > +++ b/xen/include/xen/acpi.h > @@ -39,6 +39,10 @@ > #define ACPI_MADT_GET_POLARITY(inti) ACPI_MADT_GET_(POLARITY, inti) > #define ACPI_MADT_GET_TRIGGER(inti) ACPI_MADT_GET_(TRIGGER, inti) > > +#define BAD_MADT_ENTRY(entry, end) ( \ > + (!(entry)) || (unsigned long)(entry) + sizeof(*(entry)) > > (end) || \ > + ((struct acpi_subtable_header *)(entry))->length < > sizeof(*(entry)))
Would it be too much to ask for you to eliminate the bogus cast here, in favor of properly using (entry)->header.length? Afaics this should be fine for all users of the macro. Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel