linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Fix CONT-PTE/PMD size hugetlb issue when unmapping or migrating
@ 2022-04-29  8:14 Baolin Wang
  2022-04-29  8:14 ` [PATCH 1/3] mm: change huge_ptep_clear_flush() to return the original pte Baolin Wang
                   ` (2 more replies)
  0 siblings, 3 replies; 22+ messages in thread
From: Baolin Wang @ 2022-04-29  8:14 UTC (permalink / raw)
  To: akpm, mike.kravetz, catalin.marinas, will
  Cc: tsbogend, James.Bottomley, deller, mpe, benh, paulus, hca, gor,
	agordeev, borntraeger, svens, ysato, dalias, davem, arnd,
	baolin.wang, linux-arm-kernel, linux-kernel, linux-ia64,
	linux-mips, linux-parisc, linuxppc-dev, linux-s390, linux-sh,
	sparclinux, linux-arch, linux-mm

Hi,

Now migrating a hugetlb page or unmapping a poisoned hugetlb page, we'll
use ptep_clear_flush() and set_pte_at() to nuke the page table entry
and remap it, and this is incorrect for CONT-PTE or CONT-PMD size hugetlb
page, which will cause potential data consistent issue. This patch set
will change to use hugetlb related APIs to fix this issue, please find
details in each patch. Thanks.

Baolin Wang (3):
  mm: change huge_ptep_clear_flush() to return the original pte
  mm: rmap: Fix CONT-PTE/PMD size hugetlb issue when migration
  mm: rmap: Fix CONT-PTE/PMD size hugetlb issue when unmapping

 arch/arm64/include/asm/hugetlb.h   |  4 +--
 arch/arm64/mm/hugetlbpage.c        | 12 ++++----
 arch/ia64/include/asm/hugetlb.h    |  4 +--
 arch/mips/include/asm/hugetlb.h    |  9 ++++--
 arch/parisc/include/asm/hugetlb.h  |  4 +--
 arch/powerpc/include/asm/hugetlb.h |  9 ++++--
 arch/s390/include/asm/hugetlb.h    |  6 ++--
 arch/sh/include/asm/hugetlb.h      |  4 +--
 arch/sparc/include/asm/hugetlb.h   |  4 +--
 include/asm-generic/hugetlb.h      |  4 +--
 mm/rmap.c                          | 58 +++++++++++++++++++++++---------------
 11 files changed, 67 insertions(+), 51 deletions(-)

-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2022-05-10  1:27 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-29  8:14 [PATCH 0/3] Fix CONT-PTE/PMD size hugetlb issue when unmapping or migrating Baolin Wang
2022-04-29  8:14 ` [PATCH 1/3] mm: change huge_ptep_clear_flush() to return the original pte Baolin Wang
2022-05-05 23:15   ` Mike Kravetz
2022-05-06  3:02     ` Baolin Wang
2022-04-29  8:14 ` [PATCH 2/3] mm: rmap: Fix CONT-PTE/PMD size hugetlb issue when migration Baolin Wang
2022-05-05 23:53   ` Mike Kravetz
2022-05-06  3:39     ` Baolin Wang
2022-05-06 17:56       ` Mike Kravetz
2022-05-07  2:33         ` Baolin Wang
2022-05-08  9:19           ` Baolin Wang
2022-04-29  8:14 ` [PATCH 3/3] mm: rmap: Fix CONT-PTE/PMD size hugetlb issue when unmapping Baolin Wang
2022-04-29 20:02   ` Gerald Schaefer
2022-04-30  3:22     ` Baolin Wang
2022-05-02 14:02       ` Gerald Schaefer
2022-05-03  2:19         ` Baolin Wang
2022-05-03 10:03           ` Gerald Schaefer
2022-05-03 13:33             ` Baolin Wang
2022-05-06 19:07             ` Mike Kravetz
2022-05-09 16:41               ` Peter Xu
2022-05-10  1:28                 ` Baolin Wang
2022-05-06 18:55   ` Mike Kravetz
2022-05-07  1:32     ` Baolin Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).