Skip to content

Commit 80f6b63

Browse files
Russell KingLee Jones
authored andcommitted
ARM: fix the cockup in the previous patch
Commit d6951f5 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: 3a4d0c2 ("ARM: ensure that processor vtables is not lost after boot") Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by: David A. Long <dave.long@linaro.org> Reviewed-by: Julien Thierry <julien.thierry@arm.com> Signed-off-by: Sasha Levin <sashal@kernel.org> Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Lee Jones <lee.jones@linaro.org> Change-Id: Id94afd94c4897cd2755bb2fa51975e9ef2d65bd2
1 parent 11ca2bd commit 80f6b63

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

arch/arm/mm/proc-macros.S

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@
263263
* If we are building for big.Little with branch predictor hardening,
264264
* we need the processor function tables to remain available after boot.
265265
*/
266-
#if 1 // defined(CONFIG_BIG_LITTLE) && defined(CONFIG_HARDEN_BRANCH_PREDICTOR)
266+
#if defined(CONFIG_BIG_LITTLE) && defined(CONFIG_HARDEN_BRANCH_PREDICTOR)
267267
.section ".rodata"
268268
#endif
269269
.type \name\()_processor_functions, #object
@@ -300,7 +300,7 @@ ENTRY(\name\()_processor_functions)
300300
.endif
301301

302302
.size \name\()_processor_functions, . - \name\()_processor_functions
303-
#if 1 // defined(CONFIG_BIG_LITTLE) && defined(CONFIG_HARDEN_BRANCH_PREDICTOR)
303+
#if defined(CONFIG_BIG_LITTLE) && defined(CONFIG_HARDEN_BRANCH_PREDICTOR)
304304
.previous
305305
#endif
306306
.endm

0 commit comments

Comments
 (0)