bpf/selftests: Update the IMA test to use BPF ring buffer
authorKP Singh <kpsingh@kernel.org>
Thu, 4 Feb 2021 19:36:22 +0000 (19:36 +0000)
committerAndrii Nakryiko <andrii@kernel.org>
Fri, 5 Feb 2021 00:35:05 +0000 (16:35 -0800)
commitf446b570ac7e1e71ffd6d2a31ffbcc5f32330a6d
tree160569736d54b2892fac30c99e004b52affebd3f
parentba90c2cc0231124d6de63576e8bdf371e92c8fd3
bpf/selftests: Update the IMA test to use BPF ring buffer

Instead of using shared global variables between userspace and BPF, use
the ring buffer to send the IMA hash on the BPF ring buffer. This helps
in validating both IMA and the usage of the ringbuffer in sleepable
programs.

Signed-off-by: KP Singh <kpsingh@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20210204193622.3367275-3-kpsingh@kernel.org
tools/testing/selftests/bpf/prog_tests/test_ima.c
tools/testing/selftests/bpf/progs/ima.c