All of lore.kernel.org
 help / color / mirror / Atom feed
* + arm64-mm-use-ptep_clear-instead-of-pte_clear-in-clear_flush.patch added to mm-unstable branch
@ 2023-08-10 16:40 Andrew Morton
  0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2023-08-10 16:40 UTC (permalink / raw)
  To: mm-commits, zhengqi.arch, will, wangkefeng.wang, pasha.tatashin,
	muchun.song, catalin.marinas, qi.zheng, akpm


The patch titled
     Subject: arm64: mm: use ptep_clear() instead of pte_clear() in clear_flush()
has been added to the -mm mm-unstable branch.  Its filename is
     arm64-mm-use-ptep_clear-instead-of-pte_clear-in-clear_flush.patch

This patch will shortly appear at
     https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/arm64-mm-use-ptep_clear-instead-of-pte_clear-in-clear_flush.patch

This patch will later appear in the mm-unstable branch at
    git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days

------------------------------------------------------
From: Qi Zheng <qi.zheng@linux.dev>
Subject: arm64: mm: use ptep_clear() instead of pte_clear() in clear_flush()
Date: Thu, 10 Aug 2023 09:32:41 +0000


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().

Link: https://lkml.kernel.org/r/20230810093241.1181142-1-qi.zheng@linux.dev
Fixes: 42b2547137f5 ("arm64/mm: enable ARCH_SUPPORTS_PAGE_TABLE_CHECK")
Signed-off-by: Qi Zheng <zhengqi.arch@bytedance.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Kefeng Wang <wangkefeng.wang@huawei.com>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Pasha Tatashin <pasha.tatashin@soleen.com>
Cc: Qi Zheng <zhengqi.arch@bytedance.com>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 arch/arm64/mm/hugetlbpage.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/arch/arm64/mm/hugetlbpage.c~arm64-mm-use-ptep_clear-instead-of-pte_clear-in-clear_flush
+++ a/arch/arm64/mm/hugetlbpage.c
@@ -236,7 +236,7 @@ static void clear_flush(struct mm_struct
 	unsigned long i, saddr = addr;
 
 	for (i = 0; i < ncontig; i++, addr += pgsize, ptep++)
-		pte_clear(mm, addr, ptep);
+		ptep_clear(mm, addr, ptep);
 
 	flush_tlb_range(&vma, saddr, addr);
 }
_

Patches currently in -mm which might be from qi.zheng@linux.dev are

arm64-mm-use-ptep_clear-instead-of-pte_clear-in-clear_flush.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-08-10 16:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-10 16:40 + arm64-mm-use-ptep_clear-instead-of-pte_clear-in-clear_flush.patch added to mm-unstable branch Andrew Morton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.