linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] mm/migrate: Fix writable pte for read migration entry
@ 2022-11-10 15:17 Peter Xu
  2022-11-10 15:17 ` [PATCH 1/2] mm/migrate: Fix read-only page got writable when recover pte Peter Xu
  2022-11-10 15:17 ` [PATCH 2/2] mm/uffd: Sanity check write bit for uffd-wp protected ptes Peter Xu
  0 siblings, 2 replies; 5+ messages in thread
From: Peter Xu @ 2022-11-10 15:17 UTC (permalink / raw)
  To: linux-mm, linux-kernel
  Cc: Mike Rapoport, peterx, Nadav Amit, Andrew Morton, Axel Rasmussen,
	Andrea Arcangeli, Ives van Hoorne

This comes from a report from Ives on using uffd-wp on shmem.  More
information can be found in patch 1 commit message.

Patch 2 added some more sanity check when walking pgtables and when we
convert the ptes into other forms e.g. for migration and swap.  It will
make the error trigger even earlier than the user could notice, meanwhile
nail down the case if it's a wrong pgtable setup.

Ives, I only attached the reported-by tag for you but not tested-by because
the fix patch (patch 1) has a slight change compared to what I sent you
before, but hopefully it should also work for you.  If you want, feel free
to reply directly here if the patch also works for you.

We probably need patch 1 for stable (5.19+).  Please have a look, thanks.

Peter Xu (2):
  mm/migrate: Fix read-only page got writable when recover pte
  mm/uffd: Sanity check write bit for uffd-wp protected ptes

 arch/x86/include/asm/pgtable.h | 16 +++++++++++++++-
 mm/migrate.c                   |  8 +++++++-
 2 files changed, 22 insertions(+), 2 deletions(-)

-- 
2.37.3



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

end of thread, other threads:[~2022-11-10 20:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-10 15:17 [PATCH 0/2] mm/migrate: Fix writable pte for read migration entry Peter Xu
2022-11-10 15:17 ` [PATCH 1/2] mm/migrate: Fix read-only page got writable when recover pte Peter Xu
2022-11-10 15:17 ` [PATCH 2/2] mm/uffd: Sanity check write bit for uffd-wp protected ptes Peter Xu
2022-11-10 18:43   ` Nadav Amit
2022-11-10 20:28     ` Peter Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox