linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Ryan Roberts <ryan.roberts@arm.com>
To: "Andrew Morton" <akpm@linux-foundation.org>,
	"Muchun Song" <muchun.song@linux.dev>,
	"Liam R. Howlett" <Liam.Howlett@oracle.com>,
	"Lorenzo Stoakes" <lorenzo.stoakes@oracle.com>,
	"Vlastimil Babka" <vbabka@suse.cz>,
	"Jann Horn" <jannh@google.com>, "Shuah Khan" <shuah@kernel.org>,
	"Peter Xu" <peterx@redhat.com>,
	"David Hildenbrand" <david@redhat.com>,
	"Mikołaj Lenczewski" <miko.lenczewski@arm.com>,
	"Mark Rutland" <mark.rutland@arm.com>
Cc: Ryan Roberts <ryan.roberts@arm.com>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	linux-kselftest@vger.kernel.org
Subject: [PATCH v1 0/2] mm: Clear uffd-wp PTE/PMD state on mremap()
Date: Tue,  7 Jan 2025 14:47:51 +0000	[thread overview]
Message-ID: <20250107144755.1871363-1-ryan.roberts@arm.com> (raw)

Hi All,

This series contains a fix for a warning emitted when a uffd-registered region,
which doesn't have UFFD_FEATURE_EVENT_REMAP, is mremap()ed. patch 1 describes
the problem and fixes it, and patch 2 adds a selftest to verify the fix.

Thanks to Mikołaj Lenczewski who originally created the patch, which I have
subsequently extended.

Applies on top of mm-unstable (f349e79bfbf3)

Thanks,
Ryan

Ryan Roberts (2):
  mm: Clear uffd-wp PTE/PMD state on mremap()
  selftests/mm: Introduce uffd-wp-mremap regression test

 include/linux/userfaultfd_k.h               |  12 +
 mm/huge_memory.c                            |  12 +
 mm/hugetlb.c                                |  14 +-
 mm/mremap.c                                 |  32 +-
 tools/testing/selftests/mm/.gitignore       |   1 +
 tools/testing/selftests/mm/Makefile         |   2 +
 tools/testing/selftests/mm/run_vmtests.sh   |   1 +
 tools/testing/selftests/mm/uffd-wp-mremap.c | 380 ++++++++++++++++++++
 8 files changed, 452 insertions(+), 2 deletions(-)
 create mode 100644 tools/testing/selftests/mm/uffd-wp-mremap.c

--
2.43.0



             reply	other threads:[~2025-01-07 14:48 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-07 14:47 Ryan Roberts [this message]
2025-01-07 14:47 ` [PATCH v1 1/2] " Ryan Roberts
2025-01-15 16:58   ` Ryan Roberts
2025-01-15 17:21     ` Peter Xu
2025-01-15 17:30       ` Lorenzo Stoakes
2025-01-15 19:11         ` Ryan Roberts
2025-01-15 22:54         ` Andrew Morton
2025-01-15 20:28   ` Peter Xu
2025-01-16  9:04     ` Ryan Roberts
2025-01-20 14:01       ` David Hildenbrand
2025-01-23 14:38   ` Ryan Roberts
2025-01-23 16:17     ` Ryan Roberts
2025-01-23 17:40     ` Peter Xu
2025-01-24  9:28       ` Ryan Roberts
2025-01-07 14:47 ` [PATCH v1 2/2] selftests/mm: Introduce uffd-wp-mremap regression test Ryan Roberts

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=20250107144755.1871363-1-ryan.roberts@arm.com \
    --to=ryan.roberts@arm.com \
    --cc=Liam.Howlett@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=david@redhat.com \
    --cc=jannh@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lorenzo.stoakes@oracle.com \
    --cc=mark.rutland@arm.com \
    --cc=miko.lenczewski@arm.com \
    --cc=muchun.song@linux.dev \
    --cc=peterx@redhat.com \
    --cc=shuah@kernel.org \
    --cc=vbabka@suse.cz \
    /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