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/include | |
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/include')
-rw-r--r-- | arch/sh/include/asm/seccomp.h | 10 | ||||
-rw-r--r-- | arch/sh/include/asm/thread_info.h | 6 |
2 files changed, 14 insertions, 2 deletions
diff --git a/arch/sh/include/asm/seccomp.h b/arch/sh/include/asm/seccomp.h new file mode 100644 index 000000000000..3280ed3802ef --- /dev/null +++ b/arch/sh/include/asm/seccomp.h | |||
@@ -0,0 +1,10 @@ | |||
1 | #ifndef __ASM_SECCOMP_H | ||
2 | |||
3 | #include <linux/unistd.h> | ||
4 | |||
5 | #define __NR_seccomp_read __NR_read | ||
6 | #define __NR_seccomp_write __NR_write | ||
7 | #define __NR_seccomp_exit __NR_exit | ||
8 | #define __NR_seccomp_sigreturn __NR_rt_sigreturn | ||
9 | |||
10 | #endif /* __ASM_SECCOMP_H */ | ||
diff --git a/arch/sh/include/asm/thread_info.h b/arch/sh/include/asm/thread_info.h index c05b1afd1324..03d1e386670c 100644 --- a/arch/sh/include/asm/thread_info.h +++ b/arch/sh/include/asm/thread_info.h | |||
@@ -117,7 +117,8 @@ static inline struct thread_info *current_thread_info(void) | |||
117 | #define TIF_NEED_RESCHED 2 /* rescheduling necessary */ | 117 | #define TIF_NEED_RESCHED 2 /* rescheduling necessary */ |
118 | #define TIF_RESTORE_SIGMASK 3 /* restore signal mask in do_signal() */ | 118 | #define TIF_RESTORE_SIGMASK 3 /* restore signal mask in do_signal() */ |
119 | #define TIF_SINGLESTEP 4 /* singlestepping active */ | 119 | #define TIF_SINGLESTEP 4 /* singlestepping active */ |
120 | #define TIF_SYSCALL_AUDIT 5 | 120 | #define TIF_SYSCALL_AUDIT 5 /* syscall auditing active */ |
121 | #define TIF_SECCOMP 6 /* secure computing */ | ||
121 | #define TIF_USEDFPU 16 /* FPU was used by this task this quantum (SMP) */ | 122 | #define TIF_USEDFPU 16 /* FPU was used by this task this quantum (SMP) */ |
122 | #define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling TIF_NEED_RESCHED */ | 123 | #define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling TIF_NEED_RESCHED */ |
123 | #define TIF_MEMDIE 18 | 124 | #define TIF_MEMDIE 18 |
@@ -129,6 +130,7 @@ static inline struct thread_info *current_thread_info(void) | |||
129 | #define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK) | 130 | #define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK) |
130 | #define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP) | 131 | #define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP) |
131 | #define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) | 132 | #define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) |
133 | #define _TIF_SECCOMP (1 << TIF_SECCOMP) | ||
132 | #define _TIF_USEDFPU (1 << TIF_USEDFPU) | 134 | #define _TIF_USEDFPU (1 << TIF_USEDFPU) |
133 | #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) | 135 | #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) |
134 | #define _TIF_FREEZE (1 << TIF_FREEZE) | 136 | #define _TIF_FREEZE (1 << TIF_FREEZE) |
@@ -141,7 +143,7 @@ static inline struct thread_info *current_thread_info(void) | |||
141 | 143 | ||
142 | /* work to do in syscall trace */ | 144 | /* work to do in syscall trace */ |
143 | #define _TIF_WORK_SYSCALL_MASK (_TIF_SYSCALL_TRACE | _TIF_SINGLESTEP | \ | 145 | #define _TIF_WORK_SYSCALL_MASK (_TIF_SYSCALL_TRACE | _TIF_SINGLESTEP | \ |
144 | _TIF_SYSCALL_AUDIT) | 146 | _TIF_SYSCALL_AUDIT | _TIF_SECCOMP) |
145 | 147 | ||
146 | /* work to do on any return to u-space */ | 148 | /* work to do on any return to u-space */ |
147 | #define _TIF_ALLWORK_MASK (_TIF_SYSCALL_TRACE | _TIF_SIGPENDING | \ | 149 | #define _TIF_ALLWORK_MASK (_TIF_SYSCALL_TRACE | _TIF_SIGPENDING | \ |