1
0
Fork 0
remarkable-linux/arch/arm64
Shaokun Zhang 32bab0754d arm64: mm: remove page_mapping check in __sync_icache_dcache
[ Upstream commit 20c27a4270 ]

__sync_icache_dcache unconditionally skips the cache maintenance for
anonymous pages, under the assumption that flushing is only required in
the presence of D-side aliases [see 7249b79f6b ("arm64: Do not flush
the D-cache for anonymous pages")].

Unfortunately, this breaks migration of anonymous pages holding
self-modifying code, where userspace cannot be reasonably expected to
reissue maintenance instructions in response to a migration.

This patch fixes the problem by removing the broken page_mapping(page)
check from the cache syncing code, otherwise we may end up fetching and
executing stale instructions from the PoU.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: <stable@vger.kernel.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Shaokun Zhang <zhangshaokun@hisilicon.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
2016-07-10 20:20:00 -04:00
..
boot - dts: mt8173: fix compatible string 2015-06-01 17:06:51 +02:00
configs ARM: SoC 64-bit changes for v4.1 2015-04-22 09:23:58 -07:00
crypto Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2015-05-11 11:05:13 -07:00
include arm64: Ensure pmd_present() returns false after pmd_mknotpresent() 2016-06-03 19:15:49 -04:00
kernel arm64: replace read_lock to rcu lock in call_step_hook 2016-03-24 08:40:20 -04:00
kvm kvm: arm64: Fix EC field in inject_abt64 2016-06-06 19:12:32 -04:00
lib arm64: __clear_user: handle exceptions on strb 2014-11-13 15:21:26 +00:00
mm arm64: mm: remove page_mapping check in __sync_icache_dcache 2016-07-10 20:20:00 -04:00
net arm64: bpf: fix mod-by-zero case 2016-01-31 11:23:39 -08:00
xen arm: xen: implement multicall hypercall support. 2014-04-24 13:09:46 +01:00
Kconfig arm64: errata: add module build workaround for erratum #843419 2015-09-29 19:26:00 +02:00
Kconfig.debug coresight: moving to new "hwtracing" directory 2015-04-03 16:17:04 +02:00
Makefile arm64: errata: Add -mpc-relative-literal-loads to build flags 2016-04-18 08:51:10 -04:00