diff options
author | 2024-04-24 13:23:43 -0700 | |
---|---|---|
committer | 2024-04-24 16:01:10 -0700 | |
commit | 52578f7f53ff8fe3a8f6f3bc8b5956615c07a16e (patch) | |
tree | 788f59542e51908ad78c8fb9d32be432a2b44397 /include/linux/bpf.h | |
parent | bpf: update the comment for BTF_FIELDS_MAX (diff) | |
parent | selftests: bpf: crypto: add benchmark for crypto functions (diff) | |
download | wireguard-linux-52578f7f53ff8fe3a8f6f3bc8b5956615c07a16e.tar.xz wireguard-linux-52578f7f53ff8fe3a8f6f3bc8b5956615c07a16e.zip |
Merge branch 'BPF crypto API framework'
Vadim Fedorenko says:
====================
This series introduces crypto kfuncs to make BPF programs able to
utilize kernel crypto subsystem. Crypto operations made pluggable to
avoid extensive growth of kernel when it's not needed. Only skcipher is
added within this series, but it can be easily extended to other types
of operations. No hardware offload supported as it needs sleepable
context which is not available for TX or XDP programs. At the same time
crypto context initialization kfunc can only run in sleepable context,
that's why it should be run separately and store the result in the map.
Selftests show the common way to implement crypto actions in BPF
programs. Benchmark is also added to have a baseline.
====================
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Diffstat (limited to 'include/linux/bpf.h')
-rw-r--r-- | include/linux/bpf.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/bpf.h b/include/linux/bpf.h index 978200f6d925..364563b74db6 100644 --- a/include/linux/bpf.h +++ b/include/linux/bpf.h @@ -1275,6 +1275,7 @@ int bpf_dynptr_check_size(u32 size); u32 __bpf_dynptr_size(const struct bpf_dynptr_kern *ptr); const void *__bpf_dynptr_data(const struct bpf_dynptr_kern *ptr, u32 len); void *__bpf_dynptr_data_rw(const struct bpf_dynptr_kern *ptr, u32 len); +bool __bpf_dynptr_is_rdonly(const struct bpf_dynptr_kern *ptr); #ifdef CONFIG_BPF_JIT int bpf_trampoline_link_prog(struct bpf_tramp_link *link, struct bpf_trampoline *tr); |