]> www.infradead.org Git - users/jedix/linux-maple.git/commit
arm64: Kconfig: force ARM64_PAN=y when enabling TTBR0 sw PAN
authorArd Biesheuvel <ardb@kernel.org>
Thu, 12 Dec 2024 08:18:47 +0000 (09:18 +0100)
committerWill Deacon <will@kernel.org>
Thu, 19 Dec 2024 17:23:53 +0000 (17:23 +0000)
commit92b6919d7fb29691a8bc5aca49044056683542ca
treeb644dad8b98269defb42840a4236e3280b42d39a
parent9d86c3c974348eb4220b637fae1a2466232078b7
arm64: Kconfig: force ARM64_PAN=y when enabling TTBR0 sw PAN

There are a couple of instances of Kconfig constraints where PAN must be
enabled too if TTBR0 sw PAN is enabled, primarily to avoid dealing with
the modified TTBR0_EL1 sysreg format that is used when 52-bit physical
addressing and/or CnP are enabled (support for either implies support
for hardware PAN as well, which will supersede PAN emulation if both are
available)

Let's simplify this, and always enable ARM64_PAN when enabling TTBR0 sw
PAN. This decouples the PAN configuration from the VA size selection,
permitting us to simplify the latter in subsequent patches. (Note that
PAN and TTBR0 sw PAN can still be disabled after this patch, but not
independently)

To avoid a convoluted circular Kconfig dependency involving KCSAN, make
ARM64_MTE select ARM64_PAN too, instead of depending on it.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20241212081841.2168124-13-ardb+git@google.com
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/Kconfig