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
| ||
|
Date: Wed, 28 Jan 2015 09:03:06 -0600 (CST) From: Christoph Lameter <cl@...ux.com> To: Michal Hocko <mhocko@...e.cz> cc: Johannes Weiner <hannes@...xchg.org>, Guenter Roeck <linux@...ck-us.net>, akpm@...ux-foundation.org, mm-commits@...r.kernel.org, linux-kernel@...r.kernel.org, linux-mm@...ck.org, linux-fsdevel@...r.kernel.org, linux-next@...r.kernel.org, Stephen Rothwell <sfr@...b.auug.org.au> Subject: Re: mmotm 2015-01-22-15-04: qemu failure due to 'mm: memcontrol: remove unnecessary soft limit tree node test' On Tue, 27 Jan 2015, Michal Hocko wrote: > Admittedly, I was checking only SLAB allocator when reviewing and > assuming SLUB would behave in the same way :/ > But maybe I have misinterpreted the slab code as well and > get_node(struct kmem_cache *, int node) returns non-NULL for !online > nodes. Oh. Just allocate from node 12345 in SLAB and you will also have a strange failure. > I have briefly checked the code and it seems that many users are aware > of this and use the same construct Johannes used in the end or they use > cpu_to_node. But then there are other users doing: > net/openvswitch/flow_table.c: > /* Initialize the default stat node. */ > stats = kmem_cache_alloc_node(flow_stats_cache, > GFP_KERNEL | __GFP_ZERO, 0); > > and this can blow up if Node0 is not online. I haven't checked other Node 0 is special in many architectures and is guaranteed to exist. PowerPC is a notable exception which causes frequent issues with NUMA changes. > That being said I have no problem with checking node_online in the memcg > code which was reported to blow up here. I am just thinking whether it > is safe to simply blow up like that. Node numbers must be legitimate in order to be used. Same thing with processor numbers. We cannot always check if they are online. The numbers in use must be sane. We have notifier subsystems that do callbacks to allow subsystems to add and remove new nodes and processors. Those should be used to ensure that only legitimate node and processor numbers are used. -- 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