Skip to contentSkip to conversation

Fix regression from arm spectre patch series

PATCH Applied David Long 2 participants 3 messages Jan 25, 2019 – Jan 26, 2019 Stable branch

lore
Share & tools
lore

David Long

author
#0 lore raw

cover Fix regression from arm spectre patch series

From: "David A. Long" <[email protected]>

Backport upstream patch for regression introduced from spectre patch series. This was run through kernelci testing. Also the kernel was built with and without BIG_LITTLE and the symbol table was examined to verify the processor tables do not go into .rodata when BIG_LITTLE=n.

Russell King (1):
ARM: fix the cockup in the previous patch

 arch/arm/mm/proc-macros.S | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
2.17.1
author
#1 lore raw

PATCH 1/1 ARM: fix the cockup in the previous patch

From: Russell King <[email protected]>

Commit d6951f582cc50ba0ad22ef46b599740966599b14 upstream.

The intention in the previous patch was to only place the processor tables in the .rodata section if big.Little was being built and we wanted the branch target hardening, but instead (due to the way it was tested) it ended up always placing the tables into the .rodata section.

Although harmless, let's correct this anyway.

Fixes 3a4d0c2172bc ("ARM: ensure that processor vtables is not lost after boot")
---
 arch/arm/mm/proc-macros.S | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/mm/proc-macros.S +2 -2
index 19516fbc2c55..5461d589a1e2 100644
@@ -278,7 +278,7 @@
  * If we are building for big.Little with branch predictor hardening,
  * we need the processor function tables to remain available after boot.
  */
-#if 1 // defined(CONFIG_BIG_LITTLE) && defined(CONFIG_HARDEN_BRANCH_PREDICTOR)
+#if defined(CONFIG_BIG_LITTLE) && defined(CONFIG_HARDEN_BRANCH_PREDICTOR)
 	.section ".rodata"
 #endif
 	.type	\name\()_processor_functions, #object
@@ -316,7 +316,7 @@ ENTRY(\name\()_processor_functions)
 	.endif
 
 	.size	\name\()_processor_functions, . - \name\()_processor_functions
-#if 1 // defined(CONFIG_BIG_LITTLE) && defined(CONFIG_HARDEN_BRANCH_PREDICTOR)
+#if defined(CONFIG_BIG_LITTLE) && defined(CONFIG_HARDEN_BRANCH_PREDICTOR)
 	.previous
 #endif
 .endm
Signature · 1 line
2.17.1
maintainer Applied
#2 lore raw

Re: [PATCH 4.20 1/1] ARM: fix the cockup in the previous patch

Quoted 10 lines · David Long

From: Russell King <[email protected]>

Commit d6951f582cc50ba0ad22ef46b599740966599b14 upstream.

The intention in the previous patch was to only place the processor tables in the .rodata section if big.Little was being built and we wanted the branch target hardening, but instead (due to the way it was tested) it ended up always placing the tables into the .rodata section.

Quoted 5 lines

Although harmless, let's correct this anyway.

Fixes 3a4d0c2172bc ("ARM: ensure that processor vtables is not lost after boot")

Queued for 4.20, thank you.

--
Thanks,
Sasha