android_kernel_samsung_a7y1.../arch/arm
Will Deacon e88e8e52c0 ARM: 8898/1: mm: Don't treat faults reported from cache maintenance as writes
[ Upstream commit 834020366da9ab3fb87d1eb9a3160eb22dbed63a ]

Translation faults arising from cache maintenance instructions are
rather unhelpfully reported with an FSR value where the WnR field is set
to 1, indicating that the faulting access was a write. Since cache
maintenance instructions on 32-bit ARM do not require any particular
permissions, this can cause our private 'cacheflush' system call to fail
spuriously if a translation fault is generated due to page aging when
targetting a read-only VMA.

In this situation, we will return -EFAULT to userspace, although this is
unfortunately suppressed by the popular '__builtin___clear_cache()'
intrinsic provided by GCC, which returns void.

Although it's tempting to write this off as a userspace issue, we can
actually do a little bit better on CPUs that support LPAE, even if the
short-descriptor format is in use. On these CPUs, cache maintenance
faults additionally set the CM field in the FSR, which we can use to
suppress the write permission checks in the page fault handler and
succeed in performing cache maintenance to read-only areas even in the
presence of a translation fault.

Reported-by: Orion Hodson <oth@google.com>
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-04-07 07:43:32 +02:00
..
boot ARM: dts: rockchip: Mark that the rk3288 timer might stop in suspend 2020-04-06 20:26:42 +02:00
common A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
configs A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
crypto crypto: arm/aes-neonbs - don't access already-freed walk.iv 2020-04-06 18:12:55 +02:00
firmware A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
include ARM: avoid Cortex-A9 livelock on tight dmb loops 2020-04-06 14:52:03 +02:00
kernel ARM: 8839/1: kprobe: make patch_lock a raw_spinlock_t 2020-04-06 15:20:37 +02:00
kvm KVM: arm/arm64: Only skip MMIO insn once 2020-04-06 21:34:29 +02:00
lib ARM: 8833/1: Ensure that NEON code always compiles with Clang 2020-04-06 14:51:24 +02:00
mach-alpine A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-asm9260 A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-at91 A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-axxia A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-bcm A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-berlin A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-clps711x A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-cns3xxx A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-davinci ARM: davinci: fix sleep.S build error on ARMv4 2020-04-06 20:39:09 +02:00
mach-digicolor A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-dove A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-ebsa110 A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-efm32 A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-ep93xx A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-exynos ARM: exynos: Fix undefined instruction during Exynos5422 resume 2020-04-06 19:02:44 +02:00
mach-footbridge A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-gemini A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-highbank A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-hisi A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-imx ARM: imx: cpuidle-imx6sx: Restrict the SW2ISO increase to i.MX6SX 2020-04-06 19:16:50 +02:00
mach-integrator A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-iop13xx ARM: iop: don't use using 64-bit DMA masks 2020-04-06 16:42:32 +02:00
mach-iop32x A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-iop33x A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-ixp4xx A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-keystone A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-ks8695 A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-lpc18xx A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-lpc32xx A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-mediatek A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-meson A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-mmp A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-moxart A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-mv78xx0 A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-mvebu A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-mxs A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-netx A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-nomadik A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-nspire A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-omap1 A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-omap2 ARM: OMAP2+: Fix omap4 errata warning on other SoCs 2020-04-06 21:36:18 +02:00
mach-orion5x A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-picoxcell A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-prima2 A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-pxa A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-qcom A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-realview A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-rockchip A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-rpc ARM: riscpc: fix DMA 2020-04-06 20:26:38 +02:00
mach-s3c24xx A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-s3c64xx A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-s5pv210 A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-sa1100 A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-shmobile A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-socfpga A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-spear A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-sti A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-stm32 A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-sunxi A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-tegra A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-u300 A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-uniphier A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-ux500 A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-versatile A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-vexpress A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-vt8500 A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-w90x900 A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-zx A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mach-zynq ARM: zynq: Use memcpy_toio instead of memcpy on smp bring-up 2020-04-07 07:40:23 +02:00
mm ARM: 8898/1: mm: Don't treat faults reported from cache maintenance as writes 2020-04-07 07:43:32 +02:00
net A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
nwfpe A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
oprofile A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
plat-iop ARM: iop: don't use using 64-bit DMA masks 2020-04-06 16:42:32 +02:00
plat-omap A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
plat-orion ARM: orion: don't use using 64-bit DMA masks 2020-04-06 16:42:30 +02:00
plat-pxa A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
plat-samsung ARM: samsung: Limit SAMSUNG_PM_CHECK config option to non-Exynos platforms 2020-04-06 15:20:24 +02:00
plat-versatile A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
probes A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
tools A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
vdso A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
vfp A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
xen A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Kconfig ARM: 8510/1: rework ARM_CPU_SUSPEND dependencies 2020-04-06 12:51:57 +02:00
Kconfig-nommu A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Kconfig.debug A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Makefile A750FXXU4CTBC 2020-03-27 21:51:54 +05:30