diff options
author | Leon Hwang <leon.hwang@linux.dev> | 2024-10-15 18:02:07 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-02-08 11:58:18 +0300 |
commit | 141a2389a69442f2878f5fd1b74cea98e15f95f1 (patch) | |
tree | eb7735401e5f2dfb17397f9b75d46d7f47f5b6b2 /scripts/generate_rust_analyzer.py | |
parent | 5f72bf80e74bbbe8c7e4732375b070eabf5f275a (diff) | |
download | linux-141a2389a69442f2878f5fd1b74cea98e15f95f1.tar.xz |
selftests/bpf: Add test to verify tailcall and freplace restrictions
commit 021611d33e78694f4bd54573093c6fc70a812644 upstream.
Add a test case to ensure that attaching a tail callee program with an
freplace program fails, and that updating an extended program to a
prog_array map is also prohibited.
This test is designed to prevent the potential infinite loop issue caused
by the combination of tail calls and freplace, ensuring the correct
behavior and stability of the system.
Additionally, fix the broken tailcalls/tailcall_freplace selftest
because an extension prog should not be tailcalled.
cd tools/testing/selftests/bpf; ./test_progs -t tailcalls
337/25 tailcalls/tailcall_freplace:OK
337/26 tailcalls/tailcall_bpf2bpf_freplace:OK
337 tailcalls:OK
Summary: 1/26 PASSED, 0 SKIPPED, 0 FAILED
Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Signed-off-by: Leon Hwang <leon.hwang@linux.dev>
Link: https://lore.kernel.org/r/20241015150207.70264-3-leon.hwang@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
[ Yifei: bpf freplace update is backported to linux-6.12 by commit 987aa730bad3
("bpf: Prevent tailcall infinite loop caused by freplace"). It will cause
selftest #336/25 failed. ]
Signed-off-by: Yifei Liu <yifei.l.liu@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/generate_rust_analyzer.py')
0 files changed, 0 insertions, 0 deletions