selftests/bpf: Add test for bpf_lsm_kernel_read_file()
authorRoberto Sassu <roberto.sassu@huawei.com>
Wed, 2 Mar 2022 11:14:03 +0000 (12:14 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 11 Mar 2022 02:57:55 +0000 (18:57 -0800)
commite6dcf7bbf37c9ae72b0bc3a09d5f91dd1f5c19e1
tree940a376670dc18a1c2cac7bc592bd6d85e229622
parentdf6b3039fa112e17555776213cab7f07c0a8d98d
selftests/bpf: Add test for bpf_lsm_kernel_read_file()

Test the ability of bpf_lsm_kernel_read_file() to call the sleepable
functions bpf_ima_inode_hash() or bpf_ima_file_hash() to obtain a
measurement of a loaded IMA policy.

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-9-roberto.sassu@huawei.com
tools/testing/selftests/bpf/ima_setup.sh
tools/testing/selftests/bpf/prog_tests/test_ima.c
tools/testing/selftests/bpf/progs/ima.c