diff options
author | Yonghong Song <yonghong.song@linux.dev> | 2024-07-23 08:34:44 -0700 |
---|---|---|
committer | Andrii Nakryiko <andrii@kernel.org> | 2024-07-29 15:05:05 -0700 |
commit | 63a9936b45859b24780c86c32a32fc7b087c304e (patch) | |
tree | 7e670ff4c6ded6ccbb8f081a43511b57ec1a1b6b /tools/testing/selftests/bpf/prog_tests | |
parent | 92de36080c93296ef9005690705cba260b9bd68a (diff) |
selftests/bpf: Add tests for ldsx of pkt data/data_end/data_meta accesses
The following tests are added to verifier_ldsx.c:
- sign extension of data/data_end/data_meta for tcx programs.
The actual checking is in bpf_skb_is_valid_access() which
is called by sk_filter, cg_skb, lwt, tc(tcx) and sk_skb.
- sign extension of data/data_end/data_meta for xdp programs.
- sign extension of data/data_end for flow_dissector programs.
All newly-added tests have verification failure with message
"invalid bpf_context access". Without previous patch, all these
tests succeeded verification.
Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Signed-off-by: Yonghong Song <yonghong.song@linux.dev>
Link: https://lore.kernel.org/r/20240723153444.2430365-1-yonghong.song@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests')
0 files changed, 0 insertions, 0 deletions