]> Gentwo Git Trees - linux/.git/commit
uprobes/x86: Return error from uprobe syscall when not called from trampoline
authorJiri Olsa <jolsa@kernel.org>
Fri, 5 Sep 2025 20:57:29 +0000 (22:57 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Mon, 15 Sep 2025 11:46:29 +0000 (13:46 +0200)
commitd3aeb6d97b22272bb4783c6d4309d81bb0a4527c
treeeaed6bdef49c799bd996ef89c18f2b7720dabf1e
parent16ed389227651330879e17bd83d43bd234006722
uprobes/x86: Return error from uprobe syscall when not called from trampoline

Currently uprobe syscall handles all errors with forcing SIGILL to current
process. As suggested by Andrii it'd be helpful for uprobe syscall detection
to return error value for the !in_uprobe_trampoline check.

This way we could just call uprobe syscall and based on return value we will
find out if the kernel has it.

Suggested-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Oleg Nesterov <oleg@redhat.com>
arch/x86/kernel/uprobes.c