Linux cryptographic layer development
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: linux-crypto@vger.kernel.org
Cc: Ard Biesheuvel <ardb@kernel.org>,
	"Jason A . Donenfeld" <Jason@zx2c4.com>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	x86@kernel.org, Eric Biggers <ebiggers@kernel.org>
Subject: [PATCH 0/3] lib/crypto: x86/sha: Follow the normal %rbp convention
Date: Sun, 11 Oct 2026 15:48:40 +0200	[thread overview]
Message-ID: <20261011134843.166585-1-ebiggers@kernel.org> (raw)

This series updates the x86 SHA-1, SHA-256, and SHA-512 assembly code to
set up %rbp before pushing GPRs rather than after, so that the frame
pointer unwinder will generate call traces reliably.

This doesn't matter much, given that the ORC unwinder is the default,
and the fallback to scanning the stack made call traces sort of "work"
anyway.  But it annoyed me that these assembly functions use the "wrong"
%rbp convention, differing from the C code.

This series is targeting libcrypto-next.

Eric Biggers (3):
  lib/crypto: x86/sha1: Follow the normal %rbp convention
  lib/crypto: x86/sha256: Follow the normal %rbp convention
  lib/crypto: x86/sha512: Follow the normal %rbp convention

 lib/crypto/x86/sha1-avx2-asm.S      | 10 +++++-----
 lib/crypto/x86/sha1-ssse3-and-avx.S |  9 +++++----
 lib/crypto/x86/sha256-avx-asm.S     | 10 +++++-----
 lib/crypto/x86/sha256-avx2-asm.S    | 10 ++++------
 lib/crypto/x86/sha256-ni-asm.S      |  9 +++++----
 lib/crypto/x86/sha256-ssse3-asm.S   |  8 ++++----
 lib/crypto/x86/sha512-avx-asm.S     | 11 ++++++-----
 lib/crypto/x86/sha512-avx2-asm.S    | 11 ++++++-----
 lib/crypto/x86/sha512-ssse3-asm.S   | 11 ++++++-----
 9 files changed, 46 insertions(+), 43 deletions(-)


base-commit: 6a50ce0af5c91fd665d65d357af8ae55db1df7d0
-- 
2.56.0


             reply	other threads:[~2026-10-11 13:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-11 13:48 Eric Biggers [this message]
2026-10-11 13:48 ` [PATCH 1/3] lib/crypto: x86/sha1: Follow the normal %rbp convention Eric Biggers
2026-10-11 13:48 ` [PATCH 2/3] lib/crypto: x86/sha256: " Eric Biggers
2026-10-11 13:48 ` [PATCH 3/3] lib/crypto: x86/sha512: " Eric Biggers
2026-10-12  5:22 ` [PATCH 0/3] lib/crypto: x86/sha: " Ard Biesheuvel
2026-10-13 17:30 ` Eric Biggers

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=20261011134843.166585-1-ebiggers@kernel.org \
    --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=x86@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