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:   Thu, 6 Apr 2017 20:01:13 +0200
From:   Borislav Petkov <bp@...en8.de>
To:     "Kirill A. Shutemov" <kirill@...temov.name>
Cc:     Wei Yang <richard.weiyang@...il.com>, tglx@...utronix.de,
        mingo@...hat.com, hpa@...or.com, tj@...nel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [Patch V2 2/2] x86/mm/numa: remove the
 numa_nodemask_from_meminfo()

On Thu, Apr 06, 2017 at 06:42:16PM +0300, Kirill A. Shutemov wrote:
> Config is attached.

Thanks!

> Looks like fake numa is the key.

...

> NUMA: Warning: node ids are out of bound, from=0 to=1 distance=20                                                                                                                                                                                                                                               [    0.000000] numa_register_memblks: numa_nodes_parsed: 0
> numa_register_memblks: nid: 0
> numa_register_memblks: nid: 1
> numa_register_memblks: nid: 2
> numa_register_memblks: nid: 3

Yeah, the fake numa thing calls emu_setup_memblk() and that doesn't
set numa_nodes_parsed to the number of fake numa nodes. And since with
that "cleanup" which opened more work than it saved (btw, this is the
last time I'm looking at crap like that) we got rid of the "enlarging"
of the node mask to the actual nodes count and *that* blows up with
numa_nodes_parsed having only node 0 in there.

Long story short, something as trivial as this helps here:

---
diff --git a/arch/x86/mm/numa_emulation.c b/arch/x86/mm/numa_emulation.c
index a8f90ce3dedf..60d82b8baaa3 100644
--- a/arch/x86/mm/numa_emulation.c
+++ b/arch/x86/mm/numa_emulation.c
@@ -70,6 +70,9 @@ static int __init emu_setup_memblk(struct numa_meminfo *ei,
 
 	printk(KERN_INFO "Faking node %d at [mem %#018Lx-%#018Lx] (%LuMB)\n",
 	       nid, eb->start, eb->end - 1, (eb->end - eb->start) >> 20);
+
+	node_set(nid, numa_nodes_parsed);
+
 	return 0;
 }
 
-- 
Regards/Gruss,
    Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ