浏览代码

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>
Starikovskiy, Alexey Y 18 年之前
父节点
当前提交
df6fd31995
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      arch/i386/kernel/acpi/boot.c
  2. 1 1
      arch/ia64/kernel/acpi.c

+ 1 - 1
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: "
 

+ 1 - 1
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: "