Re: [RFC PATCH] mm/mmap: Fix uprobe anon page be overwritten when expanding vma during mremap

From: Oleg Nesterov
Date: Mon May 26 2025 - 12:30:46 EST


On 05/25, David Hildenbrand wrote:
>
> On 25.05.25 11:59, Oleg Nesterov wrote:
> >
> >OK. But do you see any reason why uprobe_mmap() should be ever called during
> >mremap() ?
>
> Only when growing a VMA: we might now cover a part with a uprobe, which we
> have take care of.

Ah, indeed, thank you...

But. What if mremap() expands and moves a VMA? it seems to me that in
this case uprobe_mmap() won't be called? I'll try to make the test-case
to check...

Oleg.