mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-16 10:20:30 +00:00
Verify the MADT checksum before using the table.
Submitted by: njl
This commit is contained in:
parent
42249c7f31
commit
73b2b50372
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=128790
@ -27,6 +27,7 @@
|
||||
*/
|
||||
|
||||
#include "acpi.h"
|
||||
#include <contrib/dev/acpica/actables.h>
|
||||
|
||||
#include <machine/md_var.h>
|
||||
|
||||
@ -136,7 +137,8 @@ ia64_probe_sapics(void)
|
||||
table->Signature[0], table->Signature[1],
|
||||
table->Signature[2], table->Signature[3], table);
|
||||
|
||||
if (strncmp(table->Signature, APIC_SIG, 4) != 0)
|
||||
if (strncmp(table->Signature, APIC_SIG, 4) != 0 ||
|
||||
ACPI_FAILURE(AcpiTbVerifyTableChecksum((void *)table)))
|
||||
continue;
|
||||
|
||||
/* Save the address of the processor interrupt block. */
|
||||
@ -219,7 +221,8 @@ ia64_count_cpus(void)
|
||||
table = (MULTIPLE_APIC_TABLE *)
|
||||
IA64_PHYS_TO_RR7(xsdt->TableOffsetEntry[t]);
|
||||
|
||||
if (strncmp(table->Signature, APIC_SIG, 4) != 0)
|
||||
if (strncmp(table->Signature, APIC_SIG, 4) != 0 ||
|
||||
ACPI_FAILURE(AcpiTbVerifyTableChecksum((void *)table)))
|
||||
continue;
|
||||
|
||||
end = (char *)table + table->Length;
|
||||
|
Loading…
Reference in New Issue
Block a user