lkml.org 
[lkml]   [2012]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.



\
 
 \ /
  Last update: 2012-02-27 17:47    [W:0.078 / U:2.572 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site