Re: [PATCH 6.6 4/4] riscv: Use accessors to page table entries instead of direct dereference

From: Greg KH
Date: Sun Sep 08 2024 - 10:10:33 EST


On Fri, Sep 06, 2024 at 04:22:39PM +0800, WangYuli wrote:
> From: Alexandre Ghiti <alexghiti@xxxxxxxxxxxx>
>
> [ Upstream commit edf955647269422e387732870d04fc15933a25ea ]
>
> As very well explained in commit 20a004e7b017 ("arm64: mm: Use
> READ_ONCE/WRITE_ONCE when accessing page tables"), an architecture whose
> page table walker can modify the PTE in parallel must use
> READ_ONCE()/WRITE_ONCE() macro to avoid any compiler transformation.
>
> So apply that to riscv which is such architecture.
>
> Signed-off-by: Alexandre Ghiti <alexghiti@xxxxxxxxxxxx>
> Acked-by: Anup Patel <anup@xxxxxxxxxxxxxx>
> Link: https://lore.kernel.org/r/20231213203001.179237-5-alexghiti@xxxxxxxxxxxx
> Signed-off-by: Palmer Dabbelt <palmer@xxxxxxxxxxxx>
> Signed-off-by: WangYuli <wangyuli@xxxxxxxxxxxxx>
> ---

all now queued up, thanks.

greg k-h