aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/ptrace.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2018-09-18 01:16:39 +0200
committerEric W. Biederman <ebiederm@xmission.com>2018-09-21 15:30:54 +0200
commit0a996c1a3f260ba6fe1201a668d31fa8d8339793 (patch)
tree24db881f7fa63a53e12d4d31a759cb1dd7293b64 /arch/x86/kernel/ptrace.c
parentsignal/x86: Pass pkey by value (diff)
downloadlinux-dev-0a996c1a3f260ba6fe1201a668d31fa8d8339793.tar.xz
linux-dev-0a996c1a3f260ba6fe1201a668d31fa8d8339793.zip
signal/x86: Use force_sig_fault where appropriate
Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'arch/x86/kernel/ptrace.c')
-rw-r--r--arch/x86/kernel/ptrace.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c
index 511ea0f16078..a78fff5b3384 100644
--- a/arch/x86/kernel/ptrace.c
+++ b/arch/x86/kernel/ptrace.c
@@ -1372,18 +1372,12 @@ const struct user_regset_view *task_user_regset_view(struct task_struct *task)
void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs,
int error_code, int si_code)
{
- struct siginfo info;
-
- clear_siginfo(&info);
tsk->thread.trap_nr = X86_TRAP_DB;
tsk->thread.error_code = error_code;
- info.si_signo = SIGTRAP;
- info.si_code = si_code;
- info.si_addr = user_mode(regs) ? (void __user *)regs->ip : NULL;
-
/* Send us the fake SIGTRAP */
- force_sig_info(SIGTRAP, &info, tsk);
+ force_sig_fault(SIGTRAP, si_code,
+ user_mode(regs) ? (void __user *)regs->ip : NULL, tsk);
}
void user_single_step_report(struct pt_regs *regs)