summaryrefslogtreecommitdiffstats
path: root/arch/arm64/kernel/signal32.c
diff options
context:
space:
mode:
authorMark Rutland2018-07-11 15:56:41 +0200
committerWill Deacon2018-07-12 15:40:39 +0200
commit3085e1645e23888125224f66a710077cdb03106a (patch)
treea0aa48b29c26aa10c8d7e07fb0a5da7edac7b28b /arch/arm64/kernel/signal32.c
parentarm64: move sve_user_{enable,disable} to <asm/fpsimd.h> (diff)
downloadkernel-qcow2-linux-3085e1645e23888125224f66a710077cdb03106a.tar.gz
kernel-qcow2-linux-3085e1645e23888125224f66a710077cdb03106a.tar.xz
kernel-qcow2-linux-3085e1645e23888125224f66a710077cdb03106a.zip
arm64: remove sigreturn wrappers
The arm64 sigreturn* syscall handlers are non-standard. Rather than taking a number of user parameters in registers as per the AAPCS, they expect the pt_regs as their sole argument. To make this work, we override the syscall definitions to invoke wrappers written in assembly, which mov the SP into x0, and branch to their respective C functions. On other architectures (such as x86), the sigreturn* functions take no argument and instead use current_pt_regs() to acquire the user registers. This requires less boilerplate code, and allows for other features such as interposing C code in this path. This patch takes the same approach for arm64. Signed-off-by: Mark Rutland <mark.rutland@arm.com> Tentatively-reviewed-by: Dave Martin <dave.martin@arm.com> Reviewed-by: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will.deacon@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64/kernel/signal32.c')
-rw-r--r--arch/arm64/kernel/signal32.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/arm64/kernel/signal32.c b/arch/arm64/kernel/signal32.c
index fca761be18c8..9aac1253e0a6 100644
--- a/arch/arm64/kernel/signal32.c
+++ b/arch/arm64/kernel/signal32.c
@@ -285,8 +285,9 @@ static int compat_restore_sigframe(struct pt_regs *regs,
return err;
}
-asmlinkage int compat_sys_sigreturn(struct pt_regs *regs)
+asmlinkage int compat_sys_sigreturn(void)
{
+ struct pt_regs *regs = current_pt_regs();
struct compat_sigframe __user *frame;
/* Always make any pending restarted system calls return -EINTR */
@@ -315,8 +316,9 @@ badframe:
return 0;
}
-asmlinkage int compat_sys_rt_sigreturn(struct pt_regs *regs)
+asmlinkage int compat_sys_rt_sigreturn(void)
{
+ struct pt_regs *regs = current_pt_regs();
struct compat_rt_sigframe __user *frame;
/* Always make any pending restarted system calls return -EINTR */