]> git.ipfire.org Git - thirdparty/linux.git/commit
selftests/bpf: add testcases for fsession cookie
authorMenglong Dong <menglong8.dong@gmail.com>
Sat, 24 Jan 2026 06:20:07 +0000 (14:20 +0800)
committerAlexei Starovoitov <ast@kernel.org>
Sun, 25 Jan 2026 02:49:36 +0000 (18:49 -0800)
commit8909b3fb23e245f8ade903dfcfcc43522cf28a56
treebbde0e8749a18cfd40a28828b3f70d33661ae1cc
parenta5533a6eaa5b602fe54e53d85f787e09eab4e771
selftests/bpf: add testcases for fsession cookie

Test session cookie for fsession. Multiple fsession BPF progs is attached
to bpf_fentry_test1() and session cookie is read and write in the
testcase.

bpf_get_func_ip() will influence the layout of the session cookies, so we
test the cookie in two case: with and without bpf_get_func_ip().

Signed-off-by: Menglong Dong <dongml2@chinatelecom.cn>
Link: https://lore.kernel.org/r/20260124062008.8657-13-dongml2@chinatelecom.cn
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/prog_tests/fsession_test.c
tools/testing/selftests/bpf/progs/fsession_test.c