On Thu Sep 17, 2026 at 12:22 PM EDT, Lorenzo Stoakes (ARM) wrote:
> We currently disallow the installation of lightweight guard regions in VMAs
> whose flags intersect VMA_SPECIAL_FLAGS or VMA_HUGETLB_BIT, or
> VMA_LOCKED_BIT unless allow_locked is set.
>
> hugetlb VMAs set VMA_DONTEXPAND_BIT so this was already redundant,
> VMA_SPECIAL_FLAGS already sufficed.
>
> However, now that VMA_IO_BIT is only set if VMA_PFNMAP or VMA_MIXEDMAP_BIT
> is set, this check collapses to being the equivalent of
> !vma_can_merge().
>
> Update is_valid_guard_vma() to reflect this.
>
> No functional change intended.
>
> Signed-off-by: Lorenzo Stoakes (ARM) <[email protected]>
> ---
>  mm/madvise.c | 20 +++++++++++++-------
>  1 file changed, 13 insertions(+), 7 deletions(-)
>
LGTM.

Acked-by: Zi Yan <[email protected]>

-- 
Best Regards,
Yan, Zi

Reply via email to