Skip to content

Commit dbbfe48

Browse files
author
Martin Schwidefsky
committed
s390: fix system call restart after inferior call
Git commit 6164988 "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: [email protected] # 3.10+ Signed-off-by: Martin Schwidefsky <[email protected]>
1 parent 4d3b066 commit dbbfe48

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

arch/s390/kernel/entry.S

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,7 @@ sysc_sigpending:
266266
tm __TI_flags+3(%r12),_TIF_SYSCALL
267267
jno sysc_return
268268
lm %r2,%r7,__PT_R2(%r11) # load svc arguments
269+
l %r10,__TI_sysc_table(%r12) # 31 bit system call table
269270
xr %r8,%r8 # svc 0 returns -ENOSYS
270271
clc __PT_INT_CODE+2(2,%r11),BASED(.Lnr_syscalls+2)
271272
jnl sysc_nr_ok # invalid svc number -> do svc 0

arch/s390/kernel/entry64.S

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,7 @@ sysc_sigpending:
297297
tm __TI_flags+7(%r12),_TIF_SYSCALL
298298
jno sysc_return
299299
lmg %r2,%r7,__PT_R2(%r11) # load svc arguments
300+
lg %r10,__TI_sysc_table(%r12) # address of system call table
300301
lghi %r8,0 # svc 0 returns -ENOSYS
301302
llgh %r1,__PT_INT_CODE+2(%r11) # load new svc number
302303
cghi %r1,NR_syscalls

0 commit comments

Comments
 (0)