diff options
author | Helge Deller <deller@gmx.de> | 2016-03-30 14:14:31 +0200 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2016-03-31 12:28:38 +0200 |
commit | 910cd32e552ea09caa89cdbe328e468979b030dd (patch) | |
tree | 02cc8c1d9d0202d76f988ae242ccbc328a8e43cd /arch/parisc/kernel/syscall.S | |
parent | 4f4acc9472e54ce702f1d85fc9e6d57767dec91f (diff) | |
download | linux-910cd32e552ea09caa89cdbe328e468979b030dd.tar.gz linux-910cd32e552ea09caa89cdbe328e468979b030dd.tar.bz2 linux-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 <deller@gmx.de>
Cc: stable@vger.kernel.org # v4.5
Diffstat (limited to 'arch/parisc/kernel/syscall.S')
-rw-r--r-- | arch/parisc/kernel/syscall.S | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/parisc/kernel/syscall.S b/arch/parisc/kernel/syscall.S index fbafa0d0e2bf..c976ebfe2269 100644 --- a/arch/parisc/kernel/syscall.S +++ b/arch/parisc/kernel/syscall.S @@ -329,6 +329,7 @@ tracesys_next: ldo -THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r1 /* get task ptr */ LDREG TI_TASK(%r1), %r1 + LDREG TASK_PT_GR28(%r1), %r28 /* Restore return value */ LDREG TASK_PT_GR26(%r1), %r26 /* Restore the users args */ LDREG TASK_PT_GR25(%r1), %r25 LDREG TASK_PT_GR24(%r1), %r24 @@ -342,6 +343,7 @@ tracesys_next: stw %r21, -56(%r30) /* 6th argument */ #endif + cmpib,COND(=),n -1,%r20,tracesys_exit /* seccomp may have returned -1 */ comiclr,>>= __NR_Linux_syscalls, %r20, %r0 b,n .Ltracesys_nosys |