diff options
| author | Helge Deller <[email protected]> | 2016-03-30 12:14:31 +0000 |
|---|---|---|
| committer | Helge Deller <[email protected]> | 2016-03-31 10:28:38 +0000 |
| commit | 910cd32e552ea09caa89cdbe328e468979b030dd (patch) | |
| tree | 02cc8c1d9d0202d76f988ae242ccbc328a8e43cd /arch/parisc/include/asm/syscall.h | |
| parent | parisc: Fix SIGSYS signals in compat case (diff) | |
| download | kernel-910cd32e552ea09caa89cdbe328e468979b030dd.tar.gz kernel-910cd32e552ea09caa89cdbe328e468979b030dd.zip | |
parisc: Fix and enable seccomp filter support
The seccomp filter support requires careful handling of task registers. This
includes reloading of the return value (%r28) and proper syscall exit if
secure_computing() returned -1.
Additionally we need to sign-extend the syscall number from signed 32bit to
signed 64bit in do_syscall_trace_enter() since the ptrace interface only allows
storing 32bit values in compat mode.
Signed-off-by: Helge Deller <[email protected]>
Cc: [email protected] # v4.5
Diffstat (limited to 'arch/parisc/include/asm/syscall.h')
| -rw-r--r-- | arch/parisc/include/asm/syscall.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/parisc/include/asm/syscall.h b/arch/parisc/include/asm/syscall.h index a5eba95d87fe..637ce8d6f375 100644 --- a/arch/parisc/include/asm/syscall.h +++ b/arch/parisc/include/asm/syscall.h @@ -39,6 +39,19 @@ static inline void syscall_get_arguments(struct task_struct *tsk, } } +static inline void syscall_set_return_value(struct task_struct *task, + struct pt_regs *regs, + int error, long val) +{ + regs->gr[28] = error ? error : val; +} + +static inline void syscall_rollback(struct task_struct *task, + struct pt_regs *regs) +{ + /* do nothing */ +} + static inline int syscall_get_arch(void) { int arch = AUDIT_ARCH_PARISC; |
