diff options
author | Paul Mundt <lethal@linux-sh.org> | 2008-07-30 02:30:52 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2008-08-01 15:39:32 -0400 |
commit | c4637d475170ca0d99973efd07df727012db6cd1 (patch) | |
tree | 8d2f6581dfaf0ea148753845513fff3dd53ce13f /arch/sh/kernel | |
parent | cec3fd3e2a7cacf37e2bd6d9fa915337245cc563 (diff) |
sh: seccomp support.
This hooks up the seccomp thread flag and associated callback from the
syscall tracer.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel')
-rw-r--r-- | arch/sh/kernel/ptrace_32.c | 3 | ||||
-rw-r--r-- | arch/sh/kernel/ptrace_64.c | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/arch/sh/kernel/ptrace_32.c b/arch/sh/kernel/ptrace_32.c index 2bc72def5cf8..e9bd4b2aa9c2 100644 --- a/arch/sh/kernel/ptrace_32.c +++ b/arch/sh/kernel/ptrace_32.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/signal.h> | 20 | #include <linux/signal.h> |
21 | #include <linux/io.h> | 21 | #include <linux/io.h> |
22 | #include <linux/audit.h> | 22 | #include <linux/audit.h> |
23 | #include <linux/seccomp.h> | ||
23 | #include <asm/uaccess.h> | 24 | #include <asm/uaccess.h> |
24 | #include <asm/pgtable.h> | 25 | #include <asm/pgtable.h> |
25 | #include <asm/system.h> | 26 | #include <asm/system.h> |
@@ -276,6 +277,8 @@ asmlinkage void do_syscall_trace(struct pt_regs *regs, int entryexit) | |||
276 | { | 277 | { |
277 | struct task_struct *tsk = current; | 278 | struct task_struct *tsk = current; |
278 | 279 | ||
280 | secure_computing(regs->regs[0]); | ||
281 | |||
279 | if (unlikely(current->audit_context) && entryexit) | 282 | if (unlikely(current->audit_context) && entryexit) |
280 | audit_syscall_exit(AUDITSC_RESULT(regs->regs[0]), | 283 | audit_syscall_exit(AUDITSC_RESULT(regs->regs[0]), |
281 | regs->regs[0]); | 284 | regs->regs[0]); |
diff --git a/arch/sh/kernel/ptrace_64.c b/arch/sh/kernel/ptrace_64.c index d453c47dc522..7d8776260953 100644 --- a/arch/sh/kernel/ptrace_64.c +++ b/arch/sh/kernel/ptrace_64.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/signal.h> | 27 | #include <linux/signal.h> |
28 | #include <linux/syscalls.h> | 28 | #include <linux/syscalls.h> |
29 | #include <linux/audit.h> | 29 | #include <linux/audit.h> |
30 | #include <linux/seccomp.h> | ||
30 | #include <asm/io.h> | 31 | #include <asm/io.h> |
31 | #include <asm/uaccess.h> | 32 | #include <asm/uaccess.h> |
32 | #include <asm/pgtable.h> | 33 | #include <asm/pgtable.h> |
@@ -277,6 +278,8 @@ asmlinkage void syscall_trace(struct pt_regs *regs, int entryexit) | |||
277 | { | 278 | { |
278 | struct task_struct *tsk = current; | 279 | struct task_struct *tsk = current; |
279 | 280 | ||
281 | secure_computing(regs->regs[9]); | ||
282 | |||
280 | if (unlikely(current->audit_context) && entryexit) | 283 | if (unlikely(current->audit_context) && entryexit) |
281 | audit_syscall_exit(AUDITSC_RESULT(regs->regs[9]), | 284 | audit_syscall_exit(AUDITSC_RESULT(regs->regs[9]), |
282 | regs->regs[9]); | 285 | regs->regs[9]); |