]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: Fix test_verifier failed test in unprivileged mode
authorKumar Kartikeya Dwivedi <memxor@gmail.com>
Thu, 21 Jul 2022 13:42:45 +0000 (15:42 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 22 Jul 2022 04:03:25 +0000 (21:03 -0700)
commitcbe5e372aff98e87474560b33e4434d99e2b7788
treee5c03be8e09060966aa3c18bc8f35e92ebb645dc
parent12bd4966b5cb1e7db9bb0fa6d9e9983dfc46fd93
selftests/bpf: Fix test_verifier failed test in unprivileged mode

Loading the BTF won't be permitted without privileges, hence only test
for privileged mode by setting the prog type. This makes the
test_verifier show 0 failures when unprivileged BPF is enabled.

Fixes: def54e022d07 ("selftest/bpf: Test for use-after-free bug fix in inline_bpf_loop")
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Link: https://lore.kernel.org/r/20220721134245.2450-14-memxor@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/verifier/bpf_loop_inline.c