linux/kernel/events
Linus Torvalds 678a0299d8 uprobes: Use get_user() in is_trap_at_addr()
is_trap_at_addr() reads the instruction at a user address with
__get_user(), inside pagefault_disable() since the caller holds
mmap_lock.  There is no access_ok() in front of it, and nothing here
needs the unchecked version: with page faults disabled, get_user()'s
might_fault() check returns early, so that is no reason to avoid it
either.

Use get_user(), which also checks that the address is a user address,
and on x86 avoids the lfence that __get_user() does.

This is part of getting rid of __get_user() and __put_user() entirely.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2026-10-19 19:23:24 -10:00
..
callchain.c perf: sched: Fix perf crash with new is_user_task() helper 2026-01-30 23:06:07 +01:00
core.c perf: Update cgroup time when rotating multiplexed events 2026-10-16 09:49:01 +02:00
hw_breakpoint_test.c perf/hw_breakpoint: remove MODULE_LICENSE in non-modules 2023-04-13 13:13:52 -07:00
hw_breakpoint.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
internal.h perf/core: Fix deadlock in perf_mmap() failure path 2026-05-05 12:47:20 +02:00
Makefile perf/hw_breakpoint: Add KUnit test for constraints accounting 2022-08-30 10:56:20 +02:00
ring_buffer.c perf: Replace perf_event_header__init_id with full header init 2026-10-01 14:02:06 +02:00
uprobes.c uprobes: Use get_user() in is_trap_at_addr() 2026-10-19 19:23:24 -10:00