From: Christoph Lameter <clameter@sgi.com>
To: akpm@osdl.org
Cc: Michael Kerrisk <mtk-manpages@gmx.net>,
ak@suse.de, linux-mm@kvack.org, michael.kerrisk@gmx.net
Subject: Re: Inconsistent capabilites associated with MPOL_MOVE_ALL
Date: Tue, 14 Mar 2006 16:33:29 -0800 (PST) [thread overview]
Message-ID: <Pine.LNX.4.64.0603141632210.23051@schroedinger.engr.sgi.com> (raw)
In-Reply-To: <23583.1142382327@www015.gmx.net>
On Wed, 15 Mar 2006, Michael Kerrisk wrote:
> It seems to me that setting scheduling policy and
> priorities is also the kind of thing that might be performed
> in apps that also use the NUMA API, so it would seem consistent
> to use CAP_SYS_NICE for NUMA also.
Use CAP_SYS_NICE for controlling migration permissions.
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Index: linux-2.6.16-rc6/mm/mempolicy.c
===================================================================
--- linux-2.6.16-rc6.orig/mm/mempolicy.c 2006-03-11 14:12:55.000000000 -0800
+++ linux-2.6.16-rc6/mm/mempolicy.c 2006-03-14 16:31:15.000000000 -0800
@@ -748,7 +748,7 @@ long do_mbind(unsigned long start, unsig
MPOL_MF_MOVE | MPOL_MF_MOVE_ALL))
|| mode > MPOL_MAX)
return -EINVAL;
- if ((flags & MPOL_MF_MOVE_ALL) && !capable(CAP_SYS_RESOURCE))
+ if ((flags & MPOL_MF_MOVE_ALL) && !capable(CAP_SYS_NICE))
return -EPERM;
if (start & ~PAGE_MASK)
@@ -942,20 +942,20 @@ asmlinkage long sys_migrate_pages(pid_t
*/
if ((current->euid != task->suid) && (current->euid != task->uid) &&
(current->uid != task->suid) && (current->uid != task->uid) &&
- !capable(CAP_SYS_ADMIN)) {
+ !capable(CAP_SYS_NICE)) {
err = -EPERM;
goto out;
}
task_nodes = cpuset_mems_allowed(task);
/* Is the user allowed to access the target nodes? */
- if (!nodes_subset(new, task_nodes) && !capable(CAP_SYS_ADMIN)) {
+ if (!nodes_subset(new, task_nodes) && !capable(CAP_SYS_NICE)) {
err = -EPERM;
goto out;
}
err = do_migrate_pages(mm, &old, &new,
- capable(CAP_SYS_ADMIN) ? MPOL_MF_MOVE_ALL : MPOL_MF_MOVE);
+ capable(CAP_SYS_NICE) ? MPOL_MF_MOVE_ALL : MPOL_MF_MOVE);
out:
mmput(mm);
return err;
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2006-03-15 0:33 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-03 16:58 numa_maps update Christoph Lameter
2006-03-04 9:07 ` Andrew Morton
2006-03-04 4:59 ` Andi Kleen
2006-03-04 20:08 ` Christoph Lameter
2006-03-04 20:26 ` Andrew Morton
2006-03-06 16:19 ` Christoph Lameter
2006-03-06 17:37 ` Christoph Lameter
2006-03-15 0:01 ` Inconsistent capabilites associated with MPOL_MOVE_ALL Michael Kerrisk
2006-03-15 0:09 ` Christoph Lameter
2006-03-15 0:25 ` Michael Kerrisk
2006-03-15 0:33 ` Christoph Lameter [this message]
2006-03-15 0:40 ` Michael Kerrisk
2006-03-15 0:41 ` Andrew Morton
2006-03-15 0:53 ` Christoph Lameter
2006-03-15 1:01 ` Andrew Morton
2006-03-15 1:07 ` Michael Kerrisk
2006-03-15 1:12 ` Michael Kerrisk
2006-03-15 1:16 ` Christoph Lameter
2006-03-15 1:08 ` Christoph Lameter
2006-03-15 0:59 ` Michael Kerrisk
2006-03-15 1:16 ` Andrew Morton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.0603141632210.23051@schroedinger.engr.sgi.com \
--to=clameter@sgi.com \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=linux-mm@kvack.org \
--cc=michael.kerrisk@gmx.net \
--cc=mtk-manpages@gmx.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox