From: Martin Schwidefsky Date: Tue, 9 Oct 2012 11:33:53 +0000 (+0200) Subject: s390/entry: fix svc number for TIF_SYSCALL system call restart X-Git-Tag: v3.7-rc1~62^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=450e47da67499aeb6f1700e8f84747460c11ab56;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git 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 --- diff --git a/arch/s390/kernel/entry64.S b/arch/s390/kernel/entry64.S index 7549985..8f211ad 100644 --- a/arch/s390/kernel/entry64.S +++ b/arch/s390/kernel/entry64.S @@ -295,7 +295,7 @@ sysc_sigpending: jno sysc_return lmg %r2,%r7,__PT_R2(%r11) # load svc arguments lghi %r8,0 # svc 0 returns -ENOSYS - lh %r1,__PT_INT_CODE+2(%r11) # load new svc number + llgh %r1,__PT_INT_CODE+2(%r11) # load new svc number cghi %r1,NR_syscalls jnl sysc_nr_ok # invalid svc number -> do svc 0 slag %r8,%r1,2