From 2c9120f3a86a809518ece1787d76ae07dd01e01b Mon Sep 17 00:00:00 2001 From: Will Deacon Date: Tue, 20 Feb 2018 14:16:29 +0000 Subject: arm64: signal: Make force_signal_inject more robust force_signal_inject is a little flakey: * It only knows about SIGILL and SIGSEGV, so can potentially deliver other signals based on a partially initialised siginfo_t * It sets si_addr to point at the PC for SIGSEGV * It always operates on current, so doesn't need the regs argument This patch fixes these issues by always assigning the si_addr field to the address parameter of the function and updates the callers (including those that indirectly call via arm64_notify_segfault) accordingly. Signed-off-by: Will Deacon --- arch/arm64/include/asm/traps.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'arch/arm64/include/asm/traps.h') diff --git a/arch/arm64/include/asm/traps.h b/arch/arm64/include/asm/traps.h index 178e338d2889..1ee63dc38579 100644 --- a/arch/arm64/include/asm/traps.h +++ b/arch/arm64/include/asm/traps.h @@ -35,10 +35,8 @@ struct undef_hook { void register_undef_hook(struct undef_hook *hook); void unregister_undef_hook(struct undef_hook *hook); -void force_signal_inject(int signal, int code, struct pt_regs *regs, - unsigned long address); - -void arm64_notify_segfault(struct pt_regs *regs, unsigned long addr); +void force_signal_inject(int signal, int code, unsigned long address); +void arm64_notify_segfault(unsigned long addr); /* * Move regs->pc to next instruction and do necessary setup before it -- cgit v1.2.3