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

Catalin Marinas
2026-04-27T13:45:06Z

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