-
- Downloads
selftests: Add selftest for disallowing modify_return attachment to freplace
This adds a selftest that ensures that modify_return tracing programs cannot be attached to freplace programs. The security_ prefix is added to the freplace program because that would otherwise let it pass the check for modify_return. Signed-off-by:Toke Høiland-Jørgensen <toke@redhat.com> Signed-off-by:
Alexei Starovoitov <ast@kernel.org> Acked-by:
Andrii Nakryiko <andriin@fb.com> Link: https://lore.kernel.org/bpf/160138355713.48470.3811074984255709369.stgit@toke.dk
Showing
- tools/testing/selftests/bpf/prog_tests/fexit_bpf2bpf.c 56 additions, 0 deletionstools/testing/selftests/bpf/prog_tests/fexit_bpf2bpf.c
- tools/testing/selftests/bpf/progs/fmod_ret_freplace.c 14 additions, 0 deletionstools/testing/selftests/bpf/progs/fmod_ret_freplace.c
- tools/testing/selftests/bpf/progs/freplace_get_constant.c 1 addition, 1 deletiontools/testing/selftests/bpf/progs/freplace_get_constant.c
Please register or sign in to comment