diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2012-10-09 07:33:53 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2012-10-09 08:17:02 -0400 |
commit | 450e47da67499aeb6f1700e8f84747460c11ab56 (patch) | |
tree | 1b08137d04483cf5b352d4b848a368a409d06209 /arch/s390 | |
parent | fc7e48aad35bf98c84cf21aed5c2f100c5ce009b (diff) |
s390/entry: fix svc number for TIF_SYSCALL system call restart
The load of the svc number in the TIF_SYSCALL restart path needs to be
done with an instruction that loads all 64 bits of %r1, 'lh' only loads
32 bits. If the upper half of %r1 is not zero and has the msb set,
entry64.S will try to execute an svc with a really large number.
What will be in the upper half of %r1 depends on the code generated by
gcc for the functions on the do_signal() callchain.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/kernel/entry64.S | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/kernel/entry64.S b/arch/s390/kernel/entry64.S index 7549985402f7..8f211ad1c695 100644 --- a/arch/s390/kernel/entry64.S +++ b/arch/s390/kernel/entry64.S | |||
@@ -295,7 +295,7 @@ sysc_sigpending: | |||
295 | jno sysc_return | 295 | jno sysc_return |
296 | lmg %r2,%r7,__PT_R2(%r11) # load svc arguments | 296 | lmg %r2,%r7,__PT_R2(%r11) # load svc arguments |
297 | lghi %r8,0 # svc 0 returns -ENOSYS | 297 | lghi %r8,0 # svc 0 returns -ENOSYS |
298 | lh %r1,__PT_INT_CODE+2(%r11) # load new svc number | 298 | llgh %r1,__PT_INT_CODE+2(%r11) # load new svc number |
299 | cghi %r1,NR_syscalls | 299 | cghi %r1,NR_syscalls |
300 | jnl sysc_nr_ok # invalid svc number -> do svc 0 | 300 | jnl sysc_nr_ok # invalid svc number -> do svc 0 |
301 | slag %r8,%r1,2 | 301 | slag %r8,%r1,2 |