mm-commits.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* + userfaultfd-provide-unmasked-address-on-page-fault-v3.patch added to -mm tree
@ 2022-03-04  1:53 Andrew Morton
  2022-03-04  3:01 ` Stephen Rothwell
  0 siblings, 1 reply; 2+ messages in thread
From: Andrew Morton @ 2022-03-04  1:53 UTC (permalink / raw)
  To: mm-commits, sfr, rppt, peterx, jack, david, aarcange, namit, akpm


The patch titled
     Subject: userfaultfd: provide unmasked address on page-fault
has been added to the -mm tree.  Its filename is
     userfaultfd-provide-unmasked-address-on-page-fault-v3.patch

This patch should soon appear at
    https://ozlabs.org/~akpm/mmots/broken-out/userfaultfd-provide-unmasked-address-on-page-fault-v3.patch
and later at
    https://ozlabs.org/~akpm/mmotm/broken-out/userfaultfd-provide-unmasked-address-on-page-fault-v3.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Nadav Amit <namit@vmware.com>
Subject: userfaultfd: provide unmasked address on page-fault

initialize real_address on all code paths, per Jan

Link: https://lkml.kernel.org/r/20220226022655.350562-1-namit@vmware.com
Signed-off-by: Nadav Amit <namit@vmware.com>
Acked-by: Peter Xu <peterx@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Mike Rapoport <rppt@linux.vnet.ibm.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/hugetlb.c  |    6 ++++--
 mm/swapfile.c |    1 +
 2 files changed, 5 insertions(+), 2 deletions(-)

--- a/mm/hugetlb.c~userfaultfd-provide-unmasked-address-on-page-fault-v3
+++ a/mm/hugetlb.c
@@ -5341,6 +5341,7 @@ static inline vm_fault_t hugetlb_handle_
 						  pgoff_t idx,
 						  unsigned int flags,
 						  unsigned long haddr,
+						  unsigned long addr,
 						  unsigned long reason)
 {
 	vm_fault_t ret;
@@ -5348,6 +5349,7 @@ static inline vm_fault_t hugetlb_handle_
 	struct vm_fault vmf = {
 		.vma = vma,
 		.address = haddr,
+		.real_address = addr,
 		.flags = flags,
 
 		/*
@@ -5416,7 +5418,7 @@ retry:
 		/* Check for page in userfault range */
 		if (userfaultfd_missing(vma)) {
 			ret = hugetlb_handle_userfault(vma, mapping, idx,
-						       flags, haddr,
+						       flags, haddr, address,
 						       VM_UFFD_MISSING);
 			goto out;
 		}
@@ -5480,7 +5482,7 @@ retry:
 			unlock_page(page);
 			put_page(page);
 			ret = hugetlb_handle_userfault(vma, mapping, idx,
-						       flags, haddr,
+						       flags, haddr, address,
 						       VM_UFFD_MINOR);
 			goto out;
 		}
--- a/mm/swapfile.c~userfaultfd-provide-unmasked-address-on-page-fault-v3
+++ a/mm/swapfile.c
@@ -1951,6 +1951,7 @@ static int unuse_pte_range(struct vm_are
 			struct vm_fault vmf = {
 				.vma = vma,
 				.address = addr,
+				.real_address = addr,
 				.pmd = pmd,
 			};
 
_

Patches currently in -mm which might be from namit@vmware.com are

userfaultfd-mark-uffd_wp-regardless-of-vm_write-flag.patch
userfaultfd-provide-unmasked-address-on-page-fault.patch
userfaultfd-provide-unmasked-address-on-page-fault-v3.patch


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

* Re: + userfaultfd-provide-unmasked-address-on-page-fault-v3.patch added to -mm tree
  2022-03-04  1:53 + userfaultfd-provide-unmasked-address-on-page-fault-v3.patch added to -mm tree Andrew Morton
@ 2022-03-04  3:01 ` Stephen Rothwell
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Rothwell @ 2022-03-04  3:01 UTC (permalink / raw)
  To: Andrew Morton; +Cc: mm-commits, sfr, rppt, peterx, jack, david, aarcange, namit

[-- Attachment #1: Type: text/plain, Size: 373 bytes --]

Hi Andrew,

On Thu, 03 Mar 2022 17:53:55 -0800 Andrew Morton <akpm@linux-foundation.org> wrote:
>
> The patch titled
>      Subject: userfaultfd: provide unmasked address on page-fault
> has been added to the -mm tree.  Its filename is
>      userfaultfd-provide-unmasked-address-on-page-fault-v3.patch

Added to linux-next today.
-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

end of thread, other threads:[~2022-03-04  3:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-04  1:53 + userfaultfd-provide-unmasked-address-on-page-fault-v3.patch added to -mm tree Andrew Morton
2022-03-04  3:01 ` Stephen Rothwell

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