diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2018-09-22 10:52:41 +0200 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2018-09-27 21:55:15 +0200 |
commit | f3a900b34101bb8df10b83f326b3af796c101a05 (patch) | |
tree | 6186e2ab08d3feb1d77af99458cbeada475ceab8 /arch/arm64/kernel | |
parent | 2627f0347c682d03e8594a81083557d3d798f58f (diff) | |
download | linux-stable-f3a900b34101bb8df10b83f326b3af796c101a05.tar.gz linux-stable-f3a900b34101bb8df10b83f326b3af796c101a05.tar.bz2 linux-stable-f3a900b34101bb8df10b83f326b3af796c101a05.zip |
signal/arm64: Add and use arm64_force_sig_ptrace_errno_trap
Add arm64_force_sig_ptrace_errno_trap for consistency with
arm64_force_sig_fault and use it where appropriate.
This adds the show_signal logic to the force_sig_errno_trap case,
where it was apparently overlooked earlier.
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Tested-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'arch/arm64/kernel')
-rw-r--r-- | arch/arm64/kernel/ptrace.c | 4 | ||||
-rw-r--r-- | arch/arm64/kernel/traps.c | 7 |
2 files changed, 10 insertions, 1 deletions
diff --git a/arch/arm64/kernel/ptrace.c b/arch/arm64/kernel/ptrace.c index 921267f59d0d..1710a2d01669 100644 --- a/arch/arm64/kernel/ptrace.c +++ b/arch/arm64/kernel/ptrace.c @@ -202,7 +202,9 @@ static void ptrace_hbptriggered(struct perf_event *bp, break; } } - force_sig_ptrace_errno_trap(si_errno, (void __user *)bkpt->trigger); + arm64_force_sig_ptrace_errno_trap(si_errno, + (void __user *)bkpt->trigger, + desc); } #endif arm64_force_sig_fault(SIGTRAP, TRAP_HWBKPT, diff --git a/arch/arm64/kernel/traps.c b/arch/arm64/kernel/traps.c index de67818258cd..856b32aa03d8 100644 --- a/arch/arm64/kernel/traps.c +++ b/arch/arm64/kernel/traps.c @@ -262,6 +262,13 @@ void arm64_force_sig_mceerr(int code, void __user *addr, short lsb, force_sig_mceerr(code, addr, lsb, current); } +void arm64_force_sig_ptrace_errno_trap(int errno, void __user *addr, + const char *str) +{ + arm64_show_signal(SIGTRAP, str); + force_sig_ptrace_errno_trap(errno, addr); +} + void arm64_notify_die(const char *str, struct pt_regs *regs, int signo, int sicode, void __user *addr, int err) |