Thread (7 messages) read the whole thread 7 messages, 5 authors, 1d ago

Re: [RFC PATCH 9/9] arm64/debug: Mark debug exception helpers __always_inline

From: Nick Desaulniers <ndesaulniers@google.com>
Date: 2026-07-27 19:23:03
Also in: linux-arm-kernel, linux-mm, lkml, llvm

On Mon, Jul 27, 2026 at 5:25 AM Hongyan Xia [off-list ref] wrote:
From: Hongyan Xia <redacted>

Static inline should be enough to actually inline functions for most
compilers, but my Clang-19 somehow thinks it's better to outline them.
These tiny helpers then live in normal .text sections instead of
.noinstr sections, violating noinstr.
Anything special about your build or config?  For example, we've seen
a recent influx of bugs around AutoFDO not inlining functions (despite
constant propagating initdata constants into them) leading to modpost
errors.

Can you perhaps share your config so that someone else could repro and
take a look?

Happy to follow up in our issue tracker, too.
https://github.com/ClangBuiltLinux/linux/issues
Mark them __always_inline so the compiler can never outline them.

Signed-off-by: Hongyan Xia <redacted>
---
 arch/arm64/include/asm/esr.h       | 2 +-
 arch/arm64/include/asm/percpu.h    | 2 +-
 arch/arm64/include/asm/preempt.h   | 4 ++--
 arch/arm64/include/asm/ptrace.h    | 4 ++--
 arch/arm64/kernel/debug-monitors.c | 2 +-
 include/linux/kprobes.h            | 8 ++++----
It might not be appropriate for the changes to kprobes.h to go through
the arm64 tree, but maybe it is?

-- 
Thanks,
~Nick Desaulniers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help