linux-stable/arch/riscv/mm
Guo Ren 2322c78f90 riscv: Fixup race condition on PG_dcache_clean in flush_icache_pte
commit 950b879b7f upstream.

In commit 588a513d34 ("arm64: Fix race condition on PG_dcache_clean
in __sync_icache_dcache()"), we found RISC-V has the same issue as the
previous arm64. The previous implementation didn't guarantee the correct
sequence of operations, which means flush_icache_all() hasn't been
called when the PG_dcache_clean was set. That would cause a risk of page
synchronization.

Fixes: 08f051eda3 ("RISC-V: Flush I$ when making a dirty page executable")
Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
Signed-off-by: Guo Ren <guoren@kernel.org>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20230127035306.1819561-1-guoren@kernel.org
Cc: stable@vger.kernel.org
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-02-22 12:47:18 +01:00
..
Makefile
cacheflush.c riscv: Fixup race condition on PG_dcache_clean in flush_icache_pte 2023-02-22 12:47:18 +01:00
extable.c
fault.c exit: Add and use make_task_dead. 2023-02-06 07:49:45 +01:00
init.c riscv: fixup max_low_pfn with PFN_DOWN. 2019-03-13 14:02:27 -07:00
ioremap.c RISC-V: Avoid corrupting the upper 32-bit of phys_addr_t in ioremap 2019-12-01 09:16:53 +01:00