diff options
author | marcel <marcel@FreeBSD.org> | 2004-05-01 04:08:14 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2004-05-01 04:08:14 +0000 |
commit | 5cc6b87ef2debed973539f2c2d93a2ae039b59c6 (patch) | |
tree | 0a2facc0ce5b916cfa36e3f59280b2cd85bafd6a /sys | |
parent | 507ac98289cc78d63e169ec6862a844b6ab135db (diff) | |
download | FreeBSD-src-5cc6b87ef2debed973539f2c2d93a2ae039b59c6.zip FreeBSD-src-5cc6b87ef2debed973539f2c2d93a2ae039b59c6.tar.gz |
Verify the MADT checksum before using the table.
Submitted by: njl
Diffstat (limited to 'sys')
-rw-r--r-- | sys/ia64/acpica/madt.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/ia64/acpica/madt.c b/sys/ia64/acpica/madt.c index b82db3e..ad1205e 100644 --- a/sys/ia64/acpica/madt.c +++ b/sys/ia64/acpica/madt.c @@ -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; |