[PATCH 3/3] arm64: Unconditionally enable EPAN support
Will Deacon
will at kernel.org
Thu Jan 22 02:15:56 PST 2026
On Wed, Jan 07, 2026 at 06:07:01PM +0000, Marc Zyngier wrote:
> While FEAT_PAN3 is pretty recent, having it permanently enabled costs
> exactly nothing, and does help with exec-only mappings on these fancy
> ARMv9.2 machines that are rumoured to exist.
I'm not sure it's _entirely_ accurate to say this one costs us "exactly
nothing":
> diff --git a/arch/arm64/include/asm/cpucaps.h b/arch/arm64/include/asm/cpucaps.h
> index 177c691914f87..13c0fa54ea19f 100644
> --- a/arch/arm64/include/asm/cpucaps.h
> +++ b/arch/arm64/include/asm/cpucaps.h
> @@ -19,8 +19,6 @@ cpucap_is_possible(const unsigned int cap)
> "cap must be < ARM64_NCAPS");
>
> switch (cap) {
> - case ARM64_HAS_EPAN:
> - return IS_ENABLED(CONFIG_ARM64_EPAN);
> case ARM64_SVE:
> return IS_ENABLED(CONFIG_ARM64_SVE);
> case ARM64_SME:
as this means cpus_have_cap(EPAN) always ends up doing a test_bit(). It's
not exactly expensive, but it feels a little premature when compared to
PAN and LSE so I'll probably just take those changes for now.
Will
More information about the linux-arm-kernel
mailing list