> GUP cannot be used for VMAs which set VMA_IO_BIT - because memory-mapped > I/O must not be accessed on the user's behalf - or VMA_PFNMAP_BIT - because > PFN maps have no folios which the kernel is permitted to access. > > Rather than keeping these checks open-coded, abstract them to > vma_flags_can_gup() and its VMA wrapper vma_can_gup(). > > A number of other places make the same check to decide whether a mapping > can be populated or accessed as GUP would, so update those too. > > While here, drop a reference to 'special' and replace a use of the > deprecated VMA flags API in vma_dump_size(). > > No functional change intended. > > Signed-off-by: Lorenzo Stoakes (ARM) <[email protected]>
Sashiko has reviewed this patch and found no issues. It looks great! -- Sashiko AI review ยท https://sashiko.dev/#/patchset/20260914-b4-mmap-prepare-vma-flag-sanify-v2-0-7d9781ed5...@kernel.org?part=40
