ARM: OMAP2+: Fix save_secure_ram_context for rodata
We don't want to write to .text and we can move save_secure_ram_context
into .data as it all gets copied into SRAM anyways.
Cc: Kees Cook <keescook@chromium.org>
Cc: Laura Abbott <labbott@redhat.com>
Cc: Nishanth Menon <nm@ti.com>
Cc: Richard Woodruff <r-woodruff2@ti.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Cc: Tero Kristo <t-kristo@ti.com>
Acked-by: Nicolas Pitre <nico@linaro.org>
Cc: stable@vger.kernel.org # v4.0+
Fixes: 1e6b48116a
("ARM: mm: allow non-text sections to be
non-executable")
Signed-off-by: Tony Lindgren <tony@atomide.com>
This commit is contained in:
@@ -92,8 +92,12 @@ ENTRY(enable_omap3630_toggle_l2_on_restore)
|
|||||||
ldmfd sp!, {pc} @ restore regs and return
|
ldmfd sp!, {pc} @ restore regs and return
|
||||||
ENDPROC(enable_omap3630_toggle_l2_on_restore)
|
ENDPROC(enable_omap3630_toggle_l2_on_restore)
|
||||||
|
|
||||||
.text
|
/*
|
||||||
/* Function to call rom code to save secure ram context */
|
* Function to call rom code to save secure ram context. This gets
|
||||||
|
* relocated to SRAM, so it can be all in .data section. Otherwise
|
||||||
|
* we need to initialize api_params separately.
|
||||||
|
*/
|
||||||
|
.data
|
||||||
.align 3
|
.align 3
|
||||||
ENTRY(save_secure_ram_context)
|
ENTRY(save_secure_ram_context)
|
||||||
stmfd sp!, {r4 - r11, lr} @ save registers on stack
|
stmfd sp!, {r4 - r11, lr} @ save registers on stack
|
||||||
@@ -127,6 +131,8 @@ ENDPROC(save_secure_ram_context)
|
|||||||
ENTRY(save_secure_ram_context_sz)
|
ENTRY(save_secure_ram_context_sz)
|
||||||
.word . - save_secure_ram_context
|
.word . - save_secure_ram_context
|
||||||
|
|
||||||
|
.text
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ======================
|
* ======================
|
||||||
* == Idle entry point ==
|
* == Idle entry point ==
|
||||||
|
Reference in New Issue
Block a user