The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: Dylan Hatch <dylanbhatch@google.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	"David S . Miller" <davem@davemloft.net>,
	Nathan Chancellor <nathan@kernel.org>,
	Nicolas Schier <nsc@kernel.org>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Bill Wendling <morbo@google.com>,
	Justin Stitt <justinstitt@google.com>,
	Weinan Liu <wnliu@google.com>, Jens Remus <jremus@linux.ibm.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org,
	linux-crypto@vger.kernel.org, llvm@lists.linux.dev,
	Josh Poimboeuf <jpoimboe@kernel.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Ard Biesheuvel <ardb@kernel.org>,
	Indu Bhagat <ibhagatgnu@gmail.com>,
	Prasanna Kumar T S M <ptsm@linux.microsoft.com>,
	live-patching@vger.kernel.org
Subject: Re: [RFC PATCH 11/12] arm64, crypto/lib: annotate leaf functions with CFI info
Date: Tue, 17 Nov 2026 21:07:58 -0800	[thread overview]
Message-ID: <20261118050758.GD3400@sol> (raw)
In-Reply-To: <20261117043504.1021063-12-dylanbhatch@google.com>

On Tue, Nov 17, 2026 at 04:35:03AM +0000, Dylan Hatch wrote:
> Several arm64 assembly functions are leaf functions (they do not call
> other functions and do not modify x30). Add SYM_[TYPED_]LEAF_FUNC_*
> macros in <asm/linkage.h> that emit .cfi_startproc / .cfi_endproc so
> that .eh_frame entries are generated for these leaf functions and LR can
> be recovered by the unwinder when an exception is taken from one of
> them.
> 
> Signed-off-by: Dylan Hatch <dylanbhatch@google.com>
> ---
>  arch/arm64/crypto/aes-ce-ccm-core.S    | 12 +++----
>  arch/arm64/crypto/aes-neonbs-core.S    | 16 +++++-----
>  arch/arm64/crypto/ghash-ce-core.S      | 20 ++++++++----
>  arch/arm64/crypto/sm4-ce-ccm-core.S    | 16 +++++-----
>  arch/arm64/crypto/sm4-ce-cipher-core.S |  4 +--
>  arch/arm64/crypto/sm4-ce-core.S        | 44 +++++++++++++-------------
>  arch/arm64/crypto/sm4-ce-gcm-core.S    | 16 +++++-----
>  arch/arm64/crypto/sm4-neon-core.S      | 12 +++----
>  arch/arm64/include/asm/linkage.h       | 33 +++++++++++++++++++
>  arch/arm64/kernel/entry.S              |  7 ----
>  arch/arm64/lib/clear_user.S            |  4 +--
>  arch/arm64/lib/copy_from_user.S        |  4 +--
>  arch/arm64/lib/copy_page.S             |  4 +--
>  arch/arm64/lib/copy_to_user.S          |  4 +--
>  arch/arm64/lib/memchr.S                |  4 +--
>  arch/arm64/lib/memcmp.S                |  4 +--
>  arch/arm64/lib/memcpy.S                |  8 ++---
>  arch/arm64/lib/memset.S                |  8 ++---
>  arch/arm64/lib/mte.S                   | 28 ++++++++--------
>  arch/arm64/lib/strchr.S                |  4 +--
>  arch/arm64/lib/strcmp.S                |  4 +--
>  arch/arm64/lib/strlen.S                |  4 +--
>  arch/arm64/lib/strncmp.S               |  4 +--
>  arch/arm64/lib/strnlen.S               |  4 +--
>  arch/arm64/lib/strrchr.S               |  4 +--
>  arch/arm64/lib/tishift.S               | 12 +++----

Presumably you'll need to update lib/crypto/arm64/*.S and
lib/crc/arm64/*.S as well.

- Eric

  reply	other threads:[~2026-11-18  5:08 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-17  4:34 [RFC PATCH 00/12] arm64, unwind: add .lr_unwind unwinder for reliable stacktrace Dylan Hatch
2026-11-17  4:34 ` [RFC PATCH 01/12] arm64, unwind: build with .eh_frame and add gen_lr_unwind skeleton Dylan Hatch
2026-11-17  4:34 ` [RFC PATCH 02/12] arm64: factor .eh_frame parser out of patch-scs.c into <asm/eh_frame.h> Dylan Hatch
2026-11-17  4:34 ` [RFC PATCH 03/12] arm64: eh_frame: track CFA and x29/x30 register state in CFI parser Dylan Hatch
2026-11-17  4:34 ` [RFC PATCH 04/12] arm64, unwind: parse .eh_frame into .lr_unwind entries in gen_lr_unwind Dylan Hatch
2026-11-17  4:34 ` [RFC PATCH 05/12] scripts/gen_lr_unwind: emit .lr_unwind_fde and .lr_unwind_ranges Dylan Hatch
2026-11-17  4:34 ` [RFC PATCH 06/12] scripts/gen_lr_unwind: add --dump option to inspect .lr_unwind tables Dylan Hatch
2026-11-17  4:34 ` [RFC PATCH 07/12] scripts/sorttable: sort .lr_unwind_fde by start_offset Dylan Hatch
2026-11-17  4:35 ` [RFC PATCH 08/12] arm64, unwind: add in-kernel .lr_unwind lookup and validation Dylan Hatch
2026-11-17  4:35 ` [RFC PATCH 09/12] arm64/module, unwind: add .lr_unwind support for modules Dylan Hatch
2026-11-17  4:35 ` [RFC PATCH 10/12] arm64: entry: add unwind info for call_on_irq_stack() Dylan Hatch
2026-11-17  4:35 ` [RFC PATCH 11/12] arm64, crypto/lib: annotate leaf functions with CFI info Dylan Hatch
2026-11-18  5:07   ` Eric Biggers [this message]
2026-11-17  4:35 ` [RFC PATCH 12/12] unwind: arm64: use .lr_unwind to unwind interrupt frames Dylan Hatch

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=20261118050758.GD3400@sol \
    --to=ebiggers@kernel.org \
    --cc=ardb@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=davem@davemloft.net \
    --cc=dylanbhatch@google.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=ibhagatgnu@gmail.com \
    --cc=jpoimboe@kernel.org \
    --cc=jremus@linux.ibm.com \
    --cc=justinstitt@google.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=live-patching@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=mark.rutland@arm.com \
    --cc=morbo@google.com \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=nsc@kernel.org \
    --cc=ptsm@linux.microsoft.com \
    --cc=rostedt@goodmis.org \
    --cc=will@kernel.org \
    --cc=wnliu@google.com \
    /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