]> www.infradead.org Git - users/jedix/linux-maple.git/commit
selftests: bpf: crypto skcipher algo selftests
authorVadim Fedorenko <vadfed@meta.com>
Mon, 22 Apr 2024 22:50:23 +0000 (15:50 -0700)
committerMartin KaFai Lau <martin.lau@kernel.org>
Wed, 24 Apr 2024 23:01:10 +0000 (16:01 -0700)
commit91541ab192fc7f573e6c711ba9c2ae22a299c408
tree229a0f6d70ca1af847a13a6e29f737dbfeb19685
parentfda4f71282b21a8cf230b656781efb0a41371fd4
selftests: bpf: crypto skcipher algo selftests

Add simple tc hook selftests to show the way to work with new crypto
BPF API. Some tricky dynptr initialization is used to provide empty iv
dynptr. Simple AES-ECB algo is used to demonstrate encryption and
decryption of fixed size buffers.

Signed-off-by: Vadim Fedorenko <vadfed@meta.com>
Link: https://lore.kernel.org/r/20240422225024.2847039-4-vadfed@meta.com
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
tools/testing/selftests/bpf/config
tools/testing/selftests/bpf/prog_tests/crypto_sanity.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/crypto_basic.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/crypto_common.h [new file with mode: 0644]
tools/testing/selftests/bpf/progs/crypto_sanity.c [new file with mode: 0644]