lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 23 May 2012 10:46:09 +0800
From:	ethan zhao <ethan.kernel@...il.com>
To:	linux-kernel@...r.kernel.org
Cc:	Kurt Garloff <kurt@...loff.de>, Len Brown <len.brown@...el.com>
Subject: ACPI and NUMA guys, please help to check if this patch is OK

[PATCH] drivers/acpi/numa.c: Add localities checking code against
proximity domains to slit_valid()

 Some buggy BIOS/ACPI will set different number to SLIT localities and
SRAT proximity domains,
 That will make NUMA configuration invalid and kernel will output
information like following

NUMA:Warning:invalid distance parameter, from=-1 to=-1 distance=83

This patch adds some checking code to slit_valid() function in order
to check theSLIT localities
count against SRAT proximity domains number and give clear information
about ACPI bug.

Signed-off-by: ethan.zhao <ethan.kernel@...il.com>
---
 drivers/acpi/numa.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c
index e56f3be..55c8a8e 100644
--- a/drivers/acpi/numa.c
+++ b/drivers/acpi/numa.c
@@ -161,6 +161,13 @@ static __init int slit_valid(struct acpi_table_slit *slit)
 {
        int i, j;
        int d = slit->locality_count;
+       int pxd = nodes_weight(nodes_found_map);
+       if (pxd != d) {
+               printk(KERN_INFO "ACPI: BIOS bug! SLIT localities
count %d doesn't equal SRAT proximity domains number %d\n",
+                       d , pxd);
+               return 0;
+       }
+
        for (i = 0; i < d; i++) {
                for (j = 0; j < d; j++)  {
                        u8 val = slit->entry[d*i + j];
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ