[PATCH v2] arm64/irqflags: __always_inline the arch_local_irq_*() helpers

Catalin Marinas catalin.marinas at arm.com
Mon Apr 27 06:44:44 PDT 2026


On Tue, 21 Apr 2026 08:58:57 -0700, Breno Leitao wrote:
> The arch_local_irq_*() wrappers in <asm/irqflags.h> dispatch between two
> underlying primitives: the __daif_* path on most systems, and the
> __pmr_* path on builds that use GIC PMR-based masking (Pseudo-NMI). The
> leaf primitives are already __always_inline, but the wrappers themselves
> are plain "static inline".
> 
> That is unsafe for noinstr callers: nothing prevents the compiler from
> emitting an out-of-line copy of e.g. arch_local_irq_disable(), and an
> out-of-line copy can be instrumented (ftrace, kcov, sanitizers), which
> breaks the noinstr contract on the entry/idle paths that rely on these
> helpers.
> 
> [...]

Applied to arm64 (for-next/fixes), thanks!

[1/1] arm64/irqflags: __always_inline the arch_local_irq_*() helpers
      https://git.kernel.org/arm64/c/caecde119e34



More information about the linux-arm-kernel mailing list