• Tony Lindgren's avatar
    ARM: OMAP2+: Fix l2dis_3630 for rodata · 2c0fae21
    Tony Lindgren authored
    [ Upstream commit eeaf9646 ]
    
    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@linaro.org>.
    
    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: Tero Kristo <t-kristo@ti.com>
    Cc: stable@vger.kernel.org # v4.0+
    Acked-by: default avatarNicolas Pitre <nico@linaro.org>
    Cc: stable@vger.kernel.org # v4.0+
    Fixes: 1e6b4811 ("ARM: mm: allow non-text sections to be
    non-executable")
    Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
    Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
    2c0fae21
sleep34xx.S 15.3 KB