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: Hongyan Xia <hidden>
Date: 2026-07-28 02:04:17
Also in: linux-arm-kernel, linux-mm, lkml, llvm

On 7/28/2026 3:22 AM, Nick Desaulniers wrote:
On Mon, Jul 27, 2026 at 5:25 AM Hongyan Xia [off-list ref] wrote:
quoted
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.
I doubt there's anything special. The compiler is Debian clang version
19.1.7 (3+b1) installed through apt install in vanilla x86_64 Debian
Trixie, compiled with 'make LLVM=1 ARCH=arm64 Image'.
Can you perhaps share your config so that someone else could repro and
take a look?
Sure. Not sure how I can share the giant config without bombarding all
the recipients. Let me just send to you privately first.
Happy to follow up in our issue tracker, too.
https://github.com/ClangBuiltLinux/linux/issues
quoted
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?
I see Will has replied, so this might be a question for Kprobe
maintainers. I do wonder that, if I see this in clang-19 compiling for
arm64 without any special configs, eventually it might happen for other
people after moving to clang-19?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help