]> git.baikalelectronics.ru Git - kernel.git/commit
bpf, selftests: Add ringbuf memory type confusion test
authorDaniel Borkmann <daniel@iogearbox.net>
Wed, 12 Jan 2022 12:39:48 +0000 (12:39 +0000)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 19 Jan 2022 00:27:03 +0000 (01:27 +0100)
commit37a4b831812a9ff365e64f837fee89582e01dd04
tree338441804d596c6fa819c214b8faa5046f74aaac
parent7bb56b923fec5561f46f89ccb336dfbe1c4133d3
bpf, selftests: Add ringbuf memory type confusion test

Add two tests, one which asserts that ring buffer memory can be passed to
other helpers for populating its entry area, and another one where verifier
rejects different type of memory passed to bpf_ringbuf_submit().

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/prog_tests/d_path.c
tools/testing/selftests/bpf/progs/test_d_path_check_types.c [new file with mode: 0644]
tools/testing/selftests/bpf/verifier/ringbuf.c
tools/testing/selftests/bpf/verifier/spill_fill.c