Re: [PATCHv5 bpf-next 5/8] selftests/bpf: Add uretprobe syscall call from user space test
From: Andrii Nakryiko <hidden>
Date: 2024-05-07 16:57:50
Also in:
bpf, linux-api, linux-man, lkml
From: Andrii Nakryiko <hidden>
Date: 2024-05-07 16:57:50
Also in:
bpf, linux-api, linux-man, lkml
On Tue, May 7, 2024 at 3:54 AM Jiri Olsa [off-list ref] wrote:
Adding test to verify that when called from outside of the trampoline provided by kernel, the uretprobe syscall will cause calling process to receive SIGILL signal and the attached bpf program is not executed. Reviewed-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Signed-off-by: Jiri Olsa <jolsa@kernel.org> --- .../selftests/bpf/prog_tests/uprobe_syscall.c | 95 +++++++++++++++++++ .../bpf/progs/uprobe_syscall_executed.c | 17 ++++ 2 files changed, 112 insertions(+) create mode 100644 tools/testing/selftests/bpf/progs/uprobe_syscall_executed.c
Acked-by: Andrii Nakryiko <andrii@kernel.org>
diff --git a/tools/testing/selftests/bpf/prog_tests/uprobe_syscall.c b/tools/testing/selftests/bpf/prog_tests/uprobe_syscall.c index 1a50cd35205d..3ef324c2db50 100644 --- a/tools/testing/selftests/bpf/prog_tests/uprobe_syscall.c +++ b/tools/testing/selftests/bpf/prog_tests/uprobe_syscall.c@@ -7,7 +7,10 @@ #include <unistd.h> #include <asm/ptrace.h> #include <linux/compiler.h> +#include <linux/stringify.h> +#include <sys/wait.h> #include "uprobe_syscall.skel.h" +#include "uprobe_syscall_executed.skel.h"
[...]