linux-brain/kernel/events
Eric W. Biederman b0ae4104dc signal: Properly deliver SIGILL from uprobes
[ Upstream commit 55a3235fc7 ]

For userspace to tell the difference between a random signal and an
exception, the exception must include siginfo information.

Using SEND_SIG_FORCED for SIGILL is thus wrong, and it will result
in userspace seeing si_code == SI_USER (like a random signal) instead
of si_code == SI_KERNEL or a more specific si_code as all exceptions
deliver.

Therefore replace force_sig_info(SIGILL, SEND_SIG_FORCE, current)
with force_sig(SIG_ILL, current) which gets this right and is
shorter and easier to type.

Fixes: 014940bad8 ("uprobes/x86: Send SIGILL if arch_uprobe_post_xol() fails")
Fixes: 0b5256c7f1 ("uprobes: Send SIGILL if handle_trampoline() fails")
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-11-20 17:59:52 +01:00
..
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
callchain.c perf: Remove superfluous allocation error check 2018-05-16 10:10:24 +02:00
core.c perf/core: Fix creating kernel counters for PMUs that override event->cpu 2019-08-16 10:13:55 +02:00
hw_breakpoint.c perf/hwbp: Simplify the perf-hwbp code, fix documentation 2018-04-08 14:26:27 +02:00
internal.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ring_buffer.c perf/ring-buffer: Always use {READ,WRITE}_ONCE() for rb->user_page data 2019-06-22 08:16:16 +02:00
uprobes.c signal: Properly deliver SIGILL from uprobes 2019-11-20 17:59:52 +01:00