From f6bd35b2742318f7b089ce72c27005461deafc54 Mon Sep 17 00:00:00 2001 From: Jiri Olsa Date: Fri, 3 Jul 2026 13:49:11 +0200 Subject: [PATCH] libbpf: Detect uprobe syscall with new error In the previous optimized uprobe fix we changed the syscall error used for its detection from ENXIO to EPROTO. Changing related probe_uprobe_syscall detection check. Fixes: 05738da0efa1 ("libbpf: Add uprobe syscall feature detection") Fixes: 554ba38456da ("uprobes/x86: Move optimized uprobe from nop5 to nop10") Signed-off-by: Jiri Olsa Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Acked-by: Andrii Nakryiko Link: https://patch.msgid.link/20260703114917.238144-8-jolsa@kernel.org --- src/features.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/features.c b/src/features.c index b7e388f..e5641fa 100644 --- a/src/features.c +++ b/src/features.c @@ -577,10 +577,10 @@ static int probe_ldimm64_full_range_off(int token_fd) static int probe_uprobe_syscall(int token_fd) { /* - * If kernel supports uprobe() syscall, it will return -ENXIO when called + * If kernel supports uprobe() syscall, it will return -EPROTO when called * from the outside of a kernel-generated uprobe trampoline. */ - return syscall(__NR_uprobe) < 0 && errno == ENXIO; + return syscall(__NR_uprobe) < 0 && errno == EPROTO; } #else static int probe_uprobe_syscall(int token_fd)