summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/prog_tests
diff options
context:
space:
mode:
authorMartin KaFai Lau <martin.lau@kernel.org>2024-08-29 14:08:31 -0700
committerAlexei Starovoitov <ast@kernel.org>2024-08-29 18:15:45 -0700
commitcada0bdcc471443dbd41bd63286f48be3dae0d89 (patch)
treef51686d057312ce2b455de8613d6c8ea5668a89f /tools/testing/selftests/bpf/prog_tests
parent42fdbbde6cf4159f77de13a40f8c0be6ef48bcc1 (diff)
selftests/bpf: Test epilogue patching when the main prog has multiple BPF_EXIT
This patch tests the epilogue patching when the main prog has multiple BPF_EXIT. The verifier should have patched the 2nd (and later) BPF_EXIT with a BPF_JA that goes back to the earlier patched epilogue instructions. Acked-by: Eduard Zingerman <eddyz87@gmail.com> Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org> Link: https://lore.kernel.org/r/20240829210833.388152-10-martin.lau@linux.dev Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests')
-rw-r--r--tools/testing/selftests/bpf/prog_tests/pro_epilogue.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/pro_epilogue.c b/tools/testing/selftests/bpf/prog_tests/pro_epilogue.c
index f974ae9ac610..509883e6823a 100644
--- a/tools/testing/selftests/bpf/prog_tests/pro_epilogue.c
+++ b/tools/testing/selftests/bpf/prog_tests/pro_epilogue.c
@@ -5,6 +5,7 @@
#include "pro_epilogue.skel.h"
#include "epilogue_tailcall.skel.h"
#include "pro_epilogue_goto_start.skel.h"
+#include "epilogue_exit.skel.h"
struct st_ops_args {
__u64 a;
@@ -53,6 +54,7 @@ void test_pro_epilogue(void)
{
RUN_TESTS(pro_epilogue);
RUN_TESTS(pro_epilogue_goto_start);
+ RUN_TESTS(epilogue_exit);
if (test__start_subtest("tailcall"))
test_tailcall();
}