Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 207a0549 authored by Martin Schwidefsky's avatar Martin Schwidefsky
Browse files

[S390] return address of compat signals



A 31-bit kernel always sets the high order bit in the return address
for a signal handler.
git commit d4e81b35 "[S390] allow all addressing modes" makes
sure that the high order bit is set in the signal return address for
standard signals of a 31-bit compat process but fails to do the same
for real-time signals. To make things consistent the bit needs to be
set by setup_rt_frame32 as well.

Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 77ecd06a
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -548,9 +548,9 @@ static int setup_rt_frame32(int sig, struct k_sigaction *ka, siginfo_t *info,
	/* Set up to return from userspace.  If provided, use a stub
	/* Set up to return from userspace.  If provided, use a stub
	   already in userspace.  */
	   already in userspace.  */
	if (ka->sa.sa_flags & SA_RESTORER) {
	if (ka->sa.sa_flags & SA_RESTORER) {
		regs->gprs[14] = (__u64) ka->sa.sa_restorer;
		regs->gprs[14] = (__u64) ka->sa.sa_restorer | PSW32_ADDR_AMODE;
	} else {
	} else {
		regs->gprs[14] = (__u64) frame->retcode;
		regs->gprs[14] = (__u64) frame->retcode | PSW32_ADDR_AMODE;
		err |= __put_user(S390_SYSCALL_OPCODE | __NR_rt_sigreturn,
		err |= __put_user(S390_SYSCALL_OPCODE | __NR_rt_sigreturn,
				  (u16 __force __user *)(frame->retcode));
				  (u16 __force __user *)(frame->retcode));
	}
	}