summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/test_cpp.cpp
diff options
context:
space:
mode:
authorKumar Kartikeya Dwivedi <memxor@gmail.com>2026-09-21 04:38:29 +0200
committerAlexei Starovoitov <ast@kernel.org>2026-09-21 17:12:39 +0000
commita8bbd9ee1bbc73ae51508ca045bbb693bbdda446 (patch)
tree7f02bc6e6392ce43f072a962cbff8584c81e8a05 /tools/testing/selftests/bpf/test_cpp.cpp
parentfc670d4b6c31d69f5e872a397d17fe4c5f970ffe (diff)
downloadlinux-next-a8bbd9ee1bbc73ae51508ca045bbb693bbdda446.tar.gz
linux-next-a8bbd9ee1bbc73ae51508ca045bbb693bbdda446.zip
selftests/bpf: Cover generic __uninit output initialization
Exercise the struct and sized-buffer cases where stack liveness poisons an output before a kfunc call. Check that the verifier accepts these outputs and that the kfunc initializes the memory read after the call. Verify that an uninitialized input aliasing an output is still rejected without CAP_PERFMON or CAP_SYS_ADMIN. Include an initialized alias as a positive control, using an int-width store so its value is independent of endianness. Use __prepare_priv to resolve the test module's BTF before dropping to CAP_BPF and CAP_NET_ADMIN for program loading. Keep multiple-output and argument-slot coverage separate from these immediate regression tests. Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Reviewed-by: Amery Hung <ameryhung@gmail.com> Link: https://patch.msgid.link/20260921023843.411943-6-memxor@gmail.com
Diffstat (limited to 'tools/testing/selftests/bpf/test_cpp.cpp')
0 files changed, 0 insertions, 0 deletions