Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ACPI: relax BAD_MADT_ENTRY check to allow LSAPIC variable length string UIDs

ACPI 3.0 appended a variable length UID string to the LAPIC structure
as part of support for > 256 processors. So the BAD_MADT_ENTRY() sanity
check can no longer compare for equality with a fixed structure length.

Signed-off-by: Alexey Y Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>

authored by

Starikovskiy, Alexey Y and committed by
Len Brown
df6fd319 d68909f4

+2 -2
+1 -1
arch/i386/kernel/acpi/boot.c
··· 59 59 60 60 #define BAD_MADT_ENTRY(entry, end) ( \ 61 61 (!entry) || (unsigned long)entry + sizeof(*entry) > end || \ 62 - ((acpi_table_entry_header *)entry)->length != sizeof(*entry)) 62 + ((acpi_table_entry_header *)entry)->length < sizeof(*entry)) 63 63 64 64 #define PREFIX "ACPI: " 65 65
+1 -1
arch/ia64/kernel/acpi.c
··· 55 55 56 56 #define BAD_MADT_ENTRY(entry, end) ( \ 57 57 (!entry) || (unsigned long)entry + sizeof(*entry) > end || \ 58 - ((acpi_table_entry_header *)entry)->length != sizeof(*entry)) 58 + ((acpi_table_entry_header *)entry)->length < sizeof(*entry)) 59 59 60 60 #define PREFIX "ACPI: " 61 61