From: Starikovskiy, Alexey Y Date: Fri, 18 Aug 2006 15:23:00 +0000 (-0400) Subject: ACPI: relax BAD_MADT_ENTRY check to allow LSAPIC variable length string UIDs X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=df6fd31995cb2e38b2a7e94bc8f1559b8f55404e;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Len Brown --- diff --git a/arch/i386/kernel/acpi/boot.c b/arch/i386/kernel/acpi/boot.c index 0db6387025ca..ee003bc0e8b1 100644 --- a/arch/i386/kernel/acpi/boot.c +++ b/arch/i386/kernel/acpi/boot.c @@ -59,7 +59,7 @@ static inline int gsi_irq_sharing(int gsi) { return gsi; } #define BAD_MADT_ENTRY(entry, end) ( \ (!entry) || (unsigned long)entry + sizeof(*entry) > end || \ - ((acpi_table_entry_header *)entry)->length != sizeof(*entry)) + ((acpi_table_entry_header *)entry)->length < sizeof(*entry)) #define PREFIX "ACPI: " diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c index 99761b81db44..0176556aeecc 100644 --- a/arch/ia64/kernel/acpi.c +++ b/arch/ia64/kernel/acpi.c @@ -55,7 +55,7 @@ #define BAD_MADT_ENTRY(entry, end) ( \ (!entry) || (unsigned long)entry + sizeof(*entry) > end || \ - ((acpi_table_entry_header *)entry)->length != sizeof(*entry)) + ((acpi_table_entry_header *)entry)->length < sizeof(*entry)) #define PREFIX "ACPI: "