Linux FSCRYPT development
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: linux-fscrypt@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fscrypt: Replace some variable-size memsets with fixed-size
Date: Mon, 20 Jul 2026 10:47:06 -0700	[thread overview]
Message-ID: <20260720174706.GE1865@quark> (raw)
In-Reply-To: <20260718205606.50713-1-ebiggers@kernel.org>

On Sat, Jul 18, 2026 at 01:56:06PM -0700, Eric Biggers wrote:
> For zeroing IVs and raw keys, remove the misguided optimization of
> zeroing the actual size used (typically 16 and 64 bytes respectively)
> instead of the max size (32 and 64 bytes respectively).  Using a
> compile-time constant size allows the compiler to specialize the memset
> for that size (typically by inlining a few 'mov' instructions), which
> is more important than zeroing a few extra bytes with these small sizes.
> 
> Signed-off-by: Eric Biggers <ebiggers@kernel.org>
> ---
>  fs/crypto/crypto.c      | 2 +-
>  fs/crypto/keysetup.c    | 4 ++--
>  fs/crypto/keysetup_v1.c | 2 +-
>  3 files changed, 4 insertions(+), 4 deletions(-)

Applied to https://git.kernel.org/pub/scm/fs/fscrypt/linux.git/log/?h=for-next

- Eric

      reply	other threads:[~2026-07-20 17:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-18 20:56 [PATCH] fscrypt: Replace some variable-size memsets with fixed-size Eric Biggers
2026-07-20 17:47 ` Eric Biggers [this message]

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=20260720174706.GE1865@quark \
    --to=ebiggers@kernel.org \
    --cc=linux-fscrypt@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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