Re: [RFC PATCH 11/12] arm64, crypto/lib: annotate leaf functions with CFI info

From
Eric Biggers <ebiggers@kernel.org>
Date
2026-11-18 05:08:01
Also in
linux-arm-kernel, linux-crypto, linux-kbuild, lkml, llvm
Reply to
Dylan Hatch, 2026-11-17
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 <redacted>
---
 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
Thread (18 messages) 18 messages, 3 authors, last reply 6d ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help