Skip to content

crypto: lib/chacha - improve type safety

Eric Biggers linux-arm-kernel linux-bcachefs linux-crypto linux-mips linux-riscv linux-s390 linuxppc-dev lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4crypto: lib/chacha - strongly type the ChaCha statearch/arm/lib/crypto/chacha-glue.c arch/arm/lib/crypto/chacha-scalar-core.S arch/arm64/lib/crypto/chacha-neon-glue.c +16 more+228 -1901 reply
2/4crypto: lib/chacha - use struct assignment to copy statelib/crypto/chacha.c+2 -60 replies
3/4crypto: lib/chacha - add strongly-typed state zeroizationdrivers/char/random.c fs/bcachefs/checksum.c include/crypto/chacha.h +1 more+13 -70 replies
4/4crypto: lib/chacha - add array bounds to function prototypesarch/arm/lib/crypto/chacha-glue.c arch/arm/lib/crypto/chacha-scalar-core.S arch/arm64/lib/crypto/chacha-neon-glue.c +9 more+49 -440 replies

Reviews trailers per patch

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

PatchKent Overstreet
1/4A-b
2/4
3/4
4/4

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

Read the v1 thread

Cover letter [PATCH 0/4] crypto: lib/chacha - improve type safety

This series can also be retrieved from:

git fetch https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git chacha-prototypes-v1

This series improves type safety and clarity in the ChaCha functions by strongly typing the state array and adding explicit array bounds for other fixed-length arrays. No functional changes.

Eric Biggers (4):
crypto: lib/chacha - strongly type the ChaCha state
crypto: lib/chacha - use struct assignment to copy state
crypto: lib/chacha - add strongly-typed state zeroization
crypto: lib/chacha - add array bounds to function prototypes

 arch/arm/lib/crypto/chacha-glue.c             | 34 ++++----
 arch/arm/lib/crypto/chacha-scalar-core.S      |  5 +-
 arch/arm64/lib/crypto/chacha-neon-glue.c      | 27 ++++---
 arch/mips/lib/crypto/chacha-glue.c            |  6 +-
 arch/powerpc/lib/crypto/chacha-p10-glue.c     | 17 ++--
 arch/powerpc/lib/crypto/chacha-p10le-8x.S     |  6 +-
 arch/riscv/lib/crypto/chacha-riscv64-glue.c   |  9 ++-
 arch/riscv/lib/crypto/chacha-riscv64-zvkb.S   | 10 +--
 arch/s390/lib/crypto/chacha-glue.c            | 13 +--
 arch/x86/lib/crypto/chacha_glue.c             | 62 ++++++++------
 crypto/chacha.c                               | 20 ++---
 drivers/char/random.c                         | 41 +++++-----
 fs/bcachefs/checksum.c                        | 18 ++---
 include/crypto/chacha.h                       | 80 ++++++++++++-------
 lib/crypto/chacha.c                           | 40 +++++-----
 lib/crypto/chacha20poly1305-selftest.c        |  8 +-
 lib/crypto/chacha20poly1305.c                 | 53 ++++++------
 lib/crypto/libchacha.c                        |  2 +-
 .../crypto/chacha20-s390/test-cipher.c        | 10 +--
 19 files changed, 253 insertions(+), 208 deletions(-)

base-commit: 64745a9ca890ed60d78162ec511e1983e1946d73

Signature · 1 line
2.49.0