提交 bdd8fd8a 编写于 作者: R Russell King 提交者: Greg Kroah-Hartman

ARM: fix the cockup in the previous patch

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")
Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: NDavid A. Long <dave.long@linaro.org>
Reviewed-by: NJulien Thierry <julien.thierry@arm.com>
Tested-by: NJulien Thierry <julien.thierry@arm.com>
Signed-off-by: NSasha Levin <sashal@kernel.org>
上级 e7a8dabe
...@@ -278,7 +278,7 @@ ...@@ -278,7 +278,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
...@@ -316,7 +316,7 @@ ENTRY(\name\()_processor_functions) ...@@ -316,7 +316,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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册