bpf: make common crypto API for TC/XDP programs
Add crypto API support to BPF to be able to decrypt or encrypt packets in TC/XDP BPF programs. Special care should be taken for initialization part of crypto algo because crypto alloc) doesn't work with preemtion disabled, it can be run only in sleepable BPF program. Also async crypto is not supported because of the very same issue - TC/XDP BPF programs are not sleepable. Signed-off-by: Vadim Fedorenko <vadfed@meta.com> Link: https://lore.kernel.org/r/20240422225024.2847039-2-vadfed@meta.comSigned-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Showing
include/linux/bpf_crypto.h
0 → 100644
kernel/bpf/crypto.c
0 → 100644
This diff is collapsed.
Please register or sign in to comment