linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [GIT PULL] 'at_least' array sizes for 6.19
@ 2025-11-30  2:50 Eric Biggers
  2025-12-03  3:11 ` pr-tracker-bot
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Biggers @ 2025-11-30  2:50 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-crypto, linux-kernel, linux-hardening, Ard Biesheuvel,
	Jason A. Donenfeld, Herbert Xu, Miri Korenblit, Kees Cook

The following changes since commit dcb6fa37fd7bc9c3d2b066329b0d27dedf8becaa:

  Linux 6.18-rc3 (2025-10-26 15:59:49 -0700)

are available in the Git repository at:

  https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git tags/libcrypto-at-least-for-linus

for you to fetch changes up to 4f0382b0901b43552b600f8e5f806295778b0fb0:

  lib/crypto: sha2: Add at_least decoration to fixed-size array params (2025-11-23 12:19:47 -0800)

----------------------------------------------------------------

C supports lower bounds on the sizes of array parameters, using the
static keyword as follows: 'void f(int a[static 32]);'. This allows
the compiler to warn about a too-small array being passed.

As discussed, this reuse of the 'static' keyword, while standard, is a
bit obscure. Therefore, add an alias 'at_least' to compiler_types.h.

Then, add this 'at_least' annotation to the array parameters of
various crypto library functions.

----------------------------------------------------------------
Eric Biggers (6):
      lib/crypto: chacha: Add at_least decoration to fixed-size array params
      lib/crypto: curve25519: Add at_least decoration to fixed-size array params
      lib/crypto: md5: Add at_least decoration to fixed-size array params
      lib/crypto: poly1305: Add at_least decoration to fixed-size array params
      lib/crypto: sha1: Add at_least decoration to fixed-size array params
      lib/crypto: sha2: Add at_least decoration to fixed-size array params

Jason A. Donenfeld (3):
      wifi: iwlwifi: trans: rename at_least variable to min_mode
      compiler_types: introduce at_least parameter decoration pseudo keyword
      lib/crypto: chacha20poly1305: Statically check fixed array lengths

 drivers/net/wireless/intel/iwlwifi/iwl-trans.c |  8 ++--
 include/crypto/chacha.h                        | 12 +++---
 include/crypto/chacha20poly1305.h              | 19 ++++-----
 include/crypto/curve25519.h                    | 24 +++++++-----
 include/crypto/md5.h                           | 11 +++---
 include/crypto/poly1305.h                      |  2 +-
 include/crypto/sha1.h                          | 12 +++---
 include/crypto/sha2.h                          | 53 +++++++++++++++-----------
 include/linux/compiler_types.h                 | 15 ++++++++
 lib/crypto/chacha20poly1305.c                  | 18 ++++-----
 10 files changed, 103 insertions(+), 71 deletions(-)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-12-03  3:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-30  2:50 [GIT PULL] 'at_least' array sizes for 6.19 Eric Biggers
2025-12-03  3:11 ` pr-tracker-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).