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, 28 Jul 2009 08:58:10 +0900
From:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To:	David Rientjes <rientjes@...gle.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Lee Schermerhorn <lee.schermerhorn@...com>,
	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
	miaox@...fujitsu.com, Ingo Molnar <mingo@...e.hu>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Christoph Lameter <cl@...ux-foundation.org>,
	Paul Menage <menage@...gle.com>,
	Nick Piggin <nickpiggin@...oo.com.au>, y-goto@...fujitsu.com,
	Pekka Enberg <penberg@...helsinki.fi>, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org
Subject: Re: [BUG] set_mempolicy(MPOL_INTERLEAV) cause kernel panic

On Mon, 27 Jul 2009 10:55:47 -0700 (PDT)
David Rientjes <rientjes@...gle.com> wrote:

> On Sat, 25 Jul 2009, KAMEZAWA Hiroyuki wrote:
> 
> > _Direct_ use of task->mems_allowed is only in cpuset and mempolicy.
> > If no policy is used, it's not checked.
> > (See alloc_pages_current())
> > 
> > memory hotplug's notifier just updates top_cpuset's mems_allowed.
> > But it doesn't update each task's ones.
> 
> That's not true, cpuset_track_online_nodes() will call 
> scan_for_empty_cpusets() on top_cpuset, which works from the root to 
> leaves updating each cpuset's mems_allowed by intersecting it with 
> node_states[N_HIGH_MEMORY].  This is done as part of the MEM_OFFLINE 
> callback in the cpuset code, so N_HIGH_MEMORY represents the nodes still 
> online.
> 
yes.

> The nodemask for each task is updated to reflect the removal of a node and 
> it calls mpol_rebind_mm() with the new nodemask.
> 
yes, but _not_ updated at online.

> This is admittedly pretty late to be removing mems from cpusets (and 
> mempolicies) when the unplug has already happened.  We should look at 
> doing the rebind for MEM_GOING_OFFLINE.
> 
Hm.

What I felt at reading cpuset/mempolicy again is that it's too complex ;)
The 1st question is why mems_allowed which can be 1024bytes when max_node=4096
is copied per tasks....
And mempolicy code uses too much nodemask_t on stack.

I'll try some, today, including this bug-fix.

Thanks,
-Kame






--
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