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] [day] [month] [year] [list]
Date:	Thu, 20 Aug 2015 16:43:06 +0200
From:	Michal Hocko <mhocko@...nel.org>
To:	Vlastimil Babka <vbabka@...e.cz>
Cc:	Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org, Mel Gorman <mgorman@...e.de>,
	David Rientjes <rientjes@...gle.com>,
	Greg Thelen <gthelen@...gle.com>,
	"Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>,
	Christoph Lameter <cl@...ux.com>,
	Pekka Enberg <penberg@...nel.org>,
	Joonsoo Kim <iamjoonsoo.kim@....com>,
	Naoya Horiguchi <n-horiguchi@...jp.nec.com>,
	Johannes Weiner <hannes@...xchg.org>,
	linux-ia64@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
	cbe-oss-dev@...ts.ozlabs.org, kvm@...r.kernel.org
Subject: Re: [PATCH 2/3] mm: unify checks in alloc_pages_node() and
 __alloc_pages_node()

On Thu 20-08-15 16:14:34, Michal Hocko wrote:
> On Thu 20-08-15 13:43:21, Vlastimil Babka wrote:
> > Perform the same debug checks in alloc_pages_node() as are done in
> > __alloc_pages_node(), by making the former function a wrapper of the latter
> > one.
> > 
> > In addition to better diagnostics in DEBUG_VM builds for situations which
> > have been already fatal (e.g. out-of-bounds node id), there are two visible
> > changes for potential existing buggy callers of alloc_pages_node():
> > 
> > - calling alloc_pages_node() with any negative nid (e.g. due to arithmetic
> >   overflow) was treated as passing NUMA_NO_NODE and fallback to local node was
> >   applied. This will now be fatal.
> 
> OK, this is sensible
> 
> > - calling alloc_pages_node() with an offline node will now be checked for
> >   DEBUG_VM builds. Since it's not fatal if the node has been previously online,
> >   and this patch may expose some existing buggy callers, change the VM_BUG_ON
> >   in __alloc_pages_node() to VM_WARN_ON.
> 
> Yes, bugging on just because we race with memory hotplug or use
> stale node number is not appropriate because the fallback is
> straightforward. A warning should help to identify and fix those place.
> 
> > 
> > Signed-off-by: Vlastimil Babka <vbabka@...e.cz>
> > Acked-by: David Rientjes <rientjes@...gle.com>
> > Acked-by: Johannes Weiner <hannes@...xchg.org>
> > Acked-by: Christoph Lameter <cl@...ux.com>

Forgot to add
Acked-by: Michal Hocko <mhocko@...e.com>
-- 
Michal Hocko
SUSE Labs
--
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