All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: linux-mm@kvack.org, David Hildenbrand <david@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Mike Kravetz <mike.kravetz@oracle.com>,
	Muchun Song <songmuchun@bytedance.com>,
	Peter Xu <peterx@redhat.com>, Peter Feiner <pfeiner@google.com>,
	"Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>
Subject: [PATCH v1 0/2] mm/hugetlb: fix write-fault handling for shared mappings
Date: Fri,  5 Aug 2022 13:03:27 +0200	[thread overview]
Message-ID: <20220805110329.80540-1-david@redhat.com> (raw)

I observed that hugetlb does not support/expect write-faults in shared
mappings that would have to map the R/O-mapped page writable -- and I
found one case where we could currently get such faults and would
erroneously map an anon page into a shared mapping, by triggering
clear_refs to clear soft-dirty tracking at the wrong point in time on a
process.

I propose to backport the fix to stable trees, as the fix for write-notify
should be straight forward.

Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Muchun Song <songmuchun@bytedance.com>
Cc: Peter Xu <peterx@redhat.com>
Cc: Peter Feiner <pfeiner@google.com>
Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>

David Hildenbrand (2):
  mm/hugetlb: fix hugetlb not supporting write-notify
  mm/hugetlb: support write-faults in shared mappings

 mm/hugetlb.c | 21 ++++++++++++++-------
 mm/mmap.c    |  7 +++++++
 2 files changed, 21 insertions(+), 7 deletions(-)

-- 
2.35.3


             reply	other threads:[~2022-08-05 11:03 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-05 11:03 David Hildenbrand [this message]
2022-08-05 11:03 ` [PATCH v1 1/2] mm/hugetlb: fix hugetlb not supporting write-notify David Hildenbrand
2022-08-05 18:14   ` Peter Xu
2022-08-05 18:22     ` David Hildenbrand
2022-08-05 18:23     ` Mike Kravetz
2022-08-05 18:25       ` David Hildenbrand
2022-08-05 18:33         ` Mike Kravetz
2022-08-05 18:57           ` David Hildenbrand
2022-08-05 20:48             ` Mike Kravetz
2022-08-05 23:13               ` Peter Xu
2022-08-05 23:33                 ` Mike Kravetz
2022-08-08 16:10                   ` Peter Xu
2022-08-08 16:36                 ` David Hildenbrand
2022-08-08 19:28                   ` Peter Xu
2022-08-10  9:29                     ` David Hildenbrand
2022-08-05 11:03 ` [PATCH v1 2/2] mm/hugetlb: support write-faults in shared mappings David Hildenbrand
2022-08-05 18:12   ` Peter Xu
2022-08-05 18:20     ` David Hildenbrand
2022-08-08 16:05       ` Peter Xu
2022-08-08 16:25         ` David Hildenbrand
2022-08-08 20:21           ` Peter Xu
2022-08-08 22:08             ` Peter Xu
2022-08-10  9:37               ` David Hildenbrand
2022-08-10  9:45                 ` David Hildenbrand
2022-08-10 19:29                 ` Peter Xu
2022-08-10 19:40                   ` David Hildenbrand
2022-08-10 19:52                     ` Peter Xu
2022-08-10 23:55                       ` Mike Kravetz
2022-08-11  8:48                         ` David Hildenbrand
2022-08-05 23:08     ` Mike Kravetz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220805110329.80540-1-david@redhat.com \
    --to=david@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mike.kravetz@oracle.com \
    --cc=peterx@redhat.com \
    --cc=pfeiner@google.com \
    --cc=songmuchun@bytedance.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.