All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Lorenzo Stoakes (ARM)" <ljs@kernel.org>
Cc: kvmarm@lists.linux.dev, linux-trace-kernel@vger.kernel.org,
	linux-rdma@vger.kernel.org, linux-s390@vger.kernel.org,
	dri-devel@lists.freedesktop.org, kvm@vger.kernel.org,
	bpf@vger.kernel.org, "Alexander Gordeev" <agordeev@linux.ibm.com>,
	"Vasily Gorbik" <gor@linux.ibm.com>,
	"Heiko Carstens" <hca@linux.ibm.com>,
	"Christian Borntraeger" <borntraeger@linux.ibm.com>,
	linux-perf-users@vger.kernel.org,
	"Oliver Upton" <oupton@kernel.org>,
	linux-scsi@vger.kernel.org, selinux@vger.kernel.org,
	"Marc Zyngier" <maz@kernel.org>
Subject: Re: [PATCH v4 31/38] mm/uffd: use predicates for userfaultfd checks
Date: Sat, 03 Oct 2026 17:57:10 +0000	[thread overview]
Message-ID: <20261003175711.39CE41F0089E@smtp.kernel.org> (raw)
In-Reply-To: <20261003-b4-mmap-prepare-vma-flag-sanify-v4-31-a1f052500fd7@kernel.org>

> Rather than directly checking VMA flags, use the newly introduced
> vma_is_mm_managed() and vma_is_mm_backed() helpers in userfaultfd
> when assessing VMA suitability for userfaultfd and UFFDIO_MOVE.
> 
> Update vma_move_compatible() so it's expressed in terms of VMA
> characteristics rather than arbitrary flags.
> 
> Additionally, update the use of the deprecated VMA flag API when checking
> VMA_SHADOW_STACK_BIT.
> 
> A VMA_IO_BIT check is no longer required but that is fine as a hard
> invariant has been established that mm-managed mappings may not set
> VMA_IO_BIT so the check is now redundant.
> 
> Acked-by: Zi Yan <ziy@nvidia.com>
> Signed-off-by: Lorenzo Stoakes (ARM) <ljs@kernel.org>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261003-b4-mmap-prepare-vma-flag-sanify-v4-0-a1f052500fd7@kernel.org?part=31


  reply	other threads:[~2026-10-03 17:57 UTC|newest]

Thread overview: 209+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-03 16:32 [PATCH v4 00/38] mm: make VMA flag semantics explicit, eliminate VM_SPECIAL Lorenzo Stoakes (ARM)
2026-10-03 16:32 ` Lorenzo Stoakes (ARM)
2026-10-03 16:32 ` Lorenzo Stoakes (ARM)
2026-10-03 16:32 ` [PATCH v4 01/38] mm/vma: fix mmap_prepare file handling, remove file_doesnt_need_get Lorenzo Stoakes (ARM)
2026-10-03 16:32   ` Lorenzo Stoakes (ARM)
2026-10-03 16:32   ` Lorenzo Stoakes (ARM)
2026-10-03 17:56   ` sashiko-bot
2026-10-04 17:10   ` Suren Baghdasaryan
2026-10-04 17:10     ` Suren Baghdasaryan
2026-10-04 17:10     ` Suren Baghdasaryan
2026-10-03 16:32 ` [PATCH v4 02/38] mm/vma: introduce and use vma_[flags_]can_merge() Lorenzo Stoakes (ARM)
2026-10-03 16:32   ` Lorenzo Stoakes (ARM)
2026-10-03 16:32   ` Lorenzo Stoakes (ARM)
2026-10-03 17:56   ` sashiko-bot
2026-10-03 16:32 ` [PATCH v4 03/38] mm: consistently validate VMA state after mmap[_prepare] hooks Lorenzo Stoakes (ARM)
2026-10-03 16:32   ` Lorenzo Stoakes (ARM)
2026-10-03 16:32   ` Lorenzo Stoakes (ARM)
2026-10-03 17:57   ` sashiko-bot
2026-10-07  7:09   ` [PATCH] mm/vma: clear vm_file before unmap on mmap hook failure Oleg Keri
2026-10-07 17:18     ` Andrew Morton
2026-10-07 19:47       ` [PATCH v2] mm/vma: keep the unlinked VMA off the file across " Oleg Keri
2026-10-07 21:53         ` Andrew Morton
2026-10-08  0:55           ` Bert Karwatzki
2026-10-09 11:29           ` Lorenzo Stoakes (ARM)
2026-10-08 21:48         ` Ihor Solodrai
2026-10-09 11:31           ` Lorenzo Stoakes (ARM)
2026-10-09 16:38             ` Ihor Solodrai
2026-10-09 17:04               ` Lorenzo Stoakes (ARM)
2026-10-03 16:32 ` [PATCH v4 04/38] mm/vma: ensure mmap_prepare doesn't set actions on a mergeable vma Lorenzo Stoakes (ARM)
2026-10-03 16:32   ` Lorenzo Stoakes (ARM)
2026-10-03 16:32   ` Lorenzo Stoakes (ARM)
2026-10-03 17:56   ` sashiko-bot
2026-10-03 16:32 ` [PATCH v4 05/38] mm: make map_kernel_pages_[prepare,complete] internal and unexported Lorenzo Stoakes (ARM)
2026-10-03 16:32   ` Lorenzo Stoakes (ARM)
2026-10-03 16:32   ` Lorenzo Stoakes (ARM)
2026-10-03 17:56   ` sashiko-bot
2026-10-03 16:32 ` [PATCH v4 06/38] mm/vma: tidy up map kernel pages enum values Lorenzo Stoakes (ARM)
2026-10-03 16:32   ` Lorenzo Stoakes (ARM)
2026-10-03 16:32   ` Lorenzo Stoakes (ARM)
2026-10-03 17:56   ` sashiko-bot
2026-10-03 16:32 ` [PATCH v4 07/38] mm: add mmap action for discontiguous kernel page mapping Lorenzo Stoakes (ARM)
2026-10-03 16:32   ` Lorenzo Stoakes (ARM)
2026-10-03 16:32   ` Lorenzo Stoakes (ARM)
2026-10-03 17:56   ` sashiko-bot
2026-10-04 17:11   ` Suren Baghdasaryan
2026-10-04 17:11     ` Suren Baghdasaryan
2026-10-04 17:11     ` Suren Baghdasaryan
2026-10-09 16:56     ` Lorenzo Stoakes (ARM)
2026-10-09 16:56       ` Lorenzo Stoakes (ARM)
2026-10-03 16:32 ` [PATCH v4 08/38] docs: filesystems: update mmap_prepare docs for discontig kernel pgs Lorenzo Stoakes (ARM)
2026-10-03 16:32   ` Lorenzo Stoakes (ARM)
2026-10-03 16:32   ` Lorenzo Stoakes (ARM)
2026-10-03 17:56   ` sashiko-bot
2026-10-04 17:13   ` Suren Baghdasaryan
2026-10-04 17:13     ` Suren Baghdasaryan
2026-10-04 17:13     ` Suren Baghdasaryan
2026-10-03 16:32 ` [PATCH v4 09/38] drivers/usb/mon: update to use mmap_prepare + map kernel pages Lorenzo Stoakes (ARM)
2026-10-03 16:32   ` Lorenzo Stoakes (ARM)
2026-10-03 16:32   ` Lorenzo Stoakes (ARM)
2026-10-03 17:57   ` sashiko-bot
2026-10-04 17:18   ` Suren Baghdasaryan
2026-10-04 17:18     ` Suren Baghdasaryan
2026-10-04 17:18     ` Suren Baghdasaryan
2026-10-03 16:32 ` [PATCH v4 10/38] infiniband: update hfi1 to use remap_vmalloc_range() Lorenzo Stoakes (ARM)
2026-10-03 16:32   ` Lorenzo Stoakes (ARM)
2026-10-03 16:32   ` Lorenzo Stoakes (ARM)
2026-10-03 17:57   ` sashiko-bot
2026-10-03 16:32 ` [PATCH v4 11/38] selinux: reject writable opens of policy file, drop mmap shared/write check Lorenzo Stoakes (ARM)
2026-10-03 16:32   ` Lorenzo Stoakes (ARM)
2026-10-03 16:32   ` Lorenzo Stoakes (ARM)
2026-10-03 17:56   ` sashiko-bot
2026-10-04 17:19   ` Suren Baghdasaryan
2026-10-04 17:19     ` Suren Baghdasaryan
2026-10-04 17:19     ` Suren Baghdasaryan
2026-10-03 16:32 ` [PATCH v4 12/38] ALSA: pcm: use vm_insert_page() to map PCM status page Lorenzo Stoakes (ARM)
2026-10-03 16:32   ` Lorenzo Stoakes (ARM)
2026-10-03 16:32   ` Lorenzo Stoakes (ARM)
2026-10-03 17:57   ` sashiko-bot
2026-10-04 17:22   ` Suren Baghdasaryan
2026-10-04 17:22     ` Suren Baghdasaryan
2026-10-04 17:22     ` Suren Baghdasaryan
2026-10-03 16:32 ` [PATCH v4 13/38] bpf: arena: mark arena_map_mmap() mappings VM_MIXEDMAP Lorenzo Stoakes (ARM)
2026-10-03 16:32   ` Lorenzo Stoakes (ARM)
2026-10-03 16:32   ` Lorenzo Stoakes (ARM)
2026-10-03 17:56   ` sashiko-bot
2026-10-04 17:24   ` Suren Baghdasaryan
2026-10-04 17:24     ` Suren Baghdasaryan
2026-10-04 17:24     ` Suren Baghdasaryan
2026-10-03 16:32 ` [PATCH v4 14/38] mm/vma: add vma[_flags]_is_mm_managed() predicates Lorenzo Stoakes (ARM)
2026-10-03 16:32   ` Lorenzo Stoakes (ARM)
2026-10-03 16:32   ` Lorenzo Stoakes (ARM)
2026-10-03 17:56   ` sashiko-bot
2026-10-04 17:43   ` Suren Baghdasaryan
2026-10-04 17:43     ` Suren Baghdasaryan
2026-10-04 17:43     ` Suren Baghdasaryan
2026-10-03 16:32 ` [PATCH v4 15/38] mm/vma: only allow mmap to clear VMA_MAYWRITE_BIT if not mm-managed Lorenzo Stoakes (ARM)
2026-10-03 16:32   ` Lorenzo Stoakes (ARM)
2026-10-03 16:32   ` Lorenzo Stoakes (ARM)
2026-10-03 17:56   ` sashiko-bot
2026-10-03 16:32 ` [PATCH v4 16/38] mm/vma: add and use vma_[flags]_is_fixed_mapping Lorenzo Stoakes (ARM)
2026-10-03 16:32   ` Lorenzo Stoakes (ARM)
2026-10-03 16:32   ` Lorenzo Stoakes (ARM)
2026-10-03 17:56   ` sashiko-bot
2026-10-04 17:52   ` Suren Baghdasaryan
2026-10-04 17:52     ` Suren Baghdasaryan
2026-10-04 17:52     ` Suren Baghdasaryan
2026-10-03 16:32 ` [PATCH v4 17/38] scsi: sg: convert mmap hook to mmap_prepare and rework Lorenzo Stoakes (ARM)
2026-10-03 16:32   ` Lorenzo Stoakes (ARM)
2026-10-03 16:32   ` Lorenzo Stoakes (ARM)
2026-10-03 17:57   ` sashiko-bot
2026-10-04 17:54   ` Suren Baghdasaryan
2026-10-04 17:54     ` Suren Baghdasaryan
2026-10-04 17:54     ` Suren Baghdasaryan
2026-10-03 16:32 ` [PATCH v4 18/38] fbdev: defio: assert FBINFO_VIRTFB, drop VM_IO, add VM_MIXEDMAP Lorenzo Stoakes (ARM)
2026-10-03 16:32   ` Lorenzo Stoakes (ARM)
2026-10-03 16:32   ` Lorenzo Stoakes (ARM)
2026-10-03 17:56   ` sashiko-bot
2026-10-04 18:02   ` Suren Baghdasaryan
2026-10-04 18:02     ` Suren Baghdasaryan
2026-10-04 18:02     ` Suren Baghdasaryan
2026-10-03 16:32 ` [PATCH v4 19/38] HSI: cmt_speech: convert mmap hook to mmap_prepare, refactor Lorenzo Stoakes (ARM)
2026-10-03 16:32   ` Lorenzo Stoakes (ARM)
2026-10-03 16:32   ` Lorenzo Stoakes (ARM)
2026-10-03 17:57   ` sashiko-bot
2026-10-04 18:09   ` Suren Baghdasaryan
2026-10-04 18:09     ` Suren Baghdasaryan
2026-10-04 18:09     ` Suren Baghdasaryan
2026-10-03 16:32 ` [PATCH v4 20/38] mm/gup: error out early on !VMA_MAYREAD_BIT VMAs Lorenzo Stoakes (ARM)
2026-10-03 16:32   ` Lorenzo Stoakes (ARM)
2026-10-03 16:32   ` Lorenzo Stoakes (ARM)
2026-10-03 17:56   ` sashiko-bot
2026-10-04 18:24   ` Suren Baghdasaryan
2026-10-04 18:24     ` Suren Baghdasaryan
2026-10-04 18:24     ` Suren Baghdasaryan
2026-10-03 16:32 ` [PATCH v4 21/38] uprobes: remove VM_IO, set VM_MIXEDMAP for mapped kernel pages Lorenzo Stoakes (ARM)
2026-10-03 16:32   ` Lorenzo Stoakes (ARM)
2026-10-03 16:32   ` Lorenzo Stoakes (ARM)
2026-10-03 17:57   ` sashiko-bot
2026-10-04 18:39   ` Suren Baghdasaryan
2026-10-04 18:39     ` Suren Baghdasaryan
2026-10-04 18:39     ` Suren Baghdasaryan
2026-10-03 16:32 ` [PATCH v4 22/38] mm/mlock: clear VMA_LOCKED_MASK over mmap callback Lorenzo Stoakes (ARM)
2026-10-03 16:32   ` Lorenzo Stoakes (ARM)
2026-10-03 16:32   ` Lorenzo Stoakes (ARM)
2026-10-03 17:57   ` sashiko-bot
2026-10-03 16:32 ` [PATCH v4 23/38] mm/mlock: eliminate weird VMA_IO_BIT abuse and simplify Lorenzo Stoakes (ARM)
2026-10-03 16:32   ` Lorenzo Stoakes (ARM)
2026-10-03 16:32   ` Lorenzo Stoakes (ARM)
2026-10-03 17:56   ` sashiko-bot
2026-10-03 16:32 ` [PATCH v4 24/38] mm/vma: enforce that mm-managed mappings may not set VMA_IO_BIT Lorenzo Stoakes (ARM)
2026-10-03 16:32   ` Lorenzo Stoakes (ARM)
2026-10-03 16:32   ` Lorenzo Stoakes (ARM)
2026-10-03 17:56   ` sashiko-bot
2026-10-03 16:32 ` [PATCH v4 25/38] mm: remove VMA_IO_BIT check in vma[_flags]_is_mm_managed() Lorenzo Stoakes (ARM)
2026-10-03 16:32   ` Lorenzo Stoakes (ARM)
2026-10-03 16:32   ` Lorenzo Stoakes (ARM)
2026-10-03 17:56   ` sashiko-bot
2026-10-03 16:32 ` [PATCH v4 26/38] mm: remove hugetlb_inline.h Lorenzo Stoakes (ARM)
2026-10-03 16:32   ` Lorenzo Stoakes (ARM)
2026-10-03 16:32   ` Lorenzo Stoakes (ARM)
2026-10-03 17:56   ` sashiko-bot
2026-10-03 16:32 ` [PATCH v4 27/38] mm: rename is_vm_hugetlb_page() to vma_is_hugetlb() Lorenzo Stoakes (ARM)
2026-10-03 16:32   ` Lorenzo Stoakes (ARM)
2026-10-03 16:32   ` Lorenzo Stoakes (ARM)
2026-10-03 17:56   ` sashiko-bot
2026-10-03 16:32 ` [PATCH v4 28/38] mm: drop some redundant checks around hugetlb VMAs Lorenzo Stoakes (ARM)
2026-10-03 16:32   ` Lorenzo Stoakes (ARM)
2026-10-03 16:32   ` Lorenzo Stoakes (ARM)
2026-10-03 17:56   ` sashiko-bot
2026-10-03 16:33 ` [PATCH v4 29/38] mm/madvise: update is_valid_guard_vma() to use vma_can_merge() Lorenzo Stoakes (ARM)
2026-10-03 16:33   ` Lorenzo Stoakes (ARM)
2026-10-03 16:33   ` Lorenzo Stoakes (ARM)
2026-10-03 17:57   ` sashiko-bot
2026-10-03 16:33 ` [PATCH v4 30/38] mm/vma: introduce vma[_flags]_is_mm_backed() Lorenzo Stoakes (ARM)
2026-10-03 16:33   ` Lorenzo Stoakes (ARM)
2026-10-03 16:33   ` Lorenzo Stoakes (ARM)
2026-10-03 17:57   ` sashiko-bot
2026-10-03 16:33 ` [PATCH v4 31/38] mm/uffd: use predicates for userfaultfd checks Lorenzo Stoakes (ARM)
2026-10-03 16:33   ` Lorenzo Stoakes (ARM)
2026-10-03 16:33   ` Lorenzo Stoakes (ARM)
2026-10-03 17:57   ` sashiko-bot [this message]
2026-10-03 16:33 ` [PATCH v4 32/38] mm/madvise: use predicates for madvise(..., MADV_DOFORK) Lorenzo Stoakes (ARM)
2026-10-03 16:33   ` Lorenzo Stoakes (ARM)
2026-10-03 16:33   ` Lorenzo Stoakes (ARM)
2026-10-03 17:57   ` sashiko-bot
2026-10-03 16:33 ` [PATCH v4 33/38] mm: eliminate VMA_SPECIAL_FLAGS usage when hugetlb explicitly tested Lorenzo Stoakes (ARM)
2026-10-03 16:33   ` Lorenzo Stoakes (ARM)
2026-10-03 16:33   ` Lorenzo Stoakes (ARM)
2026-10-03 17:57   ` sashiko-bot
2026-10-03 16:33 ` [PATCH v4 34/38] mm: eliminate VMA_SPECIAL_FLAGS check in lru_gen_look_around() Lorenzo Stoakes (ARM)
2026-10-03 16:33   ` Lorenzo Stoakes (ARM)
2026-10-03 16:33   ` Lorenzo Stoakes (ARM)
2026-10-03 17:57   ` sashiko-bot
2026-10-03 16:33 ` [PATCH v4 35/38] mm: avoid use of VMA_SPECIAL_FLAGS in migrate_vma_setup() Lorenzo Stoakes (ARM)
2026-10-03 16:33   ` Lorenzo Stoakes (ARM)
2026-10-03 16:33   ` Lorenzo Stoakes (ARM)
2026-10-03 17:57   ` sashiko-bot
2026-10-03 16:33 ` [PATCH v4 36/38] mm: eliminate VM_SPECIAL, VMA_SPECIAL_FLAGS Lorenzo Stoakes (ARM)
2026-10-03 16:33   ` Lorenzo Stoakes (ARM)
2026-10-03 16:33   ` Lorenzo Stoakes (ARM)
2026-10-03 17:57   ` sashiko-bot
2026-10-03 16:33 ` [PATCH v4 37/38] fuse: dax: do not set VM_MIXEDMAP Lorenzo Stoakes (ARM)
2026-10-03 16:33   ` Lorenzo Stoakes (ARM)
2026-10-03 16:33   ` Lorenzo Stoakes (ARM)
2026-10-03 17:57   ` sashiko-bot
2026-10-03 16:33 ` [PATCH v4 38/38] mm/huge_memory: remove vma_is_special_huge() Lorenzo Stoakes (ARM)
2026-10-03 16:33   ` Lorenzo Stoakes (ARM)
2026-10-03 16:33   ` Lorenzo Stoakes (ARM)
2026-10-03 17:57   ` sashiko-bot

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=20261003175711.39CE41F0089E@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=agordeev@linux.ibm.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=bpf@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.linux.dev \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=ljs@kernel.org \
    --cc=maz@kernel.org \
    --cc=oupton@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=selinux@vger.kernel.org \
    /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.