]> 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)
commit6c87a6cb73009536e6cf49d8ff0568a8d2f76bf5
tree940a376670dc18a1c2cac7bc592bd6d85e229622
parent22186e74e1b3a40c59b5c6851f82107d3c3c40a8
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