Re: [PATCH] selftests/prctl: Fix non-anonymous VMA mapping in set-anon-vma-name test

Hongfu Li <[email protected]>
Newsgroups gmane.linux.kernel
Message-ID <[email protected]>
> AI review found one glitch which I don't think we need to care about:
> 	https://sashiko.dev/#/patchset/[email protected]
> 
> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.