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-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 11 Jan 2011 10:36:50 -0800
From:	Tony Luck <tony.luck@...el.com>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	"H. Peter Anvin" <hpa@...or.com>, Yinghai Lu <yinghai@...nel.org>,
	linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Wu Fengguang <fengguang.wu@...el.com>,
	Bjorn Helgaas <bjorn.helgaas@...com>
Subject: Re: [GIT PULL] x86/apic changes for v2.6.38

On Thu, Jan 6, 2011 at 4:17 PM, Yinghai Lu <yinghai@...nel.org> wrote:
> Assume Tony will have another patch for IA64 to check that before
> apply this patch.

Ingo,

Ok, I sent (a slightly modified version of) this patch up to Linus
as part of the ia64 merge window pull ... so it is safe to update
drivers/acpi/numa.c with a patch that will parse all the SRAT cpu
entries down to ia64 now.

-Tony

Pasted version of commit - which gmail will munge ...


commit 05f2f274c8a8747bbfb13ac8ee0c27d5f2ad8510
Author: Tony Luck <tony.luck@...el.com>
Date:   Fri Jan 7 09:11:55 2011 -0800

    [IA64] Avoid array overflow if there are too many cpus in SRAT table

    acpi_numa_init() has to parse the whole SRAT table, even if the
    kernel wants to limit the number of cpus it will use (because the
    ones it is going to use may be described by entries at the end of
    the SRAT table).  Avoid overflowing the node_cpuid array.

    Reported-by: Yinghai Lu <yinghai@...nel.org>
    Signed-off-by: Tony Luck <tony.luck@...el.com>

diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c
index c6c90f3..7b897b7 100644
--- a/arch/ia64/kernel/acpi.c
+++ b/arch/ia64/kernel/acpi.c
@@ -477,6 +477,12 @@ acpi_numa_processor_affinity_init(struct
acpi_srat_cpu_affinity *pa)
        if (!(pa->flags & ACPI_SRAT_CPU_ENABLED))
                return;

+       if (srat_num_cpus >= ARRAY_SIZE(node_cpuid)) {
+               printk_once(KERN_WARNING
+                           "node_cpuid[%d] is too small, may not be
able to use all cpus\n",
+                           ARRAY_SIZE(node_cpuid));
+               return;
+       }
        pxm = get_processor_proximity_domain(pa);

        /* record this node in proximity bitmap */
--
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