linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] mm/hugetlb: Fix issues on file sealing and fork
@ 2021-05-01 14:41 Peter Xu
  2021-05-01 14:41 ` [PATCH 1/2] mm/hugetlb: Fix F_SEAL_FUTURE_WRITE Peter Xu
  2021-05-01 14:41 ` [PATCH 2/2] mm/hugetlb: Fix cow where page writtable in child Peter Xu
  0 siblings, 2 replies; 10+ messages in thread
From: Peter Xu @ 2021-05-01 14:41 UTC (permalink / raw)
  To: linux-mm, linux-kernel
  Cc: Hugh Dickins, Andrew Morton, Andrea Arcangeli, peterx,
	Mike Kravetz, Axel Rasmussen

Hugh reported issue with F_SEAL_FUTURE_WRITE not applied correctly to
hugetlbfs, which I can easily verify using the memfd_test program, which seems
that the program is hardly run with hugetlbfs pages (as by default shmem).

Meanwhile I found another probably even more severe issue on that hugetlb fork
won't wr-protect child cow pages, so child can potentially write to parent
private pages.  Patch 2 addresses that.

After this series applied, "memfd_test hugetlbfs" should start to pass.

Please review, thanks.

Peter Xu (2):
  mm/hugetlb: Fix F_SEAL_FUTURE_WRITE
  mm/hugetlb: Fix cow where page writtable in child

 fs/hugetlbfs/inode.c |  5 +++++
 include/linux/mm.h   | 32 ++++++++++++++++++++++++++++++++
 mm/hugetlb.c         |  2 ++
 mm/shmem.c           | 22 ++++------------------
 4 files changed, 43 insertions(+), 18 deletions(-)

-- 
2.31.1




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

end of thread, other threads:[~2021-05-03 22:28 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-01 14:41 [PATCH 0/2] mm/hugetlb: Fix issues on file sealing and fork Peter Xu
2021-05-01 14:41 ` [PATCH 1/2] mm/hugetlb: Fix F_SEAL_FUTURE_WRITE Peter Xu
2021-05-03 18:55   ` Mike Kravetz
2021-05-03 21:31     ` Peter Xu
2021-05-03 22:28       ` Mike Kravetz
2021-05-01 14:41 ` [PATCH 2/2] mm/hugetlb: Fix cow where page writtable in child Peter Xu
2021-05-03 20:53   ` Mike Kravetz
2021-05-03 21:41     ` Peter Xu
2021-05-03 22:10       ` Mike Kravetz
2021-05-03 22:24         ` Peter Xu

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