* [PATCH v2 0/2] arm64: cpufeature: Relocate PAN emulation report
@ 2018-02-21 18:18 Kees Cook
2018-02-21 18:18 ` [PATCH v2 1/2] " Kees Cook
2018-02-21 18:18 ` [PATCH v2 2/2] arm64: cpufeature: Remove redundant "feature" in reports Kees Cook
0 siblings, 2 replies; 3+ messages in thread
From: Kees Cook @ 2018-02-21 18:18 UTC (permalink / raw)
To: Catalin Marinas
Cc: Kees Cook, Mark Rutland, Dave Martin, Will Deacon,
Suzuki K Poulose, linux-arm-kernel, linux-kernel
This splits the PAN emulation report relocation and the cpufeatures
reporting wording adjustment patches, as discussed with Mark and Dave.
Thanks!
-Kees
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v2 1/2] arm64: cpufeature: Relocate PAN emulation report
2018-02-21 18:18 [PATCH v2 0/2] arm64: cpufeature: Relocate PAN emulation report Kees Cook
@ 2018-02-21 18:18 ` Kees Cook
2018-02-21 18:18 ` [PATCH v2 2/2] arm64: cpufeature: Remove redundant "feature" in reports Kees Cook
1 sibling, 0 replies; 3+ messages in thread
From: Kees Cook @ 2018-02-21 18:18 UTC (permalink / raw)
To: Catalin Marinas
Cc: Kees Cook, Mark Rutland, Dave Martin, Will Deacon,
Suzuki K Poulose, linux-arm-kernel, linux-kernel
The PAN emulation notification was only happening for non-boot CPUs
if CPU capabilities had already been configured. This seems to be the
wrong place, as it's system-wide and isn't attached to capabilities,
so its reporting didn't normally happen. Instead, report it once from
the boot CPU.
Before (missing PAN emulation report):
SMP: Total of 4 processors activated.
CPU features: detected feature: 32-bit EL0 Support
CPU features: detected feature: Kernel page table isolation (KPTI)
CPU: All CPU(s) started at EL2
After:
SMP: Total of 4 processors activated.
CPU features: detected feature: 32-bit EL0 Support
CPU features: detected feature: Kernel page table isolation (KPTI)
CPU features: emulated: Privileged Access Never (PAN) using TTBR0_EL1 switching
CPU: All CPU(s) started at EL2
Signed-off-by: Kees Cook <keescook@chromium.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
---
arch/arm64/kernel/cpufeature.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c
index 29b1f873e337..61aff55245ea 100644
--- a/arch/arm64/kernel/cpufeature.c
+++ b/arch/arm64/kernel/cpufeature.c
@@ -1333,9 +1333,6 @@ static void verify_local_cpu_capabilities(void)
if (system_supports_sve())
verify_sve_features();
-
- if (system_uses_ttbr0_pan())
- pr_info("Emulating Privileged Access Never (PAN) using TTBR0_EL1 switching\n");
}
void check_local_cpu_capabilities(void)
@@ -1394,6 +1391,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("emulated: Privileged Access Never (PAN) using TTBR0_EL1 switching\n");
+
sve_setup();
/* Advertise that we have computed the system capabilities */
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH v2 2/2] arm64: cpufeature: Remove redundant "feature" in reports
2018-02-21 18:18 [PATCH v2 0/2] arm64: cpufeature: Relocate PAN emulation report Kees Cook
2018-02-21 18:18 ` [PATCH v2 1/2] " Kees Cook
@ 2018-02-21 18:18 ` Kees Cook
1 sibling, 0 replies; 3+ messages in thread
From: Kees Cook @ 2018-02-21 18:18 UTC (permalink / raw)
To: Catalin Marinas
Cc: Kees Cook, Mark Rutland, Dave Martin, Will Deacon,
Suzuki K Poulose, linux-arm-kernel, linux-kernel
The word "feature" is repeated in the CPU features reporting. This drops it
for improved readability.
Before (redundant "feature" word):
SMP: Total of 4 processors activated.
CPU features: detected feature: 32-bit EL0 Support
CPU features: detected feature: Kernel page table isolation (KPTI)
CPU features: emulated: Privileged Access Never (PAN) using TTBR0_EL1 switching
CPU: All CPU(s) started at EL2
After:
SMP: Total of 4 processors activated.
CPU features: detected: 32-bit EL0 Support
CPU features: detected: Kernel page table isolation (KPTI)
CPU features: emulated: Privileged Access Never (PAN) using TTBR0_EL1 switching
CPU: All CPU(s) started at EL2
Signed-off-by: Kees Cook <keescook@chromium.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
---
arch/arm64/kernel/cpufeature.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c
index 61aff55245ea..6c799ca58b53 100644
--- a/arch/arm64/kernel/cpufeature.c
+++ b/arch/arm64/kernel/cpufeature.c
@@ -1357,7 +1357,7 @@ void check_local_cpu_capabilities(void)
static void __init setup_feature_capabilities(void)
{
- update_cpu_capabilities(arm64_features, "detected feature:");
+ update_cpu_capabilities(arm64_features, "detected:");
enable_cpu_capabilities(arm64_features);
}
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-02-21 18:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-21 18:18 [PATCH v2 0/2] arm64: cpufeature: Relocate PAN emulation report Kees Cook
2018-02-21 18:18 ` [PATCH v2 1/2] " Kees Cook
2018-02-21 18:18 ` [PATCH v2 2/2] arm64: cpufeature: Remove redundant "feature" in reports Kees Cook
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).