Skip to content

BPF crypto API framework

Vadim Fedorenko bpf linux-crypto llvm netdev oe-kbuild-all 5 versions – Applied

Status from this message: Applied. Thanks.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v10 Latest4 patches 3 repliesApplied 4/4
  2. v94 patches 7 repliesSuperseded
  3. v83 patches 12 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v73 patches12 repliesSuperseded
v63 patches3 repliesSuperseded

Patches in v10 All 4 applied

#Subject and filesSizeRepliesApplied
1/4bpf: make common crypto API for TC/XDP programsinclude/linux/bpf.h include/linux/bpf_crypto.h kernel/bpf/Makefile +3 more+412 -11 replyApplied
2/4bpf: crypto: add skcipher to bpf cryptoMAINTAINERS crypto/Makefile crypto/bpf_crypto_skcipher.c+93 -00 repliesApplied
3/4selftests: bpf: crypto skcipher algo selfteststools/testing/selftests/bpf/config tools/testing/selftests/bpf/prog_tests/crypto_sanity.c tools/testing/selftests/bpf/progs/crypto_basic.c +2 more+505 -00 repliesApplied
4/4selftests: bpf: crypto: add benchmark for crypto functionstools/testing/selftests/bpf/Makefile tools/testing/selftests/bpf/bench.c tools/testing/selftests/bpf/benchs/bench_bpf_crypto.c +1 more+302 -02 repliesApplied

Reviews trailers per patch

1 of 4 patches has a Reviewed-by or Acked-by.

PatchHerbert Xu
1/4
2/4A-b
3/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v10 thread

Cover letter [PATCH bpf-next v10 0/4] BPF crypto API framework

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.

Vadim Fedorenko (4):
bpf: make common crypto API for TC/XDP programs
bpf: crypto: add skcipher to bpf crypto
selftests: bpf: crypto skcipher algo selftests
selftests: bpf: crypto: add benchmark for crypto functions

 MAINTAINERS                                   |   8 +
 crypto/Makefile                               |   3 +
 crypto/bpf_crypto_skcipher.c                  |  82 ++++
 include/linux/bpf.h                           |   1 +
 include/linux/bpf_crypto.h                    |  24 ++
 kernel/bpf/Makefile                           |   3 +
 kernel/bpf/crypto.c                           | 382 ++++++++++++++++++
 kernel/bpf/helpers.c                          |   2 +-
 kernel/bpf/verifier.c                         |   1 +
 tools/testing/selftests/bpf/Makefile          |   2 +
 tools/testing/selftests/bpf/bench.c           |   6 +
 .../selftests/bpf/benchs/bench_bpf_crypto.c   | 185 +++++++++
 tools/testing/selftests/bpf/config            |   5 +
 .../selftests/bpf/prog_tests/crypto_sanity.c  | 197 +++++++++
 .../selftests/bpf/progs/crypto_basic.c        |  68 ++++
 .../selftests/bpf/progs/crypto_bench.c        | 109 +++++
 .../selftests/bpf/progs/crypto_common.h       |  66 +++
 .../selftests/bpf/progs/crypto_sanity.c       | 169 ++++++++
 18 files changed, 1312 insertions(+), 1 deletion(-)
 create mode 100644 crypto/bpf_crypto_skcipher.c
 create mode 100644 include/linux/bpf_crypto.h
 create mode 100644 kernel/bpf/crypto.c
 create mode 100644 tools/testing/selftests/bpf/benchs/bench_bpf_crypto.c
 create mode 100644 tools/testing/selftests/bpf/prog_tests/crypto_sanity.c
 create mode 100644 tools/testing/selftests/bpf/progs/crypto_basic.c
 create mode 100644 tools/testing/selftests/bpf/progs/crypto_bench.c
 create mode 100644 tools/testing/selftests/bpf/progs/crypto_common.h
 create mode 100644 tools/testing/selftests/bpf/progs/crypto_sanity.c
Signature · 1 line
2.43.0