diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2013-09-27 09:24:38 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2013-09-30 07:04:40 -0400 |
commit | dbbfe487e5f3fc00c9fe5207d63309859704d12f (patch) | |
tree | afa7a57191434a8838f450986ca5a22b255990d7 /arch | |
parent | 4d3b0664a0d0c0dc7501cfbd067f74226aeca510 (diff) |
s390: fix system call restart after inferior call
Git commit 616498813b11ffef "s390: system call path micro optimization"
introduced a regression in regard to system call restarting and inferior
function calls via the ptrace interface. The pointer to the system call
table needs to be loaded in sysc_sigpending if do_signal returns with
TIF_SYSCALl set after it restored a system call context.
Cc: stable@vger.kernel.org # 3.10+
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/s390/kernel/entry.S | 1 | ||||
-rw-r--r-- | arch/s390/kernel/entry64.S | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S index cc30d1fb000c..0dc2b6d0a1ec 100644 --- a/arch/s390/kernel/entry.S +++ b/arch/s390/kernel/entry.S | |||
@@ -266,6 +266,7 @@ sysc_sigpending: | |||
266 | tm __TI_flags+3(%r12),_TIF_SYSCALL | 266 | tm __TI_flags+3(%r12),_TIF_SYSCALL |
267 | jno sysc_return | 267 | jno sysc_return |
268 | lm %r2,%r7,__PT_R2(%r11) # load svc arguments | 268 | lm %r2,%r7,__PT_R2(%r11) # load svc arguments |
269 | l %r10,__TI_sysc_table(%r12) # 31 bit system call table | ||
269 | xr %r8,%r8 # svc 0 returns -ENOSYS | 270 | xr %r8,%r8 # svc 0 returns -ENOSYS |
270 | clc __PT_INT_CODE+2(2,%r11),BASED(.Lnr_syscalls+2) | 271 | clc __PT_INT_CODE+2(2,%r11),BASED(.Lnr_syscalls+2) |
271 | jnl sysc_nr_ok # invalid svc number -> do svc 0 | 272 | jnl sysc_nr_ok # invalid svc number -> do svc 0 |
diff --git a/arch/s390/kernel/entry64.S b/arch/s390/kernel/entry64.S index 2b2188b97c6a..e5b43c97a834 100644 --- a/arch/s390/kernel/entry64.S +++ b/arch/s390/kernel/entry64.S | |||
@@ -297,6 +297,7 @@ sysc_sigpending: | |||
297 | tm __TI_flags+7(%r12),_TIF_SYSCALL | 297 | tm __TI_flags+7(%r12),_TIF_SYSCALL |
298 | jno sysc_return | 298 | jno sysc_return |
299 | lmg %r2,%r7,__PT_R2(%r11) # load svc arguments | 299 | lmg %r2,%r7,__PT_R2(%r11) # load svc arguments |
300 | lg %r10,__TI_sysc_table(%r12) # address of system call table | ||
300 | lghi %r8,0 # svc 0 returns -ENOSYS | 301 | lghi %r8,0 # svc 0 returns -ENOSYS |
301 | llgh %r1,__PT_INT_CODE+2(%r11) # load new svc number | 302 | llgh %r1,__PT_INT_CODE+2(%r11) # load new svc number |
302 | cghi %r1,NR_syscalls | 303 | cghi %r1,NR_syscalls |