OSDN Git Service

selftests/bpf: Check that bpf_kernel_read_file() denies reading IMA policy
authorRoberto Sassu <roberto.sassu@huawei.com>
Wed, 2 Mar 2022 11:14:04 +0000 (12:14 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 11 Mar 2022 02:57:55 +0000 (18:57 -0800)
commit7bae42b68d7f070a346fde4c7c1ce182f2284933
tree4b6611d6f456f2f2ef7c44e1ce579cffece0ef11
parente6dcf7bbf37c9ae72b0bc3a09d5f91dd1f5c19e1
selftests/bpf: Check that bpf_kernel_read_file() denies reading IMA policy

Check that bpf_kernel_read_file() denies the reading of an IMA policy, by
ensuring that ima_setup.sh exits with an error.

Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20220302111404.193900-10-roberto.sassu@huawei.com
tools/testing/selftests/bpf/prog_tests/test_ima.c
tools/testing/selftests/bpf/progs/ima.c