android_kernel_oneplus_msm8998/arch/mips
Paul Burton 262ea6c0c4 MIPS: VDSO: Match data page cache colouring when D$ aliases
commit 0f02cfbc3d9e413d450d8d0fd660077c23f67eff upstream.

When a system suffers from dcache aliasing a user program may observe
stale VDSO data from an aliased cache line. Notably this can break the
expectation that clock_gettime(CLOCK_MONOTONIC, ...) is, as its name
suggests, monotonic.

In order to ensure that users observe updates to the VDSO data page as
intended, align the user mappings of the VDSO data page such that their
cache colouring matches that of the virtual address range which the
kernel will use to update the data page - typically its unmapped address
within kseg0.

This ensures that we don't introduce aliasing cache lines for the VDSO
data page, and therefore that userland will observe updates without
requiring cache invalidation.

Signed-off-by: Paul Burton <paul.burton@mips.com>
Reported-by: Hauke Mehrtens <hauke@hauke-m.de>
Reported-by: Rene Nielsen <rene.nielsen@microsemi.com>
Reported-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Fixes: ebb5e78cc6 ("MIPS: Initial implementation of a VDSO")
Patchwork: https://patchwork.linux-mips.org/patch/20344/
Tested-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Tested-by: Hauke Mehrtens <hauke@hauke-m.de>
Cc: James Hogan <jhogan@kernel.org>
Cc: linux-mips@linux-mips.org
Cc: stable@vger.kernel.org # v4.4+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-26 08:35:10 +02:00
..
alchemy
ar7 MIPS: AR7: ensure the port type's FCR value is used 2018-01-23 19:50:18 +01:00
ath25 MIPS: ath25: Check for kzalloc allocation failure 2018-03-18 11:17:49 +01:00
ath79 MIPS: ath79: fix system restart 2018-09-26 08:35:05 +02:00
bcm47xx Revert "MIPS: BCM47XX: Enable 74K Core ExternalSync for PCIe erratum" 2018-09-05 09:18:36 +02:00
bcm63xx
bmips
boot
cavium-octeon MIPS: Octeon: add missing of_node_put() 2018-09-19 22:48:58 +02:00
cobalt
configs MIPS: Update lemote2f_defconfig for CPU_FREQ_STAT change 2017-03-18 19:09:56 +08:00
dec MIPS: DEC: Avoid la pseudo-instruction in delay slots 2017-03-18 19:09:57 +08:00
emma
fw
include MIPS: ath79: fix system restart 2018-09-26 08:35:05 +02:00
jazz
jz4740 MIPS: jz4740: Bump zload address 2018-09-26 08:35:06 +02:00
kernel MIPS: VDSO: Match data page cache colouring when D$ aliases 2018-09-26 08:35:10 +02:00
kvm KVM: Fix spelling mistake: "cop_unsuable" -> "cop_unusable" 2018-05-30 07:48:50 +02:00
lantiq MIPS: Lantiq: Fix another request_mem_region() return code check 2017-10-08 10:14:18 +02:00
lasat
lib MIPS: lib: Provide MIPS64r6 __multi3() for GCC < 7 2018-09-05 09:18:40 +02:00
loongson32
loongson64 MIPS: loongson64: cs5536: Fix PCI_OHCI_INT_REG reads 2018-09-26 08:35:09 +02:00
math-emu MIPS: math-emu: Fix final emulation phase for certain instructions 2017-12-25 14:22:15 +01:00
mm MIPS: WARN_ON invalid DMA cache maintenance, not BUG_ON 2018-09-19 22:48:59 +02:00
mti-malta
mti-sead3
net MIPS: BPF: Fix multiple problems in JIT skb access helpers. 2018-03-22 09:23:25 +01:00
netlogic MIPS: Netlogic: Exclude netlogic,xlp-pic code from XLR builds 2017-11-21 09:21:22 +01:00
oprofile
paravirt
pci
pistachio
pmcs-msp71xx
pnx833x
power
ralink MIPS: ralink: Remove ralink_halt() 2018-03-28 18:40:12 +02:00
rb532
sgi-ip22 MIPS: ip22: Fix ip28 build for modern gcc 2017-03-18 19:09:56 +08:00
sgi-ip27
sgi-ip32
sibyte
sni
txx9 MIPS: TXx9: use IS_BUILTIN() for CONFIG_LEDS_CLASS 2018-05-30 07:48:56 +02:00
vdso
vr41xx
xilfpga
Kbuild
Kbuild.platforms
Kconfig MIPS: fix Select HAVE_IRQ_EXIT_ON_IRQ_STACK patch. 2017-04-21 09:30:08 +02:00
Kconfig.debug
Makefile