diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2012-07-31 15:37:13 +0200 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2012-08-08 07:32:56 -0700 |
commit | c63cb468f373f479ff52b4a1b75f8ecdeaaf4f16 (patch) | |
tree | c89dce49ad36350db1eb224a130a183958f66161 /arch/s390/include | |
parent | e206d3da58803de5cd38dc728f6da5221ec18ab0 (diff) | |
download | linux-c63cb468f373f479ff52b4a1b75f8ecdeaaf4f16.tar.gz linux-c63cb468f373f479ff52b4a1b75f8ecdeaaf4f16.tar.bz2 linux-c63cb468f373f479ff52b4a1b75f8ecdeaaf4f16.zip |
s390/seccomp: add support for system call filtering using BPF
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/include')
-rw-r--r-- | arch/s390/include/asm/syscall.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/s390/include/asm/syscall.h b/arch/s390/include/asm/syscall.h index fb214dd9b7e0..fe7b99759e12 100644 --- a/arch/s390/include/asm/syscall.h +++ b/arch/s390/include/asm/syscall.h @@ -12,6 +12,7 @@ #ifndef _ASM_SYSCALL_H #define _ASM_SYSCALL_H 1 +#include <linux/audit.h> #include <linux/sched.h> #include <linux/err.h> #include <asm/ptrace.h> @@ -87,4 +88,13 @@ static inline void syscall_set_arguments(struct task_struct *task, regs->orig_gpr2 = args[0]; } +static inline int syscall_get_arch(struct task_struct *task, + struct pt_regs *regs) +{ +#ifdef CONFIG_COMPAT + if (test_tsk_thread_flag(task, TIF_31BIT)) + return AUDIT_ARCH_S390; +#endif + return sizeof(long) == 8 ? AUDIT_ARCH_S390X : AUDIT_ARCH_S390; +} #endif /* _ASM_SYSCALL_H */ |