[PATCH] SELinux: add task_movememory hook
This patch adds new security hook, task_movememory, to be called when memory owened by a task is to be moved (e.g. when migrating pages to a this hook is identical to the setscheduler implementation, but a separate hook introduced to allow this check to be specialized in the future if necessary. Since the last posting, the hook has been renamed following feedback from Christoph Lameter. Signed-off-by: David Quigley <dpquigl@tycho.nsa.gov> Acked-by: Stephen Smalley <sds@tycho.nsa.gov> Signed-off-by: James Morris <jmorris@namei.org> Cc: Christoph Lameter <clameter@sgi.com> Cc: Andi Kleen <ak@muc.de> Acked-by: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:

committed by
Linus Torvalds

parent
22fb52dd73
commit
35601547ba
@@ -537,6 +537,11 @@ static int dummy_task_getscheduler (struct task_struct *p)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int dummy_task_movememory (struct task_struct *p)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int dummy_task_wait (struct task_struct *p)
|
||||
{
|
||||
return 0;
|
||||
@@ -981,6 +986,7 @@ void security_fixup_ops (struct security_operations *ops)
|
||||
set_to_dummy_if_null(ops, task_setrlimit);
|
||||
set_to_dummy_if_null(ops, task_setscheduler);
|
||||
set_to_dummy_if_null(ops, task_getscheduler);
|
||||
set_to_dummy_if_null(ops, task_movememory);
|
||||
set_to_dummy_if_null(ops, task_wait);
|
||||
set_to_dummy_if_null(ops, task_kill);
|
||||
set_to_dummy_if_null(ops, task_prctl);
|
||||
|
Reference in New Issue
Block a user