android_kernel_motorola_sm6225/arch/powerpc
Nicholas Piggin ff5bc793e4 powerpc/64s/radix: Fix missing ptesync in flush_cache_vmap
There is a typo in f1cb8f9beb ("powerpc/64s/radix: avoid ptesync after
set_pte and ptep_set_access_flags") config ifdef, which results in the
necessary ptesync not being issued after vmalloc.

This causes random kernel faults in module load, bpf load, anywhere
that vmalloc mappings are used.

After correcting the code, this survives a guest kernel booting
hundreds of times where previously there would be a crash every few
boots (I haven't noticed the crash on host, perhaps due to different
TLB and page table walking behaviour in hardware).

A memory clobber is also added to the flush, just to be sure it won't
be reordered with the pte set or the subsequent mapping access.

Fixes: f1cb8f9beb ("powerpc/64s/radix: avoid ptesync after set_pte and ptep_set_access_flags")
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2018-06-06 18:50:53 +10:00
..
boot powerpc/boot: Remove core support for Marvell mv64x60 hostbridges 2018-06-04 00:39:23 +10:00
configs powerpc/embedded6xx: Remove C2K board support 2018-06-04 00:39:22 +10:00
crypto crypto: hash - annotate algorithms taking optional key 2018-01-12 23:03:35 +11:00
include powerpc/64s/radix: Fix missing ptesync in flush_cache_vmap 2018-06-06 18:50:53 +10:00
kernel powerpc: fix build failure by disabling attribute-alias warning in pci_32 2018-06-05 21:34:20 +10:00
kvm Merge branch 'topic/ppc-kvm' into next 2018-05-15 22:28:19 +10:00
lib powerpc/lib: optimise PPC32 memcmp 2018-06-04 00:39:21 +10:00
math-emu License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mm powerpc/pkeys: Detach execute_only key on !PROT_EXEC 2018-06-05 11:03:25 +10:00
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-03-05 11:29:24 -08:00
oprofile powerpc: Use sizeof(*foo) rather than sizeof(struct foo) 2018-03-20 16:47:53 +11:00
perf powerpc/perf: Unregister thread-imc if core-imc not supported 2018-06-03 20:43:37 +10:00
platforms powerpc-opal: fix spelling mistake "Uniterrupted" -> "Uninterrupted" 2018-06-05 11:33:47 +10:00
purgatory License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sysdev powerpc: Remove core support for Marvell mv64x60 hostbridges 2018-06-04 00:39:23 +10:00
tools powerpc/kbuild: Use flags variables rather than overriding LD/CC/AS 2018-06-01 23:08:09 +10:00
xmon powerpc/64: Save stack pointer when we hard disable interrupts 2018-06-03 20:43:42 +10:00
Kconfig powerpc: always enable RTC_LIB 2018-06-03 20:43:33 +10:00
Kconfig.debug powerpc: Add new kconfig CONFIG_PPC_IRQ_SOFT_MASK_DEBUG 2018-01-19 22:37:03 +11:00
Makefile powerpc/Makefile: set -mcpu=860 flag for the 8xx 2018-06-04 00:39:20 +10:00
Makefile.postlink License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00