All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: linux-crypto@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Ard Biesheuvel <ardb@kernel.org>,
	"Jason A . Donenfeld" <Jason@zx2c4.com>,
	Herbert Xu <herbert@gondor.apana.org.au>
Subject: Re: [PATCH] lib/crypto: x86/aes-ctr: Remove some unreachable code
Date: Fri, 2 Oct 2026 14:42:45 -0700	[thread overview]
Message-ID: <20261002214245.GB3006@quark> (raw)
In-Reply-To: <20261002034405.49886-1-ebiggers@kernel.org>

On Thu, Oct 01, 2026 at 08:44:05PM -0700, Eric Biggers wrote:
> In the AES-CTR and AES-XCTR code that handles a remainder of '4*VL < LEN
> < 8*VL', first 4 full vectors are processed, leaving 0 < LEN < 4*VL.
> After that, five different cases are handled depending on whether there
> are 0, 1, 2, 3, or 4 full vectors remaining.  But the case of 4 vectors
> is never reached there, making the code handling it unused.  Remove it.
> 
> With that done, the '.Lxor_tail_partial_vec_3\@' block would be reached
> only via an unconditional jump.  Therefore, relocate it to the only
> place that jumps to it.  This allows removing the jump at the end of the
> '.Lxor_tail_partial_vec_2\@' block and making it fall through.
> 
> Signed-off-by: Eric Biggers <ebiggers@kernel.org>
> ---
>  lib/crypto/x86/aes-ctr-avx-x86_64.S | 18 ++++++------------
>  1 file changed, 6 insertions(+), 12 deletions(-)

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git/log/?h=libcrypto-next

- Eric

      parent reply	other threads:[~2026-10-02 21:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-02  3:44 [PATCH] lib/crypto: x86/aes-ctr: Remove some unreachable code Eric Biggers
2026-10-02  9:35 ` Ard Biesheuvel
2026-10-02 21:42 ` 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=20261002214245.GB3006@quark \
    --to=ebiggers@kernel.org \
    --cc=Jason@zx2c4.com \
    --cc=ardb@kernel.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.