selftests/bpf: Add test to access u32 ptr argument in tracing program
authorFeng Zhou <zhoufeng.zf@bytedance.com>
Mon, 10 Apr 2023 08:59:08 +0000 (16:59 +0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 11 Apr 2023 18:29:49 +0000 (20:29 +0200)
commit75dcef8d3609d0b1d3497d6ed4809096513e0b83
tree426292d8f50eb626ae13c785460c78bd5d2b2d51
parent91f2dc6838c19342f7f2993627c622835cc24890
selftests/bpf: Add test to access u32 ptr argument in tracing program

Adding verifier test for accessing u32 pointer argument in
tracing programs.

The test program loads 1nd argument of bpf_fentry_test9 function
which is u32 pointer and checks that verifier allows that.

Co-developed-by: Chengming Zhou <zhouchengming@bytedance.com>
Signed-off-by: Chengming Zhou <zhouchengming@bytedance.com>
Signed-off-by: Feng Zhou <zhoufeng.zf@bytedance.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Link: https://lore.kernel.org/bpf/20230410085908.98493-3-zhoufeng.zf@bytedance.com
net/bpf/test_run.c
tools/testing/selftests/bpf/verifier/btf_ctx_access.c