mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 18:43:33 +02:00
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>
This commit is contained in:
parent
16ed389227
commit
d3aeb6d97b
|
|
@ -810,7 +810,7 @@ SYSCALL_DEFINE0(uprobe)
|
|||
|
||||
/* Allow execution only from uprobe trampolines. */
|
||||
if (!in_uprobe_trampoline(regs->ip))
|
||||
goto sigill;
|
||||
return -ENXIO;
|
||||
|
||||
err = copy_from_user(&args, (void __user *)regs->sp, sizeof(args));
|
||||
if (err)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user