Re: [PATCH] selftests/prctl: Fix non-anonymous VMA mapping in set-anon-vma-name test
From: Hongfu Li
Date: Tue Aug 04 2026 - 07:21:14 EST
> AI review found one glitch which I don't think we need to care about:
> https://sashiko.dev/#/patchset/20260803103046.14324-1-hongfu.li@xxxxxxxxx
>
> and one possible pre-existing issue which is kinda related and which
> you may choose to address. Please take a look and let us know?
Thanks for the review. I've carefully considered the AI review's findings.
The /dev/zero case raised by the AI reviewer may be addressed by commit
cc3b846182db ("mm/vma: make MAP_PRIVATE-mapped /dev/zero mappings truly
anonymous"), which makes these mappings truly anonymous (no vm_file, no
vm_ops). So the vma->vm_file checks in madvise.c should not wrongly
reject them.
That said, I agree that vma_is_anonymous(vma) better expresses the intent
than vma->vm_file in these sites. I'm happy to send a separate patch for
that if needed.
Best regards,
Hongfu