]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit600207be5066c30b4a1b8fa1404ca0294b05d1a3
tree940a376670dc18a1c2cac7bc592bd6d85e229622
parentfca371d7fc8728fe8c40159665d988e621f30671
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