Skip to content

Commit df6fd31

Browse files
Starikovskiy, Alexey Ylenb
authored andcommitted
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>
1 parent d68909f commit df6fd31

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎arch/i386/kernel/acpi/boot.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ static inline int gsi_irq_sharing(int gsi) { return gsi; }
5959

6060
#define BAD_MADT_ENTRY(entry, end) ( \
6161
(!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))
6363

6464
#define PREFIX "ACPI: "
6565

‎arch/ia64/kernel/acpi.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555

5656
#define BAD_MADT_ENTRY(entry, end) ( \
5757
(!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))
5959

6060
#define PREFIX "ACPI: "
6161

0 commit comments

Comments
 (0)