lkml.org 
[lkml]   [2005]   [Nov]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH 5/5] Swap Migration V5: sys_migrate_pages interface
On Mon, 31 Oct 2005, Andrew Morton wrote:

> Christoph Lameter <clameter@sgi.com> wrote:
> > + * Permissions check like for signals.
> > + * See check_kill_permission()
> Obscure. Can you please explain the thinking behind putting this check in
> here? Preferably via a comment...
>

Index: linux-2.6.14-rc5-mm1/mm/mempolicy.c
===================================================================
--- linux-2.6.14-rc5-mm1.orig/mm/mempolicy.c 2005-11-01 09:32:46.000000000 -0800
+++ linux-2.6.14-rc5-mm1/mm/mempolicy.c 2005-11-01 09:38:46.000000000 -0800
@@ -790,8 +790,15 @@ asmlinkage long sys_migrate_pages(pid_t
return -EINVAL;

/*
- * Permissions check like for signals.
- * See check_kill_permission()
+ * We only allow a process to move the pages of another
+ * if the process issuing sys_migrate has the right to send a kill
+ * signal to the process to be moved. Moving another processes
+ * memory may impact the performance of that process. If the
+ * process issuing sys_migrate_pages has the right to kill the
+ * target process then obviously that process has the right to
+ * impact the performance of the target process.
+ *
+ * The permission check was taken from check_kill_permission()
*/
if ((current->euid ^ task->suid) && (current->euid ^ task->uid) &&
(current->uid ^ task->suid) && (current->uid ^ task->uid) &&
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-11-01 18:44    [W:0.238 / U:0.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site