[PATCH v9 02/13] mm/gup: drop secretmem optimization from gup_fast_folio_allowed
David Hildenbrand (Red Hat)
david at kernel.org
Thu Jan 15 12:04:53 PST 2026
On 1/14/26 14:45, Kalyazin, Nikita wrote:
> From: Patrick Roy <patrick.roy at linux.dev>
>
> This drops an optimization in gup_fast_folio_allowed() where
> secretmem_mapping() was only called if CONFIG_SECRETMEM=y. secretmem is
> enabled by default since commit b758fe6df50d ("mm/secretmem: make it on
> by default"), so the secretmem check did not actually end up elided in
> most cases anymore anyway.
>
> This is in preparation of the generalization of handling mappings where
> direct map entries of folios are set to not present. Currently,
> mappings that match this description are secretmem mappings
> (memfd_secret()). Later, some guest_memfd configurations will also fall
> into this category.
>
> Signed-off-by: Patrick Roy <patrick.roy at linux.dev>
> Acked-by: Vlastimil Babka <vbabka at suse.cz>
> Signed-off-by: Nikita Kalyazin <kalyazin at amazon.com>
Acked-by: David Hildenbrand (Red Hat) <david at kernel.org>
--
Cheers
David
More information about the linux-riscv
mailing list