linux/arch/riscv/mm
Guo Ren 950b879b7f
riscv: Fixup race condition on PG_dcache_clean in flush_icache_pte
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>
2023-02-09 11:40:32 -08:00
..
cacheflush.c riscv: Fixup race condition on PG_dcache_clean in flush_icache_pte 2023-02-09 11:40:32 -08:00
context.c riscv: mm: notify remote harts about mmu cache updates 2022-12-08 15:18:16 -08: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 RISC-V Patches for the 6.2 Merge Window, Part 1 2022-12-14 15:23:49 -08:00
kasan_init.c riscv: mm: add missing memcpy in kasan_init 2022-10-27 14:55:58 -07:00
Makefile Merge patch series "Add PMEM support for RISC-V" 2022-12-08 15:45:28 -08:00
pageattr.c mm: pagewalk: Fix race between unmap and page walker 2022-09-03 10:13:13 -07:00
pgtable.c riscv: mm: Implement pmdp_collapse_flush for THP 2023-02-01 20:52:09 -08:00
physaddr.c riscv: Fix crash during early errata patching 2022-12-08 17:22:53 -08:00
pmem.c RISC-V: Implement arch specific PMEM APIs 2022-12-08 15:43:59 -08: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 2022-12-08 15:18:16 -08:00