* [PATCH 0/3] mm: fix races between huge and non-huge faults in PFN mappings
@ 2026-11-15 20:58 Lorenzo Stoakes (ARM)
2026-11-15 20:58 ` [PATCH 1/3] mm/memory: remove racy huge PMD assertion from walk_to_pmd() Lorenzo Stoakes (ARM)
` (2 more replies)
0 siblings, 3 replies; 19+ messages in thread
From: Lorenzo Stoakes (ARM) @ 2026-11-15 20:58 UTC (permalink / raw)
To: Andrew Morton, David Hildenbrand, Liam R. Howlett,
Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko,
Alex Williamson, Peter Xu, Zi Yan, Baolin Wang, Nico Pache,
Ryan Roberts, Dev Jain, Barry Song, Lance Yang, Usama Arif,
Kiryl Shutsemau, Wei Liu, Roman Kisel, Saurabh Sengar, Naman Jain,
Michael Kelley
Cc: ljs, linux-mm, linux-kernel, Eliav Farber, stable,
Jose A. Perez de Azpillaga
A driver that implements both ->fault and ->huge_fault must anticipate
concurrent use of both.
This can happen, for example, if a user calls prctl(PR_SET_THP_DISABLE)
concurrent with faulting, as that only holds the mmap write lock and thus
does not exclude faulting threads stabilised by VMA lock.
A number of places in the code that implements huge PFN support fails to
take this into account correctly, which this series aims to address.
Generally the shape of the issue is that faulting the same empty page table
entry can result in the ->fault and ->huge_fault handlers racing and the
loser finding something they didn't expect.
The fault code must tolerate this, but fails to in 3 places:
1. walk_to_pmd() asserts, without the PMD lock, that the PMD entry is not
huge, so a VM_BUG_ON() triggers. [ vfio-pci, nvgrace-gpu ]
2. insert_pfn() treats a failure to map the PTE table as an allocation
failure and reports OOM, causing kernel accesses to the range to
spuriously fail with -EFAULT. [ vfio-pci, nvgrace-gpu ]
3. insert_pmd() and insert_pud() assume a populated entry is huge and
compare its PFN on write fault, warning when that of a page table does
not match. [ mshv_vtl, drm_gem_syhmem, panthor ]
This was originally reported and fixed by Eliav Farber in [0], this series
reworks patches 1-3 of that one.
Patch 4 of that series (x86 PAT encoding of huge PFN mappings) is dropped -
it is unrelated to the above, no in-tree driver is affected by it, and it
needs a different approach which is better pursued separately with the x86
maintainers.
All three issues were reproduced on x86-64 under QEMU using vfio-pci in
no-IOMMU mode on an ivshmem BAR, with 6 threads faulting the same address
in each PMD or PUD aligned range of the mapping while another toggles
PR_SET_THP_DISABLE (note that vfio-pci had to be modified to pass the write
flag to reproduce the third issue.)
Without this series the BUG is hit immediately, with only patch 1 applied
tens of thousands of -EFAULTs are observed within seconds, and with patches
1 and 2 (and the vfio-pci modification) both warnings fire immediately.
With the series applied 30 second runs at each of PMD and PUD size complete
with none of the above, with or without the vfio-pci modification.
[0]: https://lore.kernel.org/all/20261112051440.16140-1-farbere@amazon.com/
---
To: Andrew Morton <akpm@linux-foundation.org>
To: David Hildenbrand <david@kernel.org>
To: "Liam R. Howlett" <liam@infradead.org>
To: Vlastimil Babka <vbabka@kernel.org>
To: Mike Rapoport <rppt@kernel.org>
To: Suren Baghdasaryan <surenb@google.com>
To: Michal Hocko <mhocko@suse.com>
To: Alex Williamson <alex@shazbot.org>
To: Peter Xu <peterx@redhat.com>
To: Zi Yan <ziy@nvidia.com>
To: Baolin Wang <baolin.wang@linux.alibaba.com>
To: Nico Pache <nico.pache@linux.dev>
To: Ryan Roberts <ryan.roberts@arm.com>
To: Dev Jain <dev.jain@arm.com>
To: Barry Song <baohua@kernel.org>
To: Lance Yang <lance.yang@linux.dev>
To: Usama Arif <usama.arif@linux.dev>
To: Kiryl Shutsemau <kas@kernel.org>
To: Wei Liu <wei.liu@kernel.org>
To: Roman Kisel <romank@linux.microsoft.com>
To: Saurabh Sengar <ssengar@linux.microsoft.com>
To: Naman Jain <namjain@linux.microsoft.com>
To: Michael Kelley <mhklinux@outlook.com>
Cc: ljs@kernel.org
Cc: linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org
---
Eliav Farber (2):
mm/memory: remove racy huge PMD assertion from walk_to_pmd()
mm/memory: do not report OOM if insert_pfn() races a huge fault
Lorenzo Stoakes (ARM) (1):
mm/huge_memory: only compare PFNs of huge entries on huge fault insert
mm/huge_memory.c | 8 ++++++++
mm/memory.c | 12 +++++++++---
2 files changed, 17 insertions(+), 3 deletions(-)
---
base-commit: 5b99c3309de70337f38bd6e6998ab8335c2758e4
change-id: 20261115-huge-pfnmap-fault-races-534e626de5cc
Cheers,
--
Lorenzo Stoakes (ARM) <ljs@kernel.org>
^ permalink raw reply [flat|nested] 19+ messages in thread* [PATCH 1/3] mm/memory: remove racy huge PMD assertion from walk_to_pmd() 2026-11-15 20:58 [PATCH 0/3] mm: fix races between huge and non-huge faults in PFN mappings Lorenzo Stoakes (ARM) @ 2026-11-15 20:58 ` Lorenzo Stoakes (ARM) 2026-11-16 10:35 ` Jose A. Perez de Azpillaga ` (2 more replies) 2026-11-15 20:58 ` [PATCH 2/3] mm/memory: do not report OOM if insert_pfn() races a huge fault Lorenzo Stoakes (ARM) 2026-11-15 20:58 ` [PATCH 3/3] mm/huge_memory: only compare PFNs of huge entries on huge fault insert Lorenzo Stoakes (ARM) 2 siblings, 3 replies; 19+ messages in thread From: Lorenzo Stoakes (ARM) @ 2026-11-15 20:58 UTC (permalink / raw) To: Andrew Morton, David Hildenbrand, Liam R. Howlett, Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko, Alex Williamson, Peter Xu, Zi Yan, Baolin Wang, Nico Pache, Ryan Roberts, Dev Jain, Barry Song, Lance Yang, Usama Arif, Kiryl Shutsemau, Wei Liu, Roman Kisel, Saurabh Sengar, Naman Jain, Michael Kelley Cc: ljs, linux-mm, linux-kernel, Eliav Farber, stable From: Eliav Farber <farbere@amazon.com> walk_to_pmd() asserts that the PMD entry it returns is not huge, but does so without holding the PMD lock, so the assertion is only valid if nothing can concurrently install a huge PMD entry in the range. This is not the case for a VMA whose driver implements both ->fault and ->huge_fault and which invokes vmf_insert_pfn() from the former. The existence of prctl(PR_SET_THP_DISABLE) is problematic here, as it only takes the mmap write lock and faults taken under the VMA lock are unaffected by this. This can result in two concurrent threads faulting the same thing disagreeing as to whether to attempt a huge fault and thus ->fault and ->huge_fault running at the same time and triggering this assertion. So just remove the assert. Target the commit which introduced the first driver able to do this for the fix - vfio-pci. DAX also mixes fault orders within a VMA, but serialises them using its own mapping entry lock. Link: https://lore.kernel.org/all/20261112051440.16140-2-farbere@amazon.com/ Fixes: f9e54c3a2f5b ("vfio/pci: implement huge_fault support") Cc: stable@vger.kernel.org Signed-off-by: Eliav Farber <farbere@amazon.com> [ ljs: rewrote commit message ] Signed-off-by: Lorenzo Stoakes (ARM) <ljs@kernel.org> --- mm/memory.c | 1 - 1 file changed, 1 deletion(-) diff --git a/mm/memory.c b/mm/memory.c index 3a20d64fd276..e03110906aa8 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -2384,7 +2384,6 @@ static pmd_t *walk_to_pmd(struct mm_struct *mm, unsigned long addr) if (!pmd) return NULL; - VM_BUG_ON(pmd_trans_huge(*pmd)); return pmd; } -- 2.56.1 ^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [PATCH 1/3] mm/memory: remove racy huge PMD assertion from walk_to_pmd() 2026-11-15 20:58 ` [PATCH 1/3] mm/memory: remove racy huge PMD assertion from walk_to_pmd() Lorenzo Stoakes (ARM) @ 2026-11-16 10:35 ` Jose A. Perez de Azpillaga 2026-11-16 15:56 ` David Hildenbrand (Arm) 2026-11-16 17:40 ` Gregory Price (Meta) 2 siblings, 0 replies; 19+ messages in thread From: Jose A. Perez de Azpillaga @ 2026-11-16 10:35 UTC (permalink / raw) To: Lorenzo Stoakes (ARM), Andrew Morton, David Hildenbrand, Liam R. Howlett, Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko, Alex Williamson, Peter Xu, Zi Yan, Baolin Wang, Nico Pache, Ryan Roberts, Dev Jain, Barry Song, Lance Yang, Usama Arif, Kiryl Shutsemau, Wei Liu, Roman Kisel, Saurabh Sengar, Naman Jain, Michael Kelley Cc: linux-mm, linux-kernel, Eliav Farber, stable On 11/15/26 9:58 PM, Lorenzo Stoakes (ARM) wrote: > From: Eliav Farber <farbere@amazon.com> > > walk_to_pmd() asserts that the PMD entry it returns is not huge, but does > so without holding the PMD lock, so the assertion is only valid if nothing > can concurrently install a huge PMD entry in the range. > > This is not the case for a VMA whose driver implements both ->fault and > ->huge_fault and which invokes vmf_insert_pfn() from the former. > > The existence of prctl(PR_SET_THP_DISABLE) is problematic here, as it only > takes the mmap write lock and faults taken under the VMA lock are > unaffected by this. > > This can result in two concurrent threads faulting the same thing > disagreeing as to whether to attempt a huge fault and thus ->fault and > ->huge_fault running at the same time and triggering this assertion. > > So just remove the assert. > > Target the commit which introduced the first driver able to do this for the > fix - vfio-pci. DAX also mixes fault orders within a VMA, but serialises > them using its own mapping entry lock. > > Link: https://lore.kernel.org/all/20261112051440.16140-2-farbere@amazon.com/ > Fixes: f9e54c3a2f5b ("vfio/pci: implement huge_fault support") > Cc: stable@vger.kernel.org > Signed-off-by: Eliav Farber <farbere@amazon.com> > [ ljs: rewrote commit message ] > Signed-off-by: Lorenzo Stoakes (ARM) <ljs@kernel.org> LGTM: Reviewed-by: Jose A. Perez de Azpillaga <azpijr@gmail.com> -- cheers, jose a. p-a ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 1/3] mm/memory: remove racy huge PMD assertion from walk_to_pmd() 2026-11-15 20:58 ` [PATCH 1/3] mm/memory: remove racy huge PMD assertion from walk_to_pmd() Lorenzo Stoakes (ARM) 2026-11-16 10:35 ` Jose A. Perez de Azpillaga @ 2026-11-16 15:56 ` David Hildenbrand (Arm) 2026-11-16 17:10 ` Lorenzo Stoakes (ARM) 2026-11-16 17:40 ` Gregory Price (Meta) 2 siblings, 1 reply; 19+ messages in thread From: David Hildenbrand (Arm) @ 2026-11-16 15:56 UTC (permalink / raw) To: Lorenzo Stoakes (ARM), Andrew Morton, Liam R. Howlett, Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko, Alex Williamson, Peter Xu, Zi Yan, Baolin Wang, Nico Pache, Ryan Roberts, Dev Jain, Barry Song, Lance Yang, Usama Arif, Kiryl Shutsemau, Wei Liu, Roman Kisel, Saurabh Sengar, Naman Jain, Michael Kelley Cc: linux-mm, linux-kernel, Eliav Farber, stable On 11/15/26 21:58, Lorenzo Stoakes (ARM) wrote: > From: Eliav Farber <farbere@amazon.com> > > walk_to_pmd() asserts that the PMD entry it returns is not huge, but does > so without holding the PMD lock, so the assertion is only valid if nothing > can concurrently install a huge PMD entry in the range. > > This is not the case for a VMA whose driver implements both ->fault and > ->huge_fault and which invokes vmf_insert_pfn() from the former. > > The existence of prctl(PR_SET_THP_DISABLE) is problematic here, as it only > takes the mmap write lock and faults taken under the VMA lock are > unaffected by this. > > This can result in two concurrent threads faulting the same thing > disagreeing as to whether to attempt a huge fault and thus ->fault and > ->huge_fault running at the same time and triggering this assertion. > > So just remove the assert. > > Target the commit which introduced the first driver able to do this for the > fix - vfio-pci. DAX also mixes fault orders within a VMA, but serialises > them using its own mapping entry lock. > > Link: https://lore.kernel.org/all/20261112051440.16140-2-farbere@amazon.com/ > Fixes: f9e54c3a2f5b ("vfio/pci: implement huge_fault support") > Cc: stable@vger.kernel.org > Signed-off-by: Eliav Farber <farbere@amazon.com> > [ ljs: rewrote commit message ] > Signed-off-by: Lorenzo Stoakes (ARM) <ljs@kernel.org> > --- > mm/memory.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/mm/memory.c b/mm/memory.c > index 3a20d64fd276..e03110906aa8 100644 > --- a/mm/memory.c > +++ b/mm/memory.c > @@ -2384,7 +2384,6 @@ static pmd_t *walk_to_pmd(struct mm_struct *mm, unsigned long addr) > if (!pmd) > return NULL; > > - VM_BUG_ON(pmd_trans_huge(*pmd)); > return pmd; > } > > Could this also stumble over a huge PUD somehow? Should we just prepare it for any leaves and bail out if we find some? -- Cheers, David ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 1/3] mm/memory: remove racy huge PMD assertion from walk_to_pmd() 2026-11-16 15:56 ` David Hildenbrand (Arm) @ 2026-11-16 17:10 ` Lorenzo Stoakes (ARM) 2026-11-16 20:06 ` David Hildenbrand (Arm) 0 siblings, 1 reply; 19+ messages in thread From: Lorenzo Stoakes (ARM) @ 2026-11-16 17:10 UTC (permalink / raw) To: David Hildenbrand (Arm) Cc: Andrew Morton, Liam R. Howlett, Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko, Alex Williamson, Peter Xu, Zi Yan, Baolin Wang, Nico Pache, Ryan Roberts, Dev Jain, Barry Song, Lance Yang, Usama Arif, Kiryl Shutsemau, Wei Liu, Roman Kisel, Saurabh Sengar, Naman Jain, Michael Kelley, linux-mm, linux-kernel, Eliav Farber, stable On Mon, Nov 16, 2026 at 04:56:25PM +0100, David Hildenbrand (Arm) wrote: > On 11/15/26 21:58, Lorenzo Stoakes (ARM) wrote: > > From: Eliav Farber <farbere@amazon.com> > > > > walk_to_pmd() asserts that the PMD entry it returns is not huge, but does > > so without holding the PMD lock, so the assertion is only valid if nothing > > can concurrently install a huge PMD entry in the range. > > > > This is not the case for a VMA whose driver implements both ->fault and > > ->huge_fault and which invokes vmf_insert_pfn() from the former. > > > > The existence of prctl(PR_SET_THP_DISABLE) is problematic here, as it only > > takes the mmap write lock and faults taken under the VMA lock are > > unaffected by this. > > > > This can result in two concurrent threads faulting the same thing > > disagreeing as to whether to attempt a huge fault and thus ->fault and > > ->huge_fault running at the same time and triggering this assertion. > > > > So just remove the assert. > > > > Target the commit which introduced the first driver able to do this for the > > fix - vfio-pci. DAX also mixes fault orders within a VMA, but serialises > > them using its own mapping entry lock. > > > > Link: https://lore.kernel.org/all/20261112051440.16140-2-farbere@amazon.com/ > > Fixes: f9e54c3a2f5b ("vfio/pci: implement huge_fault support") > > Cc: stable@vger.kernel.org > > Signed-off-by: Eliav Farber <farbere@amazon.com> > > [ ljs: rewrote commit message ] > > Signed-off-by: Lorenzo Stoakes (ARM) <ljs@kernel.org> > > --- > > mm/memory.c | 1 - > > 1 file changed, 1 deletion(-) > > > > diff --git a/mm/memory.c b/mm/memory.c > > index 3a20d64fd276..e03110906aa8 100644 > > --- a/mm/memory.c > > +++ b/mm/memory.c > > @@ -2384,7 +2384,6 @@ static pmd_t *walk_to_pmd(struct mm_struct *mm, unsigned long addr) > > if (!pmd) > > return NULL; > > > > - VM_BUG_ON(pmd_trans_huge(*pmd)); > > return pmd; > > } > > > > > > Could this also stumble over a huge PUD somehow? Should we just prepare it for > any leaves and bail out if we find some? No, walk_to_pmd() can only come from the order-0 path right now and __handle_mm_fault() makes sure that can't happen in the fault path: vmf.pmd = pmd_alloc(mm, vmf.pud, address); if (!vmf.pmd) return VM_FAULT_OOM; /* Huge pud page fault raced with pmd_alloc? */ if (pud_trans_unstable(vmf.pud)) goto retry_pud; So by the time any ->fault path runs, the PUD is stable. We don't have to worry about the mmap paths as at that point nothing has faulted in and it's all fresh. So it's all safe as things stand. But could update for future-proofing like: /* PUD leaf might have been installed. */ if (pud_trans_unstable(pud)) return NULL; ? > > -- > Cheers, > > David -- Cheers, Lorenzo ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 1/3] mm/memory: remove racy huge PMD assertion from walk_to_pmd() 2026-11-16 17:10 ` Lorenzo Stoakes (ARM) @ 2026-11-16 20:06 ` David Hildenbrand (Arm) 0 siblings, 0 replies; 19+ messages in thread From: David Hildenbrand (Arm) @ 2026-11-16 20:06 UTC (permalink / raw) To: Lorenzo Stoakes (ARM) Cc: Andrew Morton, Liam R. Howlett, Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko, Alex Williamson, Peter Xu, Zi Yan, Baolin Wang, Nico Pache, Ryan Roberts, Dev Jain, Barry Song, Lance Yang, Usama Arif, Kiryl Shutsemau, Wei Liu, Roman Kisel, Saurabh Sengar, Naman Jain, Michael Kelley, linux-mm, linux-kernel, Eliav Farber, stable On 11/16/26 18:10, Lorenzo Stoakes (ARM) wrote: > On Mon, Nov 16, 2026 at 04:56:25PM +0100, David Hildenbrand (Arm) wrote: >> On 11/15/26 21:58, Lorenzo Stoakes (ARM) wrote: >>> From: Eliav Farber <farbere@amazon.com> >>> >>> walk_to_pmd() asserts that the PMD entry it returns is not huge, but does >>> so without holding the PMD lock, so the assertion is only valid if nothing >>> can concurrently install a huge PMD entry in the range. >>> >>> This is not the case for a VMA whose driver implements both ->fault and >>> ->huge_fault and which invokes vmf_insert_pfn() from the former. >>> >>> The existence of prctl(PR_SET_THP_DISABLE) is problematic here, as it only >>> takes the mmap write lock and faults taken under the VMA lock are >>> unaffected by this. >>> >>> This can result in two concurrent threads faulting the same thing >>> disagreeing as to whether to attempt a huge fault and thus ->fault and >>> ->huge_fault running at the same time and triggering this assertion. >>> >>> So just remove the assert. >>> >>> Target the commit which introduced the first driver able to do this for the >>> fix - vfio-pci. DAX also mixes fault orders within a VMA, but serialises >>> them using its own mapping entry lock. >>> >>> Link: https://lore.kernel.org/all/20261112051440.16140-2-farbere@amazon.com/ >>> Fixes: f9e54c3a2f5b ("vfio/pci: implement huge_fault support") >>> Cc: stable@vger.kernel.org >>> Signed-off-by: Eliav Farber <farbere@amazon.com> >>> [ ljs: rewrote commit message ] >>> Signed-off-by: Lorenzo Stoakes (ARM) <ljs@kernel.org> >>> --- >>> mm/memory.c | 1 - >>> 1 file changed, 1 deletion(-) >>> >>> diff --git a/mm/memory.c b/mm/memory.c >>> index 3a20d64fd276..e03110906aa8 100644 >>> --- a/mm/memory.c >>> +++ b/mm/memory.c >>> @@ -2384,7 +2384,6 @@ static pmd_t *walk_to_pmd(struct mm_struct *mm, unsigned long addr) >>> if (!pmd) >>> return NULL; >>> >>> - VM_BUG_ON(pmd_trans_huge(*pmd)); >>> return pmd; >>> } >>> >>> >> >> Could this also stumble over a huge PUD somehow? Should we just prepare it for >> any leaves and bail out if we find some? > > No, walk_to_pmd() can only come from the order-0 path right now and > __handle_mm_fault() makes sure that can't happen in the fault path: That implies that get_locked_pte() and all insert_pages interfaces can only be called from that path in __handle_mm_fault(). x86 an s390x use get_locked_pte() for some other paths, so I wouldn't want to trust on that :) (did I say that I hate walk_to_pmd and get_locked_pte? But you likely guessed it at this point lol) > > vmf.pmd = pmd_alloc(mm, vmf.pud, address); > if (!vmf.pmd) > return VM_FAULT_OOM; > > /* Huge pud page fault raced with pmd_alloc? */ > if (pud_trans_unstable(vmf.pud)) > goto retry_pud; > > So by the time any ->fault path runs, the PUD is stable. > > We don't have to worry about the mmap paths as at that point nothing has > faulted in and it's all fresh. > > So it's all safe as things stand. > > But could update for future-proofing like: > > /* PUD leaf might have been installed. */ > if (pud_trans_unstable(pud)) > return NULL; Yeah, that makes sense. I was just wondering whether we'd actually want to return a proper error then instead, because this would not be an -ENOMEM case. -- Cheers, David ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 1/3] mm/memory: remove racy huge PMD assertion from walk_to_pmd() 2026-11-15 20:58 ` [PATCH 1/3] mm/memory: remove racy huge PMD assertion from walk_to_pmd() Lorenzo Stoakes (ARM) 2026-11-16 10:35 ` Jose A. Perez de Azpillaga 2026-11-16 15:56 ` David Hildenbrand (Arm) @ 2026-11-16 17:40 ` Gregory Price (Meta) 2 siblings, 0 replies; 19+ messages in thread From: Gregory Price (Meta) @ 2026-11-16 17:40 UTC (permalink / raw) To: Lorenzo Stoakes (ARM) Cc: Andrew Morton, David Hildenbrand, Liam R. Howlett, Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko, Alex Williamson, Peter Xu, Zi Yan, Baolin Wang, Nico Pache, Ryan Roberts, Dev Jain, Barry Song, Lance Yang, Usama Arif, Kiryl Shutsemau, Wei Liu, Roman Kisel, Saurabh Sengar, Naman Jain, Michael Kelley, linux-mm, linux-kernel, Eliav Farber, stable On 2026-11-15 20:58 +0000, Lorenzo Stoakes (ARM) wrote: > From: Eliav Farber <farbere@amazon.com> > > walk_to_pmd() asserts that the PMD entry it returns is not huge, but does > so without holding the PMD lock, so the assertion is only valid if nothing > can concurrently install a huge PMD entry in the range. > > This is not the case for a VMA whose driver implements both ->fault and > ->huge_fault and which invokes vmf_insert_pfn() from the former. > > The existence of prctl(PR_SET_THP_DISABLE) is problematic here, as it only > takes the mmap write lock and faults taken under the VMA lock are > unaffected by this. > > This can result in two concurrent threads faulting the same thing > disagreeing as to whether to attempt a huge fault and thus ->fault and > ->huge_fault running at the same time and triggering this assertion. > > So just remove the assert. > > Target the commit which introduced the first driver able to do this for the > fix - vfio-pci. DAX also mixes fault orders within a VMA, but serialises > them using its own mapping entry lock. > > Link: https://lore.kernel.org/all/20261112051440.16140-2-farbere@amazon.com/ > Fixes: f9e54c3a2f5b ("vfio/pci: implement huge_fault support") > Cc: stable@vger.kernel.org > Signed-off-by: Eliav Farber <farbere@amazon.com> > [ ljs: rewrote commit message ] > Signed-off-by: Lorenzo Stoakes (ARM) <ljs@kernel.org> Reproduced by racing faults different mappings against THP-policy changes. Change looks reasonable. Tested-by: Gregory Price (Meta) <gourry@gourry.net> Reviewed-by: Gregory Price (Meta) <gourry@gourry.net> -- ~Gregory ^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 2/3] mm/memory: do not report OOM if insert_pfn() races a huge fault 2026-11-15 20:58 [PATCH 0/3] mm: fix races between huge and non-huge faults in PFN mappings Lorenzo Stoakes (ARM) 2026-11-15 20:58 ` [PATCH 1/3] mm/memory: remove racy huge PMD assertion from walk_to_pmd() Lorenzo Stoakes (ARM) @ 2026-11-15 20:58 ` Lorenzo Stoakes (ARM) 2026-11-16 10:36 ` Jose A. Perez de Azpillaga ` (2 more replies) 2026-11-15 20:58 ` [PATCH 3/3] mm/huge_memory: only compare PFNs of huge entries on huge fault insert Lorenzo Stoakes (ARM) 2 siblings, 3 replies; 19+ messages in thread From: Lorenzo Stoakes (ARM) @ 2026-11-15 20:58 UTC (permalink / raw) To: Andrew Morton, David Hildenbrand, Liam R. Howlett, Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko, Alex Williamson, Peter Xu, Zi Yan, Baolin Wang, Nico Pache, Ryan Roberts, Dev Jain, Barry Song, Lance Yang, Usama Arif, Kiryl Shutsemau, Wei Liu, Roman Kisel, Saurabh Sengar, Naman Jain, Michael Kelley Cc: ljs, linux-mm, linux-kernel, Eliav Farber, stable, Jose A. Perez de Azpillaga From: Eliav Farber <farbere@amazon.com> A driver that implements both ->fault and ->huge_fault must anticipate concurrent use of both. This can happen, for example, if a user calls prctl(PR_SET_THP_DISABLE) concurrent with faulting, as that only holds the mmap write lock and thus does not exclude faulting threads stabilised by VMA lock. This is not currently safely handled by insert_pfn(), however, which obtains its PTE entry via get_locked_pte(), and treats a NULL return value as an allocation failure, returning VM_FAULT_OOM. The issue is that get_locked_pte() also returns NULL if the PMD entry is not a page table which can happen if a concurrent huge fault installs a huge PMD entry between __handle_mm_fault() observing the PMD entry to be empty and insert_pfn() being invoked. This can result in VM_FAULT_OOM being reported incorrectly. Address this by proactively checking whether a page table allocation actually failed, and returning VM_FAULT_NOPAGE if the NULL indicates that we were raced instead. The same assumption is made in insert_page(), however only DAX implements ->huge_fault and can reach it, and it serialises faults of different orders with its own mapping entry lock, so it does not require a change. Target the commit introducing the first driver able to do this. Link: https://lore.kernel.org/all/20261112051440.16140-3-farbere@amazon.com/ Fixes: f9e54c3a2f5b ("vfio/pci: implement huge_fault support") Cc: stable@vger.kernel.org Suggested-by: Jose A. Perez de Azpillaga <azpijr@gmail.com> Signed-off-by: Eliav Farber <farbere@amazon.com> [ ljs: rewrote commit message, trimmed comment ] Signed-off-by: Lorenzo Stoakes (ARM) <ljs@kernel.org> --- mm/memory.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/mm/memory.c b/mm/memory.c index e03110906aa8..cff39eccfd42 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -2866,10 +2866,17 @@ static vm_fault_t insert_pfn(struct vm_area_struct *vma, unsigned long addr, struct mm_struct *mm = vma->vm_mm; pte_t *pte, entry; spinlock_t *ptl; + pmd_t *pmd; - pte = get_locked_pte(mm, addr, &ptl); - if (!pte) + pmd = walk_to_pmd(mm, addr); + if (!pmd) return VM_FAULT_OOM; + if (pte_alloc(mm, pmd)) + return VM_FAULT_OOM; + /* We may have raced a huge fault, if so let the fault be retried. */ + pte = pte_offset_map_lock(mm, pmd, addr, &ptl); + if (!pte) + return VM_FAULT_NOPAGE; entry = ptep_get(pte); if (!pte_none(entry)) { if (mkwrite) { -- 2.56.1 ^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [PATCH 2/3] mm/memory: do not report OOM if insert_pfn() races a huge fault 2026-11-15 20:58 ` [PATCH 2/3] mm/memory: do not report OOM if insert_pfn() races a huge fault Lorenzo Stoakes (ARM) @ 2026-11-16 10:36 ` Jose A. Perez de Azpillaga 2026-11-16 15:59 ` David Hildenbrand (Arm) 2026-11-16 18:13 ` Gregory Price (Meta) 2 siblings, 0 replies; 19+ messages in thread From: Jose A. Perez de Azpillaga @ 2026-11-16 10:36 UTC (permalink / raw) To: Lorenzo Stoakes (ARM), Andrew Morton, David Hildenbrand, Liam R. Howlett, Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko, Alex Williamson, Peter Xu, Zi Yan, Baolin Wang, Nico Pache, Ryan Roberts, Dev Jain, Barry Song, Lance Yang, Usama Arif, Kiryl Shutsemau, Wei Liu, Roman Kisel, Saurabh Sengar, Naman Jain, Michael Kelley Cc: linux-mm, linux-kernel, Eliav Farber, stable On 11/15/26 9:58 PM, Lorenzo Stoakes (ARM) wrote: > From: Eliav Farber <farbere@amazon.com> > > A driver that implements both ->fault and ->huge_fault must anticipate > concurrent use of both. > > This can happen, for example, if a user calls prctl(PR_SET_THP_DISABLE) > concurrent with faulting, as that only holds the mmap write lock and thus > does not exclude faulting threads stabilised by VMA lock. > > This is not currently safely handled by insert_pfn(), however, which > obtains its PTE entry via get_locked_pte(), and treats a NULL return value > as an allocation failure, returning VM_FAULT_OOM. > > The issue is that get_locked_pte() also returns NULL if the PMD entry is > not a page table which can happen if a concurrent huge fault installs a > huge PMD entry between __handle_mm_fault() observing the PMD entry to be > empty and insert_pfn() being invoked. > > This can result in VM_FAULT_OOM being reported incorrectly. > > Address this by proactively checking whether a page table allocation > actually failed, and returning VM_FAULT_NOPAGE if the NULL indicates that > we were raced instead. > > The same assumption is made in insert_page(), however only DAX implements > ->huge_fault and can reach it, and it serialises faults of different orders > with its own mapping entry lock, so it does not require a change. > > Target the commit introducing the first driver able to do this. > > Link: https://lore.kernel.org/all/20261112051440.16140-3-farbere@amazon.com/ > Fixes: f9e54c3a2f5b ("vfio/pci: implement huge_fault support") > Cc: stable@vger.kernel.org > Suggested-by: Jose A. Perez de Azpillaga <azpijr@gmail.com> > Signed-off-by: Eliav Farber <farbere@amazon.com> > [ ljs: rewrote commit message, trimmed comment ] > Signed-off-by: Lorenzo Stoakes (ARM) <ljs@kernel.org> LGTM: Reviewed-by: Jose A. Perez de Azpillaga <azpijr@gmail.com> -- cheers, jose a. p-a ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 2/3] mm/memory: do not report OOM if insert_pfn() races a huge fault 2026-11-15 20:58 ` [PATCH 2/3] mm/memory: do not report OOM if insert_pfn() races a huge fault Lorenzo Stoakes (ARM) 2026-11-16 10:36 ` Jose A. Perez de Azpillaga @ 2026-11-16 15:59 ` David Hildenbrand (Arm) 2026-11-16 17:21 ` Lorenzo Stoakes (ARM) 2026-11-16 18:13 ` Gregory Price (Meta) 2 siblings, 1 reply; 19+ messages in thread From: David Hildenbrand (Arm) @ 2026-11-16 15:59 UTC (permalink / raw) To: Lorenzo Stoakes (ARM), Andrew Morton, Liam R. Howlett, Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko, Alex Williamson, Peter Xu, Zi Yan, Baolin Wang, Nico Pache, Ryan Roberts, Dev Jain, Barry Song, Lance Yang, Usama Arif, Kiryl Shutsemau, Wei Liu, Roman Kisel, Saurabh Sengar, Naman Jain, Michael Kelley Cc: linux-mm, linux-kernel, Eliav Farber, stable, Jose A. Perez de Azpillaga On 11/15/26 21:58, Lorenzo Stoakes (ARM) wrote: > From: Eliav Farber <farbere@amazon.com> > > A driver that implements both ->fault and ->huge_fault must anticipate > concurrent use of both. > > This can happen, for example, if a user calls prctl(PR_SET_THP_DISABLE) > concurrent with faulting, as that only holds the mmap write lock and thus > does not exclude faulting threads stabilised by VMA lock. > > This is not currently safely handled by insert_pfn(), however, which > obtains its PTE entry via get_locked_pte(), and treats a NULL return value > as an allocation failure, returning VM_FAULT_OOM. > > The issue is that get_locked_pte() also returns NULL if the PMD entry is > not a page table which can happen if a concurrent huge fault installs a > huge PMD entry between __handle_mm_fault() observing the PMD entry to be > empty and insert_pfn() being invoked. > > This can result in VM_FAULT_OOM being reported incorrectly. > > Address this by proactively checking whether a page table allocation > actually failed, and returning VM_FAULT_NOPAGE if the NULL indicates that > we were raced instead. > > The same assumption is made in insert_page(), however only DAX implements > ->huge_fault and can reach it, and it serialises faults of different orders > with its own mapping entry lock, so it does not require a change. > > Target the commit introducing the first driver able to do this. > > Link: https://lore.kernel.org/all/20261112051440.16140-3-farbere@amazon.com/ > Fixes: f9e54c3a2f5b ("vfio/pci: implement huge_fault support") > Cc: stable@vger.kernel.org > Suggested-by: Jose A. Perez de Azpillaga <azpijr@gmail.com> > Signed-off-by: Eliav Farber <farbere@amazon.com> > [ ljs: rewrote commit message, trimmed comment ] > Signed-off-by: Lorenzo Stoakes (ARM) <ljs@kernel.org> > --- > mm/memory.c | 11 +++++++++-- > 1 file changed, 9 insertions(+), 2 deletions(-) > > diff --git a/mm/memory.c b/mm/memory.c > index e03110906aa8..cff39eccfd42 100644 > --- a/mm/memory.c > +++ b/mm/memory.c > @@ -2866,10 +2866,17 @@ static vm_fault_t insert_pfn(struct vm_area_struct *vma, unsigned long addr, > struct mm_struct *mm = vma->vm_mm; > pte_t *pte, entry; > spinlock_t *ptl; > + pmd_t *pmd; > > - pte = get_locked_pte(mm, addr, &ptl); > - if (!pte) > + pmd = walk_to_pmd(mm, addr); > + if (!pmd) > return VM_FAULT_OOM; > + if (pte_alloc(mm, pmd)) > + return VM_FAULT_OOM; > + /* We may have raced a huge fault, if so let the fault be retried. */ > + pte = pte_offset_map_lock(mm, pmd, addr, &ptl); > + if (!pte) > + return VM_FAULT_NOPAGE; Same question, what if we would stumble over a PUD entry, how would we handle that today? I'd assume we'd also want to return VM_FAULT_NOPAGE instead of VM_FAULT_OOM. -- Cheers, David ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 2/3] mm/memory: do not report OOM if insert_pfn() races a huge fault 2026-11-16 15:59 ` David Hildenbrand (Arm) @ 2026-11-16 17:21 ` Lorenzo Stoakes (ARM) 2026-11-16 20:10 ` David Hildenbrand (Arm) 0 siblings, 1 reply; 19+ messages in thread From: Lorenzo Stoakes (ARM) @ 2026-11-16 17:21 UTC (permalink / raw) To: David Hildenbrand (Arm) Cc: Andrew Morton, Liam R. Howlett, Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko, Alex Williamson, Peter Xu, Zi Yan, Baolin Wang, Nico Pache, Ryan Roberts, Dev Jain, Barry Song, Lance Yang, Usama Arif, Kiryl Shutsemau, Wei Liu, Roman Kisel, Saurabh Sengar, Naman Jain, Michael Kelley, linux-mm, linux-kernel, Eliav Farber, stable, Jose A. Perez de Azpillaga On Mon, Nov 16, 2026 at 04:59:35PM +0100, David Hildenbrand (Arm) wrote: > On 11/15/26 21:58, Lorenzo Stoakes (ARM) wrote: > > From: Eliav Farber <farbere@amazon.com> > > > > A driver that implements both ->fault and ->huge_fault must anticipate > > concurrent use of both. > > > > This can happen, for example, if a user calls prctl(PR_SET_THP_DISABLE) > > concurrent with faulting, as that only holds the mmap write lock and thus > > does not exclude faulting threads stabilised by VMA lock. > > > > This is not currently safely handled by insert_pfn(), however, which > > obtains its PTE entry via get_locked_pte(), and treats a NULL return value > > as an allocation failure, returning VM_FAULT_OOM. > > > > The issue is that get_locked_pte() also returns NULL if the PMD entry is > > not a page table which can happen if a concurrent huge fault installs a > > huge PMD entry between __handle_mm_fault() observing the PMD entry to be > > empty and insert_pfn() being invoked. > > > > This can result in VM_FAULT_OOM being reported incorrectly. > > > > Address this by proactively checking whether a page table allocation > > actually failed, and returning VM_FAULT_NOPAGE if the NULL indicates that > > we were raced instead. > > > > The same assumption is made in insert_page(), however only DAX implements > > ->huge_fault and can reach it, and it serialises faults of different orders > > with its own mapping entry lock, so it does not require a change. > > > > Target the commit introducing the first driver able to do this. > > > > Link: https://lore.kernel.org/all/20261112051440.16140-3-farbere@amazon.com/ > > Fixes: f9e54c3a2f5b ("vfio/pci: implement huge_fault support") > > Cc: stable@vger.kernel.org > > Suggested-by: Jose A. Perez de Azpillaga <azpijr@gmail.com> > > Signed-off-by: Eliav Farber <farbere@amazon.com> > > [ ljs: rewrote commit message, trimmed comment ] > > Signed-off-by: Lorenzo Stoakes (ARM) <ljs@kernel.org> > > --- > > mm/memory.c | 11 +++++++++-- > > 1 file changed, 9 insertions(+), 2 deletions(-) > > > > diff --git a/mm/memory.c b/mm/memory.c > > index e03110906aa8..cff39eccfd42 100644 > > --- a/mm/memory.c > > +++ b/mm/memory.c > > @@ -2866,10 +2866,17 @@ static vm_fault_t insert_pfn(struct vm_area_struct *vma, unsigned long addr, > > struct mm_struct *mm = vma->vm_mm; > > pte_t *pte, entry; > > spinlock_t *ptl; > > + pmd_t *pmd; > > > > - pte = get_locked_pte(mm, addr, &ptl); > > - if (!pte) > > + pmd = walk_to_pmd(mm, addr); > > + if (!pmd) > > return VM_FAULT_OOM; > > + if (pte_alloc(mm, pmd)) > > + return VM_FAULT_OOM; > > + /* We may have raced a huge fault, if so let the fault be retried. */ > > + pte = pte_offset_map_lock(mm, pmd, addr, &ptl); > > + if (!pte) > > + return VM_FAULT_NOPAGE; > > Same question, what if we would stumble over a PUD entry, how would we handle > that today? I'd assume we'd also want to return VM_FAULT_NOPAGE instead of > VM_FAULT_OOM. It can't for similar reasons. Actually changing this would require changing walk_to_pmd() a fair bit so it can distinguish a failure to allocate from that, and I'm not sure it's worth doing that at this point, better as follow-up? > > > -- > Cheers, > > David -- Cheers, Lorenzo ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 2/3] mm/memory: do not report OOM if insert_pfn() races a huge fault 2026-11-16 17:21 ` Lorenzo Stoakes (ARM) @ 2026-11-16 20:10 ` David Hildenbrand (Arm) 0 siblings, 0 replies; 19+ messages in thread From: David Hildenbrand (Arm) @ 2026-11-16 20:10 UTC (permalink / raw) To: Lorenzo Stoakes (ARM) Cc: Andrew Morton, Liam R. Howlett, Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko, Alex Williamson, Peter Xu, Zi Yan, Baolin Wang, Nico Pache, Ryan Roberts, Dev Jain, Barry Song, Lance Yang, Usama Arif, Kiryl Shutsemau, Wei Liu, Roman Kisel, Saurabh Sengar, Naman Jain, Michael Kelley, linux-mm, linux-kernel, Eliav Farber, stable, Jose A. Perez de Azpillaga On 11/16/26 18:21, Lorenzo Stoakes (ARM) wrote: > On Mon, Nov 16, 2026 at 04:59:35PM +0100, David Hildenbrand (Arm) wrote: >> On 11/15/26 21:58, Lorenzo Stoakes (ARM) wrote: >>> From: Eliav Farber <farbere@amazon.com> >>> >>> A driver that implements both ->fault and ->huge_fault must anticipate >>> concurrent use of both. >>> >>> This can happen, for example, if a user calls prctl(PR_SET_THP_DISABLE) >>> concurrent with faulting, as that only holds the mmap write lock and thus >>> does not exclude faulting threads stabilised by VMA lock. >>> >>> This is not currently safely handled by insert_pfn(), however, which >>> obtains its PTE entry via get_locked_pte(), and treats a NULL return value >>> as an allocation failure, returning VM_FAULT_OOM. >>> >>> The issue is that get_locked_pte() also returns NULL if the PMD entry is >>> not a page table which can happen if a concurrent huge fault installs a >>> huge PMD entry between __handle_mm_fault() observing the PMD entry to be >>> empty and insert_pfn() being invoked. >>> >>> This can result in VM_FAULT_OOM being reported incorrectly. >>> >>> Address this by proactively checking whether a page table allocation >>> actually failed, and returning VM_FAULT_NOPAGE if the NULL indicates that >>> we were raced instead. >>> >>> The same assumption is made in insert_page(), however only DAX implements >>> ->huge_fault and can reach it, and it serialises faults of different orders >>> with its own mapping entry lock, so it does not require a change. >>> >>> Target the commit introducing the first driver able to do this. >>> >>> Link: https://lore.kernel.org/all/20261112051440.16140-3-farbere@amazon.com/ >>> Fixes: f9e54c3a2f5b ("vfio/pci: implement huge_fault support") >>> Cc: stable@vger.kernel.org >>> Suggested-by: Jose A. Perez de Azpillaga <azpijr@gmail.com> >>> Signed-off-by: Eliav Farber <farbere@amazon.com> >>> [ ljs: rewrote commit message, trimmed comment ] >>> Signed-off-by: Lorenzo Stoakes (ARM) <ljs@kernel.org> >>> --- >>> mm/memory.c | 11 +++++++++-- >>> 1 file changed, 9 insertions(+), 2 deletions(-) >>> >>> diff --git a/mm/memory.c b/mm/memory.c >>> index e03110906aa8..cff39eccfd42 100644 >>> --- a/mm/memory.c >>> +++ b/mm/memory.c >>> @@ -2866,10 +2866,17 @@ static vm_fault_t insert_pfn(struct vm_area_struct *vma, unsigned long addr, >>> struct mm_struct *mm = vma->vm_mm; >>> pte_t *pte, entry; >>> spinlock_t *ptl; >>> + pmd_t *pmd; >>> >>> - pte = get_locked_pte(mm, addr, &ptl); >>> - if (!pte) >>> + pmd = walk_to_pmd(mm, addr); >>> + if (!pmd) >>> return VM_FAULT_OOM; >>> + if (pte_alloc(mm, pmd)) >>> + return VM_FAULT_OOM; >>> + /* We may have raced a huge fault, if so let the fault be retried. */ >>> + pte = pte_offset_map_lock(mm, pmd, addr, &ptl); >>> + if (!pte) >>> + return VM_FAULT_NOPAGE; >> >> Same question, what if we would stumble over a PUD entry, how would we handle >> that today? I'd assume we'd also want to return VM_FAULT_NOPAGE instead of >> VM_FAULT_OOM. > > It can't for similar reasons. > > Actually changing this would require changing walk_to_pmd() a fair bit so it can > distinguish a failure to allocate from that, and I'm not sure it's worth doing > that at this point, better as follow-up? There are only two users in mm/memory.c right? I'd just make the whole thing less shaky right away, but whatever you prefer! -- Cheers, David ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 2/3] mm/memory: do not report OOM if insert_pfn() races a huge fault 2026-11-15 20:58 ` [PATCH 2/3] mm/memory: do not report OOM if insert_pfn() races a huge fault Lorenzo Stoakes (ARM) 2026-11-16 10:36 ` Jose A. Perez de Azpillaga 2026-11-16 15:59 ` David Hildenbrand (Arm) @ 2026-11-16 18:13 ` Gregory Price (Meta) 2 siblings, 0 replies; 19+ messages in thread From: Gregory Price (Meta) @ 2026-11-16 18:13 UTC (permalink / raw) To: Lorenzo Stoakes (ARM) Cc: Andrew Morton, David Hildenbrand, Liam R. Howlett, Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko, Alex Williamson, Peter Xu, Zi Yan, Baolin Wang, Nico Pache, Ryan Roberts, Dev Jain, Barry Song, Lance Yang, Usama Arif, Kiryl Shutsemau, Wei Liu, Roman Kisel, Saurabh Sengar, Naman Jain, Michael Kelley, linux-mm, linux-kernel, Eliav Farber, stable, Jose A. Perez de Azpillaga On 2026-11-15 20:58 +0000, Lorenzo Stoakes (ARM) wrote: > From: Eliav Farber <farbere@amazon.com> > > A driver that implements both ->fault and ->huge_fault must anticipate > concurrent use of both. > > This can happen, for example, if a user calls prctl(PR_SET_THP_DISABLE) > concurrent with faulting, as that only holds the mmap write lock and thus > does not exclude faulting threads stabilised by VMA lock. > > This is not currently safely handled by insert_pfn(), however, which > obtains its PTE entry via get_locked_pte(), and treats a NULL return value > as an allocation failure, returning VM_FAULT_OOM. > > The issue is that get_locked_pte() also returns NULL if the PMD entry is > not a page table which can happen if a concurrent huge fault installs a > huge PMD entry between __handle_mm_fault() observing the PMD entry to be > empty and insert_pfn() being invoked. > > This can result in VM_FAULT_OOM being reported incorrectly. > > Address this by proactively checking whether a page table allocation > actually failed, and returning VM_FAULT_NOPAGE if the NULL indicates that > we were raced instead. > > The same assumption is made in insert_page(), however only DAX implements > ->huge_fault and can reach it, and it serialises faults of different orders > with its own mapping entry lock, so it does not require a change. > > Target the commit introducing the first driver able to do this. > > Link: https://lore.kernel.org/all/20261112051440.16140-3-farbere@amazon.com/ > Fixes: f9e54c3a2f5b ("vfio/pci: implement huge_fault support") > Cc: stable@vger.kernel.org > Suggested-by: Jose A. Perez de Azpillaga <azpijr@gmail.com> > Signed-off-by: Eliav Farber <farbere@amazon.com> > [ ljs: rewrote commit message, trimmed comment ] > Signed-off-by: Lorenzo Stoakes (ARM) <ljs@kernel.org> Tested with the same test from patch 1, observed the leaked OOM faults and this patch resolves it. Makes me wonder whether patch 1 and 2 should just be a single patch to avoid bad backports. Either way: Tested-by: Gregory Price (Meta) <gourry@gourry.net> Reviewed-by: Gregory Price (Meta) <gourry@gourry.net> -- ~Gregory ^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 3/3] mm/huge_memory: only compare PFNs of huge entries on huge fault insert 2026-11-15 20:58 [PATCH 0/3] mm: fix races between huge and non-huge faults in PFN mappings Lorenzo Stoakes (ARM) 2026-11-15 20:58 ` [PATCH 1/3] mm/memory: remove racy huge PMD assertion from walk_to_pmd() Lorenzo Stoakes (ARM) 2026-11-15 20:58 ` [PATCH 2/3] mm/memory: do not report OOM if insert_pfn() races a huge fault Lorenzo Stoakes (ARM) @ 2026-11-15 20:58 ` Lorenzo Stoakes (ARM) 2026-11-16 10:42 ` Jose A. Perez de Azpillaga ` (2 more replies) 2 siblings, 3 replies; 19+ messages in thread From: Lorenzo Stoakes (ARM) @ 2026-11-15 20:58 UTC (permalink / raw) To: Andrew Morton, David Hildenbrand, Liam R. Howlett, Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko, Alex Williamson, Peter Xu, Zi Yan, Baolin Wang, Nico Pache, Ryan Roberts, Dev Jain, Barry Song, Lance Yang, Usama Arif, Kiryl Shutsemau, Wei Liu, Roman Kisel, Saurabh Sengar, Naman Jain, Michael Kelley Cc: ljs, linux-mm, linux-kernel, Eliav Farber, stable A driver that implements both ->fault and ->huge_fault must anticipate concurrent use of both. This can happen, for example, if a user calls prctl(PR_SET_THP_DISABLE) concurrent with faulting, as that only holds the mmap write lock and thus does not exclude faulting threads stabilised by VMA lock. insert_pmd() and insert_pud() have issues with this as they both assume that, if the page table entry being populated is not empty, it must a present huge entry. This is problematic as if it is a write fault, it compares its PFN against the one being inserted, warning if they differ, on the assumption that the entry is a huge leaf. Since the entry may be a page table, this is invalid and can result in spurious warnings. Equally, the entry might be non-present. Nothing can install such an entry in the VMAs that reach this code today, but there is no reason to rely upon that. Therefore only examine the PFN if the entry is both present and huge, and otherwise simply return VM_FAULT_NOPAGE so the fault is retried and handled at the appropriate level. This is what already happens for a read fault, for which the existing entry is not examined at all. Target the commit which introduced the first driver which both mixes fault orders and passes the write flag for the fix (since this commit, both drm_gem_shmem and panthor are prey to this issue). Reported-by: Eliav Farber <farbere@amazon.com> Closes: https://lore.kernel.org/all/20261112051440.16140-4-farbere@amazon.com/ Fixes: 7bfe3b8ea6e3 ("Drivers: hv: Introduce mshv_vtl driver") Cc: stable@vger.kernel.org Signed-off-by: Lorenzo Stoakes (ARM) <ljs@kernel.org> --- mm/huge_memory.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 0d589be136d2..da632c3e834b 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -1643,6 +1643,10 @@ static vm_fault_t insert_pmd(struct vm_area_struct *vma, unsigned long addr, const unsigned long pfn = fop.is_folio ? folio_pfn(fop.folio) : fop.pfn; + /* We may have raced a fault which installed a page table. */ + if (!pmd_present(*pmd) || !pmd_trans_huge(*pmd)) + goto out_unlock; + if (write) { if (pmd_pfn(*pmd) != pfn) { WARN_ON_ONCE(!is_huge_zero_pmd(*pmd)); @@ -1770,6 +1774,10 @@ static vm_fault_t insert_pud(struct vm_area_struct *vma, unsigned long addr, const unsigned long pfn = fop.is_folio ? folio_pfn(fop.folio) : fop.pfn; + /* We may have raced a fault which installed a page table. */ + if (!pud_present(*pud) || !pud_trans_huge(*pud)) + goto out_unlock; + if (write) { if (WARN_ON_ONCE(pud_pfn(*pud) != pfn)) goto out_unlock; -- 2.56.1 ^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [PATCH 3/3] mm/huge_memory: only compare PFNs of huge entries on huge fault insert 2026-11-15 20:58 ` [PATCH 3/3] mm/huge_memory: only compare PFNs of huge entries on huge fault insert Lorenzo Stoakes (ARM) @ 2026-11-16 10:42 ` Jose A. Perez de Azpillaga 2026-11-16 16:01 ` David Hildenbrand (Arm) 2026-11-16 18:22 ` Gregory Price (Meta) 2 siblings, 0 replies; 19+ messages in thread From: Jose A. Perez de Azpillaga @ 2026-11-16 10:42 UTC (permalink / raw) To: Lorenzo Stoakes (ARM), Andrew Morton, David Hildenbrand, Liam R. Howlett, Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko, Alex Williamson, Peter Xu, Zi Yan, Baolin Wang, Nico Pache, Ryan Roberts, Dev Jain, Barry Song, Lance Yang, Usama Arif, Kiryl Shutsemau, Wei Liu, Roman Kisel, Saurabh Sengar, Naman Jain, Michael Kelley Cc: linux-mm, linux-kernel, Eliav Farber, stable On 11/15/26 9:58 PM, Lorenzo Stoakes (ARM) wrote: > A driver that implements both ->fault and ->huge_fault must anticipate > concurrent use of both. > > This can happen, for example, if a user calls prctl(PR_SET_THP_DISABLE) > concurrent with faulting, as that only holds the mmap write lock and thus > does not exclude faulting threads stabilised by VMA lock. > > insert_pmd() and insert_pud() have issues with this as they both assume > that, if the page table entry being populated is not empty, it must a > present huge entry. > > This is problematic as if it is a write fault, it compares its PFN against > the one being inserted, warning if they differ, on the assumption that the > entry is a huge leaf. > > Since the entry may be a page table, this is invalid and can result in > spurious warnings. > > Equally, the entry might be non-present. Nothing can install such an entry > in the VMAs that reach this code today, but there is no reason to rely upon > that. > > Therefore only examine the PFN if the entry is both present and huge, and > otherwise simply return VM_FAULT_NOPAGE so the fault is retried and handled > at the appropriate level. > > This is what already happens for a read fault, for which the existing entry > is not examined at all. > > Target the commit which introduced the first driver which both mixes fault > orders and passes the write flag for the fix (since this commit, both > drm_gem_shmem and panthor are prey to this issue). > > Reported-by: Eliav Farber <farbere@amazon.com> > Closes: https://lore.kernel.org/all/20261112051440.16140-4-farbere@amazon.com/ > Fixes: 7bfe3b8ea6e3 ("Drivers: hv: Introduce mshv_vtl driver") > Cc: stable@vger.kernel.org > Signed-off-by: Lorenzo Stoakes (ARM) <ljs@kernel.org> LGTM: Reviewed-by: Jose A. Perez de Azpillaga <azpijr@gmail.com> -- cheers, jose a. p-a ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 3/3] mm/huge_memory: only compare PFNs of huge entries on huge fault insert 2026-11-15 20:58 ` [PATCH 3/3] mm/huge_memory: only compare PFNs of huge entries on huge fault insert Lorenzo Stoakes (ARM) 2026-11-16 10:42 ` Jose A. Perez de Azpillaga @ 2026-11-16 16:01 ` David Hildenbrand (Arm) 2026-11-16 16:55 ` Lorenzo Stoakes (ARM) 2026-11-16 18:22 ` Gregory Price (Meta) 2 siblings, 1 reply; 19+ messages in thread From: David Hildenbrand (Arm) @ 2026-11-16 16:01 UTC (permalink / raw) To: Lorenzo Stoakes (ARM), Andrew Morton, Liam R. Howlett, Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko, Alex Williamson, Peter Xu, Zi Yan, Baolin Wang, Nico Pache, Ryan Roberts, Dev Jain, Barry Song, Lance Yang, Usama Arif, Kiryl Shutsemau, Wei Liu, Roman Kisel, Saurabh Sengar, Naman Jain, Michael Kelley Cc: linux-mm, linux-kernel, Eliav Farber, stable On 11/15/26 21:58, Lorenzo Stoakes (ARM) wrote: > A driver that implements both ->fault and ->huge_fault must anticipate > concurrent use of both. > > This can happen, for example, if a user calls prctl(PR_SET_THP_DISABLE) > concurrent with faulting, as that only holds the mmap write lock and thus > does not exclude faulting threads stabilised by VMA lock. > > insert_pmd() and insert_pud() have issues with this as they both assume > that, if the page table entry being populated is not empty, it must a > present huge entry. > > This is problematic as if it is a write fault, it compares its PFN against > the one being inserted, warning if they differ, on the assumption that the > entry is a huge leaf. > > Since the entry may be a page table, this is invalid and can result in > spurious warnings. > > Equally, the entry might be non-present. Nothing can install such an entry > in the VMAs that reach this code today, but there is no reason to rely upon > that. > > Therefore only examine the PFN if the entry is both present and huge, and > otherwise simply return VM_FAULT_NOPAGE so the fault is retried and handled > at the appropriate level. > > This is what already happens for a read fault, for which the existing entry > is not examined at all. > > Target the commit which introduced the first driver which both mixes fault > orders and passes the write flag for the fix (since this commit, both > drm_gem_shmem and panthor are prey to this issue). > > Reported-by: Eliav Farber <farbere@amazon.com> > Closes: https://lore.kernel.org/all/20261112051440.16140-4-farbere@amazon.com/ > Fixes: 7bfe3b8ea6e3 ("Drivers: hv: Introduce mshv_vtl driver") > Cc: stable@vger.kernel.org > Signed-off-by: Lorenzo Stoakes (ARM) <ljs@kernel.org> > --- > mm/huge_memory.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/mm/huge_memory.c b/mm/huge_memory.c > index 0d589be136d2..da632c3e834b 100644 > --- a/mm/huge_memory.c > +++ b/mm/huge_memory.c > @@ -1643,6 +1643,10 @@ static vm_fault_t insert_pmd(struct vm_area_struct *vma, unsigned long addr, > const unsigned long pfn = fop.is_folio ? folio_pfn(fop.folio) : > fop.pfn; > > + /* We may have raced a fault which installed a page table. */ > + if (!pmd_present(*pmd) || !pmd_trans_huge(*pmd)) Ok, we hold the PMD lock, so that cannot change concurrently. Given that we are in THP code, I wonder if we could just test for pmd_leaf() instead. Same below for PUDs. Acked-by: David Hildenbrand (Arm) <david@kernel.org> -- Cheers, David ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 3/3] mm/huge_memory: only compare PFNs of huge entries on huge fault insert 2026-11-16 16:01 ` David Hildenbrand (Arm) @ 2026-11-16 16:55 ` Lorenzo Stoakes (ARM) 2026-11-16 20:09 ` David Hildenbrand (Arm) 0 siblings, 1 reply; 19+ messages in thread From: Lorenzo Stoakes (ARM) @ 2026-11-16 16:55 UTC (permalink / raw) To: David Hildenbrand (Arm) Cc: Andrew Morton, Liam R. Howlett, Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko, Alex Williamson, Peter Xu, Zi Yan, Baolin Wang, Nico Pache, Ryan Roberts, Dev Jain, Barry Song, Lance Yang, Usama Arif, Kiryl Shutsemau, Wei Liu, Roman Kisel, Saurabh Sengar, Naman Jain, Michael Kelley, linux-mm, linux-kernel, Eliav Farber, stable On Mon, Nov 16, 2026 at 05:01:52PM +0100, David Hildenbrand (Arm) wrote: > On 11/15/26 21:58, Lorenzo Stoakes (ARM) wrote: > > A driver that implements both ->fault and ->huge_fault must anticipate > > concurrent use of both. > > > > This can happen, for example, if a user calls prctl(PR_SET_THP_DISABLE) > > concurrent with faulting, as that only holds the mmap write lock and thus > > does not exclude faulting threads stabilised by VMA lock. > > > > insert_pmd() and insert_pud() have issues with this as they both assume > > that, if the page table entry being populated is not empty, it must a > > present huge entry. > > > > This is problematic as if it is a write fault, it compares its PFN against > > the one being inserted, warning if they differ, on the assumption that the > > entry is a huge leaf. > > > > Since the entry may be a page table, this is invalid and can result in > > spurious warnings. > > > > Equally, the entry might be non-present. Nothing can install such an entry > > in the VMAs that reach this code today, but there is no reason to rely upon > > that. > > > > Therefore only examine the PFN if the entry is both present and huge, and > > otherwise simply return VM_FAULT_NOPAGE so the fault is retried and handled > > at the appropriate level. > > > > This is what already happens for a read fault, for which the existing entry > > is not examined at all. > > > > Target the commit which introduced the first driver which both mixes fault > > orders and passes the write flag for the fix (since this commit, both > > drm_gem_shmem and panthor are prey to this issue). > > > > Reported-by: Eliav Farber <farbere@amazon.com> > > Closes: https://lore.kernel.org/all/20261112051440.16140-4-farbere@amazon.com/ > > Fixes: 7bfe3b8ea6e3 ("Drivers: hv: Introduce mshv_vtl driver") > > Cc: stable@vger.kernel.org > > Signed-off-by: Lorenzo Stoakes (ARM) <ljs@kernel.org> > > --- > > mm/huge_memory.c | 8 ++++++++ > > 1 file changed, 8 insertions(+) > > > > diff --git a/mm/huge_memory.c b/mm/huge_memory.c > > index 0d589be136d2..da632c3e834b 100644 > > --- a/mm/huge_memory.c > > +++ b/mm/huge_memory.c > > @@ -1643,6 +1643,10 @@ static vm_fault_t insert_pmd(struct vm_area_struct *vma, unsigned long addr, > > const unsigned long pfn = fop.is_folio ? folio_pfn(fop.folio) : > > fop.pfn; > > > > + /* We may have raced a fault which installed a page table. */ > > + if (!pmd_present(*pmd) || !pmd_trans_huge(*pmd)) > > Ok, we hold the PMD lock, so that cannot change concurrently. > > Given that we are in THP code, I wonder if we could just test for pmd_leaf() > instead. > > Same below for PUDs. That's what the original did, but as the commit message says I don't want to rely on the entry not being a softleaf here, in case we do something later that changes that. It's future-proofing. > > Acked-by: David Hildenbrand (Arm) <david@kernel.org> Thanks! > > -- > Cheers, > > David -- Cheers, Lorenzo ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 3/3] mm/huge_memory: only compare PFNs of huge entries on huge fault insert 2026-11-16 16:55 ` Lorenzo Stoakes (ARM) @ 2026-11-16 20:09 ` David Hildenbrand (Arm) 0 siblings, 0 replies; 19+ messages in thread From: David Hildenbrand (Arm) @ 2026-11-16 20:09 UTC (permalink / raw) To: Lorenzo Stoakes (ARM) Cc: Andrew Morton, Liam R. Howlett, Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko, Alex Williamson, Peter Xu, Zi Yan, Baolin Wang, Nico Pache, Ryan Roberts, Dev Jain, Barry Song, Lance Yang, Usama Arif, Kiryl Shutsemau, Wei Liu, Roman Kisel, Saurabh Sengar, Naman Jain, Michael Kelley, linux-mm, linux-kernel, Eliav Farber, stable On 11/16/26 17:55, Lorenzo Stoakes (ARM) wrote: > On Mon, Nov 16, 2026 at 05:01:52PM +0100, David Hildenbrand (Arm) wrote: >> On 11/15/26 21:58, Lorenzo Stoakes (ARM) wrote: >>> A driver that implements both ->fault and ->huge_fault must anticipate >>> concurrent use of both. >>> >>> This can happen, for example, if a user calls prctl(PR_SET_THP_DISABLE) >>> concurrent with faulting, as that only holds the mmap write lock and thus >>> does not exclude faulting threads stabilised by VMA lock. >>> >>> insert_pmd() and insert_pud() have issues with this as they both assume >>> that, if the page table entry being populated is not empty, it must a >>> present huge entry. >>> >>> This is problematic as if it is a write fault, it compares its PFN against >>> the one being inserted, warning if they differ, on the assumption that the >>> entry is a huge leaf. >>> >>> Since the entry may be a page table, this is invalid and can result in >>> spurious warnings. >>> >>> Equally, the entry might be non-present. Nothing can install such an entry >>> in the VMAs that reach this code today, but there is no reason to rely upon >>> that. >>> >>> Therefore only examine the PFN if the entry is both present and huge, and >>> otherwise simply return VM_FAULT_NOPAGE so the fault is retried and handled >>> at the appropriate level. >>> >>> This is what already happens for a read fault, for which the existing entry >>> is not examined at all. >>> >>> Target the commit which introduced the first driver which both mixes fault >>> orders and passes the write flag for the fix (since this commit, both >>> drm_gem_shmem and panthor are prey to this issue). >>> >>> Reported-by: Eliav Farber <farbere@amazon.com> >>> Closes: https://lore.kernel.org/all/20261112051440.16140-4-farbere@amazon.com/ >>> Fixes: 7bfe3b8ea6e3 ("Drivers: hv: Introduce mshv_vtl driver") >>> Cc: stable@vger.kernel.org >>> Signed-off-by: Lorenzo Stoakes (ARM) <ljs@kernel.org> >>> --- >>> mm/huge_memory.c | 8 ++++++++ >>> 1 file changed, 8 insertions(+) >>> >>> diff --git a/mm/huge_memory.c b/mm/huge_memory.c >>> index 0d589be136d2..da632c3e834b 100644 >>> --- a/mm/huge_memory.c >>> +++ b/mm/huge_memory.c >>> @@ -1643,6 +1643,10 @@ static vm_fault_t insert_pmd(struct vm_area_struct *vma, unsigned long addr, >>> const unsigned long pfn = fop.is_folio ? folio_pfn(fop.folio) : >>> fop.pfn; >>> >>> + /* We may have raced a fault which installed a page table. */ >>> + if (!pmd_present(*pmd) || !pmd_trans_huge(*pmd)) >> >> Ok, we hold the PMD lock, so that cannot change concurrently. >> >> Given that we are in THP code, I wonder if we could just test for pmd_leaf() >> instead. >> >> Same below for PUDs. > > That's what the original did, but as the commit message says I don't want > to rely on the entry not being a softleaf here, in case we do something > later that changes that. Oh, I was talking about: if (!pmd_present(*pmd) || !pmd_leaf(*pmd)) Which is our common way of saying if (!(pmd_present(*pmd) && pmd_leaf(*pmd))) "This is not a page table". Anyhow, getting rid of pmd_trans_huge() doesn't have highest priority right now. -- Cheers, David ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 3/3] mm/huge_memory: only compare PFNs of huge entries on huge fault insert 2026-11-15 20:58 ` [PATCH 3/3] mm/huge_memory: only compare PFNs of huge entries on huge fault insert Lorenzo Stoakes (ARM) 2026-11-16 10:42 ` Jose A. Perez de Azpillaga 2026-11-16 16:01 ` David Hildenbrand (Arm) @ 2026-11-16 18:22 ` Gregory Price (Meta) 2 siblings, 0 replies; 19+ messages in thread From: Gregory Price (Meta) @ 2026-11-16 18:22 UTC (permalink / raw) To: Lorenzo Stoakes (ARM) Cc: Andrew Morton, David Hildenbrand, Liam R. Howlett, Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko, Alex Williamson, Peter Xu, Zi Yan, Baolin Wang, Nico Pache, Ryan Roberts, Dev Jain, Barry Song, Lance Yang, Usama Arif, Kiryl Shutsemau, Wei Liu, Roman Kisel, Saurabh Sengar, Naman Jain, Michael Kelley, linux-mm, linux-kernel, Eliav Farber, stable On 2026-11-15 20:58 +0000, Lorenzo Stoakes (ARM) wrote: > A driver that implements both ->fault and ->huge_fault must anticipate > concurrent use of both. > > This can happen, for example, if a user calls prctl(PR_SET_THP_DISABLE) > concurrent with faulting, as that only holds the mmap write lock and thus > does not exclude faulting threads stabilised by VMA lock. > > insert_pmd() and insert_pud() have issues with this as they both assume > that, if the page table entry being populated is not empty, it must a > present huge entry. > > This is problematic as if it is a write fault, it compares its PFN against > the one being inserted, warning if they differ, on the assumption that the > entry is a huge leaf. > > Since the entry may be a page table, this is invalid and can result in > spurious warnings. > > Equally, the entry might be non-present. Nothing can install such an entry > in the VMAs that reach this code today, but there is no reason to rely upon > that. > > Therefore only examine the PFN if the entry is both present and huge, and > otherwise simply return VM_FAULT_NOPAGE so the fault is retried and handled > at the appropriate level. > > This is what already happens for a read fault, for which the existing entry > is not examined at all. > > Target the commit which introduced the first driver which both mixes fault > orders and passes the write flag for the fix (since this commit, both > drm_gem_shmem and panthor are prey to this issue). > > Reported-by: Eliav Farber <farbere@amazon.com> > Closes: https://lore.kernel.org/all/20261112051440.16140-4-farbere@amazon.com/ > Fixes: 7bfe3b8ea6e3 ("Drivers: hv: Introduce mshv_vtl driver") > Cc: stable@vger.kernel.org > Signed-off-by: Lorenzo Stoakes (ARM) <ljs@kernel.org> Tested with a similar test to patch 1, but used QEMU's virtio-gpu device to generate the bad condition. With just patch 1 applied we generate a bunch of warnings, while this resolves those warnings. Rethinking whether any of these should be squashed, and maybe not. Really i guess patch 1 just mask's the bugs, and patches 2/3 fix them. Either way, change looks straightforward to me. Tested-by: Gregory Price (Meta) <gourry@gourry.net> Reviewed-by: Gregory Price (Meta) <gourry@gourry.net> -- ~Gregory ^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2026-11-16 20:10 UTC | newest] Thread overview: 19+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-11-15 20:58 [PATCH 0/3] mm: fix races between huge and non-huge faults in PFN mappings Lorenzo Stoakes (ARM) 2026-11-15 20:58 ` [PATCH 1/3] mm/memory: remove racy huge PMD assertion from walk_to_pmd() Lorenzo Stoakes (ARM) 2026-11-16 10:35 ` Jose A. Perez de Azpillaga 2026-11-16 15:56 ` David Hildenbrand (Arm) 2026-11-16 17:10 ` Lorenzo Stoakes (ARM) 2026-11-16 20:06 ` David Hildenbrand (Arm) 2026-11-16 17:40 ` Gregory Price (Meta) 2026-11-15 20:58 ` [PATCH 2/3] mm/memory: do not report OOM if insert_pfn() races a huge fault Lorenzo Stoakes (ARM) 2026-11-16 10:36 ` Jose A. Perez de Azpillaga 2026-11-16 15:59 ` David Hildenbrand (Arm) 2026-11-16 17:21 ` Lorenzo Stoakes (ARM) 2026-11-16 20:10 ` David Hildenbrand (Arm) 2026-11-16 18:13 ` Gregory Price (Meta) 2026-11-15 20:58 ` [PATCH 3/3] mm/huge_memory: only compare PFNs of huge entries on huge fault insert Lorenzo Stoakes (ARM) 2026-11-16 10:42 ` Jose A. Perez de Azpillaga 2026-11-16 16:01 ` David Hildenbrand (Arm) 2026-11-16 16:55 ` Lorenzo Stoakes (ARM) 2026-11-16 20:09 ` David Hildenbrand (Arm) 2026-11-16 18:22 ` Gregory Price (Meta)
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox