aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm64/kernel/signal32.c
diff options
context:
space:
mode:
authorDave Martin <Dave.Martin@arm.com>2017-08-01 15:35:54 +0100
committerCatalin Marinas <catalin.marinas@arm.com>2017-08-07 09:58:33 +0100
commit17c28958600928109049a3bcc814b0d5bfb1ff3a (patch)
tree901508d772cc2fe2b33013b01b59ca990bd8f6c5 /arch/arm64/kernel/signal32.c
parentarm64: syscallno is secretly an int, make it official (diff)
downloadlinux-dev-17c28958600928109049a3bcc814b0d5bfb1ff3a.tar.xz
linux-dev-17c28958600928109049a3bcc814b0d5bfb1ff3a.zip
arm64: Abstract syscallno manipulation
The -1 "no syscall" value is written in various ways, shared with the user ABI in some places, and generally obscure. This patch attempts to make things a little more consistent and readable by replacing all these uses with a single #define. A couple of symbolic helpers are provided to clarify the intent further. Because the in-syscall check in do_signal() is changed from >= 0 to != NO_SYSCALL by this patch, different behaviour may be observable if syscallno is set to values less than -1 by a tracer. However, this is not different from the behaviour that is already observable if a tracer sets syscallno to a value >= __NR_(compat_)syscalls. It appears that this can cause spurious syscall restarting, but that is not a new behaviour either, and does not appear harmful. Signed-off-by: Dave Martin <Dave.Martin@arm.com> Acked-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to '')
-rw-r--r--arch/arm64/kernel/signal32.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/kernel/signal32.c b/arch/arm64/kernel/signal32.c
index d98ca76cbd39..4e5a664be04b 100644
--- a/arch/arm64/kernel/signal32.c
+++ b/arch/arm64/kernel/signal32.c
@@ -354,7 +354,7 @@ static int compat_restore_sigframe(struct pt_regs *regs,
/*
* Avoid compat_sys_sigreturn() restarting.
*/
- regs->syscallno = ~0;
+ forget_syscall(regs);
err |= !valid_user_regs(&regs->user_regs, current);