]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: imx6: mark OCRAM mapping read-only
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Tue, 21 Sep 2021 11:59:59 +0000 (12:59 +0100)
committerRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Tue, 19 Oct 2021 09:30:58 +0000 (10:30 +0100)
commit7a46251978869760531e8ef6e74489bbeab6ec7d
tree4feb29db78993c265fbafd8efcb3f6855b190b70
parente5d0df86bbf34b0568f99864da85ccdf3d072c56
ARM: imx6: mark OCRAM mapping read-only

iMX6 needs to write some code to OCRAM which resumes the DDR controller
after suspend. However, merely using __arm_ioremap_exec() causes the
kernel to complain of a W+X mapping. Solve this by using the newly
introduced __arm_iomem_set_ro() function to prevent inadvertent or
malicious writes to code we may later execute.

Tested-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
arch/arm/mach-imx/pm-imx6.c