linux/arch/riscv/mm
Guo Ren 7d151eccd0 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>
History 2023-02-14 19:11:53 +01:00
..
cacheflush.c riscv: Fixup race condition on PG_dcache_clean in flush_icache_pte 2023-02-14 19:11:53 +01:00
context.c riscv: mm: notify remote harts about mmu cache updates 2023-01-07 11:11:53 +01:00
dma-noncoherent.c RISC-V: Fix compilation without RISCV_ISA_ZICBOM 2022-10-21 11:52:39 +05:30
extable.c riscv: extable: fix err reg writing in dedicated uaccess handler 2022-02-08 17:02:47 -08:00
fault.c riscv: Make VM_WRITE imply VM_READ 2022-09-22 09:44:50 -07:00
hugetlbpage.c hugetlbfs: remove hugetlb_add_hstate() warning for existing hstate 2020-06-03 20:09:46 -07:00
init.c riscv: fix reserved memory setup 2022-11-10 14:46:33 -08:00
kasan_init.c riscv: mm: add missing memcpy in kasan_init 2022-10-27 14:55:58 -07:00
Makefile riscv: Add support for non-coherent devices using zicbom extension 2022-07-28 15:30:51 -07:00
pageattr.c mm: pagewalk: Fix race between unmap and page walker 2022-09-03 10:13:13 -07:00
physaddr.c riscv: Fix crash during early errata patching 2022-12-31 13:32:37 +01:00
ptdump.c riscv: Fix PTDUMP output now BPF region moved back to module region 2021-07-06 15:21:27 -07:00
tlbflush.c riscv: mm: notify remote harts about mmu cache updates 2023-01-07 11:11:53 +01:00