summaryrefslogtreecommitdiff
path: root/kernel/bpf/Makefile
diff options
context:
space:
mode:
authorVadim Fedorenko <vadfed@meta.com>2024-04-22 15:50:21 -0700
committerMartin KaFai Lau <martin.lau@kernel.org>2024-04-24 16:01:10 -0700
commit3e1c6f35409f9e447bf37f64840f5b65576bfb78 (patch)
tree6ff5c59d598f975728cfdd1f4d29407d4b6cae01 /kernel/bpf/Makefile
parent95c07d58250ca3ed01855c20be568cf04e15382f (diff)
downloadlwn-3e1c6f35409f9e447bf37f64840f5b65576bfb78.tar.gz
lwn-3e1c6f35409f9e447bf37f64840f5b65576bfb78.zip
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.com Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Diffstat (limited to 'kernel/bpf/Makefile')
-rw-r--r--kernel/bpf/Makefile3
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/bpf/Makefile b/kernel/bpf/Makefile
index 368c5d86b5b7..736bd22e5ce0 100644
--- a/kernel/bpf/Makefile
+++ b/kernel/bpf/Makefile
@@ -44,6 +44,9 @@ obj-$(CONFIG_BPF_SYSCALL) += bpf_struct_ops.o
obj-$(CONFIG_BPF_SYSCALL) += cpumask.o
obj-${CONFIG_BPF_LSM} += bpf_lsm.o
endif
+ifeq ($(CONFIG_CRYPTO),y)
+obj-$(CONFIG_BPF_SYSCALL) += crypto.o
+endif
obj-$(CONFIG_BPF_PRELOAD) += preload/
obj-$(CONFIG_BPF_SYSCALL) += relo_core.o