[PATCH] arm64: mm: use ptep_clear() instead of pte_clear() in clear_flush()

Will Deacon will at kernel.org
Fri Aug 11 04:03:12 PDT 2023


On Thu, Aug 10, 2023 at 09:32:41AM +0000, Qi Zheng wrote:
> From: Qi Zheng <zhengqi.arch at bytedance.com>
> 
> In clear_flush(), the original pte may be a present entry, so we should
> use ptep_clear() to let page_table_check track the pte clearing operation,
> otherwise it may cause false positive in subsequent set_pte_at().

Isn't this true for most users of pte_clear()? There are some in the core
code, so could they trigger the false positive as well?

Will



More information about the linux-arm-kernel mailing list