This is a note to let you know that I've just added the patch titled ARM: OMAP2+: Fix l2dis_3630 for rodata to the 4.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: arm-omap2-fix-l2dis_3630-for-rodata.patch and it can be found in the queue-4.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From eeaf9646aca89d097861caa24d9818434e48810e Mon Sep 17 00:00:00 2001 From: Tony Lindgren <tony@xxxxxxxxxxx> Date: Thu, 14 Jan 2016 12:20:47 -0800 Subject: ARM: OMAP2+: Fix l2dis_3630 for rodata From: Tony Lindgren <tony@xxxxxxxxxxx> commit eeaf9646aca89d097861caa24d9818434e48810e upstream. We don't want to write to .text section. Let's move l2dis_3630 to .data and access it via a pointer. For calculating the offset, let's optimize out the add and do it in ldr/str as suggested by Nicolas Pitre <nicolas.pitre@xxxxxxxxxx>. Cc: Kees Cook <keescook@xxxxxxxxxxxx> Cc: Laura Abbott <labbott@xxxxxxxxxx> Cc: Nishanth Menon <nm@xxxxxx> Cc: Richard Woodruff <r-woodruff2@xxxxxx> Cc: Russell King <linux@xxxxxxxxxxxxxxxx> Cc: Tero Kristo <t-kristo@xxxxxx> Acked-by: Nicolas Pitre <nico@xxxxxxxxxx> Fixes: 1e6b48116a95 ("ARM: mm: allow non-text sections to be non-executable") Signed-off-by: Tony Lindgren <tony@xxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- arch/arm/mach-omap2/sleep34xx.S | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) --- a/arch/arm/mach-omap2/sleep34xx.S +++ b/arch/arm/mach-omap2/sleep34xx.S @@ -86,8 +86,9 @@ ENTRY(enable_omap3630_toggle_l2_on_resto stmfd sp!, {lr} @ save registers on stack /* Setup so that we will disable and enable l2 */ mov r1, #0x1 - adrl r2, l2dis_3630 @ may be too distant for plain adr - str r1, [r2] + adrl r3, l2dis_3630_offset @ may be too distant for plain adr + ldr r2, [r3] @ value for offset + str r1, [r2, r3] @ write to l2dis_3630 ldmfd sp!, {pc} @ restore regs and return ENDPROC(enable_omap3630_toggle_l2_on_restore) @@ -415,7 +416,9 @@ ENTRY(omap3_restore) cmp r2, #0x0 @ Check if target power state was OFF or RET bne logic_l1_restore - ldr r0, l2dis_3630 + adr r1, l2dis_3630_offset @ address for offset + ldr r0, [r1] @ value for offset + ldr r0, [r1, r0] @ value at l2dis_3630 cmp r0, #0x1 @ should we disable L2 on 3630? bne skipl2dis mrc p15, 0, r0, c1, c0, 1 @@ -486,7 +489,9 @@ l2_inv_gp: mov r12, #0x2 smc #0 @ Call SMI monitor (smieq) logic_l1_restore: - ldr r1, l2dis_3630 + adr r0, l2dis_3630_offset @ adress for offset + ldr r1, [r0] @ value for offset + ldr r1, [r0, r1] @ value at l2dis_3630 cmp r1, #0x1 @ Test if L2 re-enable needed on 3630 bne skipl2reen mrc p15, 0, r1, c1, c0, 1 @@ -515,6 +520,10 @@ control_stat: .word CONTROL_STAT control_mem_rta: .word CONTROL_MEM_RTA_CTRL +l2dis_3630_offset: + .long l2dis_3630 - . + + .data l2dis_3630: .word 0 Patches currently in stable-queue which might be from tony@xxxxxxxxxxx are queue-4.4/phy-twl4030-usb-relase-usb-phy-on-unload.patch queue-4.4/arm-omap2-fix-wait_dll_lock_timed-for-rodata.patch queue-4.4/arm-dts-fix-omap5-pmic-control-lines-for-rtc-writes.patch queue-4.4/arm-omap2-fix-l2_inv_api_params-for-rodata.patch queue-4.4/arm-omap2-fix-ppa_zero_params-and-ppa_por_params-for-rodata.patch queue-4.4/arm-omap2-fix-l2dis_3630-for-rodata.patch queue-4.4/arm-omap2-fix-save_secure_ram_context-for-rodata.patch queue-4.4/phy-twl4030-usb-fix-unbalanced-pm_runtime_enable-on-module-reload.patch queue-4.4/arm-dts-omap5-board-common-enable-rtc-and-charging-of-backup-battery.patch queue-4.4/arm-dts-fix-wl12xx-missing-clocks-that-cause-hangs.patch -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html