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>,
Peter Xu <peterx@redhat.com>, Hugh Dickins <hughd@google.com>,
Andrea Arcangeli <aarcange@redhat.com>,
Nadav Amit <nadav.amit@gmail.com>
Subject: [PATCH v1 0/2] mm: uffd-wp + change_protection() cleanups
Date: Fri, 23 Dec 2022 16:56:14 +0100 [thread overview]
Message-ID: <20221223155616.297723-1-david@redhat.com> (raw)
Based on linus/master and [1]:
"mm/userfaultfd: enable writenotify while userfaultfd-wp is enabled for a
VMA"
Cleanup page protection handling in uffd-wp when calling
change_protection() and improve unprotecting uffd=wp in private mappings,
trying to set PTEs writable again if possible just like we do during
mprotect() when upgrading write permissions. Make the change_protection()
interface harder to get wrong :)
I consider both pages primarily cleanups, although patch #1 fixes a
corner case with uffd-wp and softdirty tracking for shmem. @Peter, please
let me know if we should flag patch #1 as pure cleanup -- I have no idea
how important softdirty tracking on shmem is.
Survives my simple test case + selftests/vm.
Last patch series before Christmas; happy holidays everyone!
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Peter Xu <peterx@redhat.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Nadav Amit <nadav.amit@gmail.com>
[1] https://lore.kernel.org/all/20221209080912.7968-1-david@redhat.com/T/#u
David Hildenbrand (2):
mm/userfaultfd: rely on vma->vm_page_prot in uffd_wp_range()
mm/mprotect: drop pgprot_t parameter from change_protection()
include/linux/mm.h | 3 +--
mm/mempolicy.c | 3 +--
mm/mprotect.c | 14 +++++++++++---
mm/userfaultfd.c | 17 ++++++++++++-----
4 files changed, 25 insertions(+), 12 deletions(-)
--
2.38.1
next reply other threads:[~2022-12-23 15:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-23 15:56 David Hildenbrand [this message]
2022-12-23 15:56 ` [PATCH v1 1/2] mm/userfaultfd: rely on vma->vm_page_prot in uffd_wp_range() David Hildenbrand
2022-12-24 16:59 ` David Hildenbrand
2022-12-23 15:56 ` [PATCH v1 2/2] mm/mprotect: drop pgprot_t parameter from change_protection() David Hildenbrand
2022-12-24 3:08 ` kernel test robot
2022-12-24 4:59 ` kernel test robot
2022-12-24 17:01 ` David Hildenbrand
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=20221223155616.297723-1-david@redhat.com \
--to=david@redhat.com \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=hughd@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nadav.amit@gmail.com \
--cc=peterx@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox