]> 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)
commitcae6d008ec86057507fd94e8c82329169104a39a
tree338441804d596c6fa819c214b8faa5046f74aaac
parent68ab3cf650b68601fddf0a8cae09e8fd793c25fc
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