linux/arch
Nicholas Piggin ef5cbcb6bf nios2: update_mmu_cache clear the old entry from the TLB
Fault paths like do_read_fault will install a Linux pte with the young
bit clear. The CPU will fault again because the TLB has not been
updated, this time a valid pte exists so handle_pte_fault will just
set the young bit with ptep_set_access_flags, which flushes the TLB.

The TLB is flushed so the next attempt will go to the fast TLB handler
which loads the TLB with the new Linux pte. The access then proceeds.

This design is fragile to depend on the young bit being clear after
the initial Linux fault. A proposed core mm change to immediately set
the young bit upon such a fault, results in ptep_set_access_flags not
flushing the TLB because it finds no change to the pte. The spurious
fault fix path only flushes the TLB if the access was a store. If it
was a load, then this results in an infinite loop of page faults.

This change adds a TLB flush in update_mmu_cache, which removes that
TLB entry upon the first fault. This will cause the fast TLB handler
to load the new pte and avoid the Linux page fault entirely.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
2019-03-07 05:29:35 +08:00
..
alpha alpha: fix page fault handling for r16-r18 targets 2019-02-10 20:42:23 -08:00
arc ARCv2: don't assume core 0x54 has dual issue 2019-02-21 14:53:36 -08:00
arm ARM: SoC fixes for v5.0 2019-03-02 16:43:15 -08:00
arm64 ARM: SoC fixes for v5.0 2019-03-02 16:43:15 -08:00
c6x arch: unexport asm/shmparam.h for all architectures 2019-02-01 15:46:22 -08:00
csky csky: Fixup dead loop in show_stack 2019-02-13 09:48:14 +08:00
h8300 arch: unexport asm/shmparam.h for all architectures 2019-02-01 15:46:22 -08:00
hexagon arch: unexport asm/shmparam.h for all architectures 2019-02-01 15:46:22 -08:00
ia64 ia64: remove redundant 'export AWK' 2019-01-16 23:31:18 +09:00
m68k for-linus-20190209 2019-02-09 10:26:09 -08:00
microblaze arch: unexport asm/shmparam.h for all architectures 2019-02-01 15:46:22 -08:00
mips Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-03-02 08:46:34 -08:00
nds32 nds32: remove unneeded code in arch/nds32/Makefile 2019-01-17 23:42:37 +09:00
nios2 nios2: update_mmu_cache clear the old entry from the TLB 2019-03-07 05:29:35 +08:00
openrisc arch: unexport asm/shmparam.h for all architectures 2019-02-01 15:46:22 -08:00
parisc parisc: Fix ptrace syscall number modification 2019-02-21 20:10:46 +01:00
powerpc powerpc fixes for 5.0 #6 2019-02-23 11:13:50 -08:00
riscv Revert "RISC-V: Make BSS section as the last section in vmlinux.lds.S" 2019-02-11 15:24:45 -08:00
s390 KVM: s390: Fix crypto handling for nested KVM 2019-02-20 23:48:55 +01:00
sh sh: fix build error for invisible CONFIG_BUILTIN_DTB_SOURCE 2019-02-13 23:29:42 +09:00
sparc arch: remove redundant UAPI generic-y defines 2019-01-06 10:22:15 +09:00
um Merge branch 'akpm' (patches from Andrew) 2019-01-05 09:16:18 -08:00
unicore32 arch: unexport asm/shmparam.h for all architectures 2019-02-01 15:46:22 -08:00
x86 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2019-03-02 11:47:29 -08:00
xtensa xtensa: SMP: limit number of possible CPUs by NR_CPUS 2019-01-27 10:04:30 -08:00
.gitignore
Kconfig jump_label: move 'asm goto' support test to Kconfig 2019-01-06 09:46:51 +09:00