linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Christoph Lameter <clameter@engr.sgi.com>
Cc: linux-mm@kvack.org
Subject: Re: Fix sys_migrate_pages: Move all pages when invoked from root
Date: Fri, 24 Feb 2006 17:15:01 -0800	[thread overview]
Message-ID: <20060224171501.1e19d34a.akpm@osdl.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0602241649530.24668@schroedinger.engr.sgi.com>

Christoph Lameter <clameter@engr.sgi.com> wrote:
>
> > Also, this check from a few lines earlier:
> > 
> > 	/*
> > 	 * Check if this process has the right to modify the specified
> > 	 * process. The right exists if the process has administrative
> > 	 * capabilities, superuser priviledges or the same
> > 	 * userid as the target process.
> > 	 */
> > 	if ((current->euid != task->suid) && (current->euid != task->uid) &&
> > 	    (current->uid != task->suid) && (current->uid != task->uid) &&
> > 	    !capable(CAP_SYS_ADMIN)) {
> > 		err = -EPERM;
> > 		goto out;
> > 	}
> > 
> > appears to be a) somewhat duplicative of your patch and b) a heck of a lot
> > better way of determining whether to use MF_MOVE versus MF_MOVE_ALL.
> 
> Huh? This only checks the permission for allow a process to start 
> migration another process. It does not define the scope of actions.
> 
> How could this determine if a user would be allowed to move all pages? 

You want a check which says "can this user move that user's pages".  The
current proposal is to use CAP_SYS_ADMIN, which is a bit coarse.

<looks>

Oh, it uses the mapcount rather than a permission check on vma->vm_file. 
Oh well.

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

  reply	other threads:[~2006-02-25  1:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-25  0:17 Christoph Lameter
2006-02-25  0:47 ` Andrew Morton
2006-02-25  0:57   ` Christoph Lameter
2006-02-25  1:15     ` Andrew Morton [this message]
2006-02-25  1:27       ` Christoph Lameter

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=20060224171501.1e19d34a.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=clameter@engr.sgi.com \
    --cc=linux-mm@kvack.org \
    /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