lkml.org 
[lkml]   [2024]   [May]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCHv5 bpf-next 5/8] selftests/bpf: Add uretprobe syscall call from user space test
    On Tue, May 7, 2024 at 3:54 AM Jiri Olsa <jolsa@kernel.org> 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"
    >

    [...]

    \
     
     \ /
      Last update: 2024-05-27 18:19    [W:6.954 / U:0.116 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site