[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.1202271039320.29787@router.home>
Date: Mon, 27 Feb 2012 10:43:47 -0600 (CST)
From: Christoph Lameter <cl@...ux.com>
To: "Eric W. Biederman" <ebiederm@...ssion.com>
cc: Dave Hansen <dave@...ux.vnet.ibm.com>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [RFC][PATCH] fix move/migrate_pages() race on task struct
On Fri, 24 Feb 2012, Eric W. Biederman wrote:
> Taking a quick look it does appear that in cpuset_mems_allowed and it's
> cousins we never sleep under "callback_mutex" so that lock looks like it
> could become a spinlock.
>
> But I have to say something just bothers me about the permissions for
> modifying an mm living in the task. We can have different rules
> for modifying an mm depending on the path to tme mm?
Yes. Permissions are associated with pids which refer to tasks. Tasks have
address spaces and tasks may share address spaces.
> Especially in things like which numa nodes we can put pages in?
Things = address spaces? The page migration functionality is about moving
the location of physical memory from one numa node to the other. It does
not affect the execution just the latencies experienced by the processes.
> So by specifying a different pid to access them mm through the call can
> either work or succeed? Are these checks really sane?
Yes if you can create two pids with the same address space and give
those those pids to different owners then the permission checks on one
may fail and succeed on the other. We have no way to refer to address
spaces from user space outside of a pid.
--
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