Skip to contentSkip to conversation

arm64: Inform user if software PAN is in use

PATCH In review Stephen Boyd 2 participants 2 messages Nov 29, 2017 – Jan 16, 2018 arm64

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: Inform user if software PAN is in use

It isn't entirely obvious if we're using software PAN because we don't say anything about it in the boot log. But if we're using hardware PAN we'll print a nice CPU feature message indicating it. Add a print for software PAN too so we know if it's being used or not.

---
 arch/arm64/kernel/cpufeature.c | 3 +++
 1 file changed, 3 insertions(+)
arch/arm64/kernel/cpufeature.c +3 -0
index 21e2c95d24e7..c6f8da17146b 100644
@@ -1189,6 +1189,9 @@ void __init setup_cpu_features(void)
 	if (system_supports_32bit_el0())
 		setup_elf_hwcaps(compat_elf_hwcaps);
 
+	if (system_uses_ttbr0_pan())
+		pr_info("Emulating Privileged Access Never (PAN) using TTBR0_EL1 switching\n");
+
 	/* Advertise that we have computed the system capabilities */
 	set_sys_caps_initialised();
 
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
maintainer
#1 lore raw
Quoted 7 lines · Stephen Boyd

It isn't entirely obvious if we're using software PAN because we don't say anything about it in the boot log. But if we're using hardware PAN we'll print a nice CPU feature message indicating it. Add a print for software PAN too so we know if it's being used or not.

Applied for 4.16. Thanks.

Signature · 1 line
Catalin