Commit 96f91c3d authored by Russell King's avatar Russell King Committed by Stefan Bader

ARM: fix the cockup in the previous patch

BugLink: https://bugs.launchpad.net/bugs/1852110

Commit d6951f58 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: 3a4d0c21 ("ARM: ensure that processor vtables is not lost after boot")
Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: default avatarDavid A. Long <dave.long@linaro.org>
Reviewed-by: default avatarJulien Thierry <julien.thierry@arm.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarArd Biesheuvel <ardb@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarConnor Kuehl <connor.kuehl@canonical.com>
Signed-off-by: default avatarKhalid Elmously <khalid.elmously@canonical.com>
parent 72a87bec
...@@ -263,7 +263,7 @@ ...@@ -263,7 +263,7 @@
* If we are building for big.Little with branch predictor hardening, * If we are building for big.Little with branch predictor hardening,
* we need the processor function tables to remain available after boot. * 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" .section ".rodata"
#endif #endif
.type \name\()_processor_functions, #object .type \name\()_processor_functions, #object
...@@ -301,7 +301,7 @@ ENTRY(\name\()_processor_functions) ...@@ -301,7 +301,7 @@ ENTRY(\name\()_processor_functions)
.endif .endif
.size \name\()_processor_functions, . - \name\()_processor_functions .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 .previous
#endif #endif
.endm .endm
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment