linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-hardening@vger.kernel.org, Ard Biesheuvel <ardb@kernel.org>,
	"Jason A. Donenfeld" <Jason@zx2c4.com>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	Miri Korenblit <miriam.rachel.korenblit@intel.com>,
	Kees Cook <kees@kernel.org>
Subject: [GIT PULL] 'at_least' array sizes for 6.19
Date: Sat, 29 Nov 2025 18:50:06 -0800	[thread overview]
Message-ID: <20251130025006.GE12664@sol> (raw)

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(-)

             reply	other threads:[~2025-11-30  2:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-30  2:50 Eric Biggers [this message]
2025-12-03  3:11 ` [GIT PULL] 'at_least' array sizes for 6.19 pr-tracker-bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251130025006.GE12664@sol \
    --to=ebiggers@kernel.org \
    --cc=Jason@zx2c4.com \
    --cc=ardb@kernel.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=kees@kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miriam.rachel.korenblit@intel.com \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).