linux-stable/kernel/events
Eric W. Biederman dbe380adfc 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-25 09:52:12 +01:00
..
callchain.c perf: Remove superfluous allocation error check 2018-05-16 10:08:41 +02:00
core.c perf/core: Fix creating kernel counters for PMUs that override event->cpu 2019-08-25 10:51:35 +02:00
hw_breakpoint.c perf/hwbp: Simplify the perf-hwbp code, fix documentation 2018-04-08 12:12:41 +02:00
internal.h bpf, events: fix offset in skb copy handler 2016-07-25 10:34:11 -07:00
Makefile ftrace: allow architectures to specify ftrace compile options 2015-01-29 09:19:19 +01:00
ring_buffer.c perf/ring_buffer: Add ordering to rb->nest increment 2019-06-22 08:17:23 +02:00
uprobes.c signal: Properly deliver SIGILL from uprobes 2019-11-25 09:52:12 +01:00