diff options
| author | David Quigley <[email protected]> | 2006-06-23 09:04:01 +0000 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2006-06-23 14:42:54 +0000 |
| commit | 35601547baf92d984b6e59cf3583649da04baea5 (patch) | |
| tree | a392501e6e004ed33789dbf3f7a9fe43295439e1 /security/selinux/hooks.c | |
| parent | [PATCH] SELinux: add security hook call to mediate attach_task (kernel/cpuset.c) (diff) | |
| download | kernel-35601547baf92d984b6e59cf3583649da04baea5.tar.gz kernel-35601547baf92d984b6e59cf3583649da04baea5.zip | |
[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 <[email protected]>
Acked-by: Stephen Smalley <[email protected]>
Signed-off-by: James Morris <[email protected]>
Cc: Christoph Lameter <[email protected]>
Cc: Andi Kleen <[email protected]>
Acked-by: Chris Wright <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'security/selinux/hooks.c')
| -rw-r--r-- | security/selinux/hooks.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 9dcf298921d4..79c16e31c884 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c @@ -2679,6 +2679,11 @@ static int selinux_task_getscheduler(struct task_struct *p) return task_has_perm(current, p, PROCESS__GETSCHED); } +static int selinux_task_movememory(struct task_struct *p) +{ + return task_has_perm(current, p, PROCESS__SETSCHED); +} + static int selinux_task_kill(struct task_struct *p, struct siginfo *info, int sig) { u32 perm; @@ -4392,6 +4397,7 @@ static struct security_operations selinux_ops = { .task_setrlimit = selinux_task_setrlimit, .task_setscheduler = selinux_task_setscheduler, .task_getscheduler = selinux_task_getscheduler, + .task_movememory = selinux_task_movememory, .task_kill = selinux_task_kill, .task_wait = selinux_task_wait, .task_prctl = selinux_task_prctl, |
