diff options
author | Yonghong Song <yhs@fb.com> | 2020-07-23 11:41:24 -0700 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2020-07-25 20:16:34 -0700 |
commit | 9efcc4ad7a15ea50550c53fbf62457c309216051 (patch) | |
tree | ad893338be4daaf48000287dc6eb57a00e76ff8c /tools/testing/selftests/bpf/prog_tests/perf_event_stackmap.c | |
parent | 3b1c420bd882115eb7a3d2335cc00d7b9974eb0b (diff) |
selftests/bpf: Add a test for out of bound rdonly buf access
If the bpf program contains out of bound access w.r.t. a
particular map key/value size, the verification will be
still okay, e.g., it will be accepted by verifier. But
it will be rejected during link_create time. A test
is added here to ensure link_create failure did happen
if out of bound access happened.
$ ./test_progs -n 4
...
#4/23 rdonly-buf-out-of-bound:OK
...
Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200723184124.591700-1-yhs@fb.com
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/perf_event_stackmap.c')
0 files changed, 0 insertions, 0 deletions