* [PATCH] arm64: Inform user if software PAN is in use
@ 2017-11-29 23:39 Stephen Boyd
2018-01-16 10:57 ` Catalin Marinas
0 siblings, 1 reply; 2+ messages in thread
From: Stephen Boyd @ 2017-11-29 23:39 UTC (permalink / raw)
To: Catalin Marinas, Will Deacon; +Cc: linux-kernel, linux-arm-kernel
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.
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
---
arch/arm64/kernel/cpufeature.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c
index 21e2c95d24e7..c6f8da17146b 100644
--- a/arch/arm64/kernel/cpufeature.c
+++ b/arch/arm64/kernel/cpufeature.c
@@ -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();
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] arm64: Inform user if software PAN is in use
2017-11-29 23:39 [PATCH] arm64: Inform user if software PAN is in use Stephen Boyd
@ 2018-01-16 10:57 ` Catalin Marinas
0 siblings, 0 replies; 2+ messages in thread
From: Catalin Marinas @ 2018-01-16 10:57 UTC (permalink / raw)
To: Stephen Boyd; +Cc: Will Deacon, linux-kernel, linux-arm-kernel
On Wed, Nov 29, 2017 at 03:39:49PM -0800, Stephen Boyd wrote:
> 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.
>
> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Applied for 4.16. Thanks.
--
Catalin
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-01-16 10:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-29 23:39 [PATCH] arm64: Inform user if software PAN is in use Stephen Boyd
2018-01-16 10:57 ` Catalin Marinas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox