[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <962c6be7-e37a-4990-8952-bf8b17f6467d@redhat.com>
Date: Fri, 30 May 2025 20:51:14 +0200
From: David Hildenbrand <david@...hat.com>
To: Pu Lehui <pulehui@...weicloud.com>, mhiramat@...nel.org, oleg@...hat.com,
peterz@...radead.org, akpm@...ux-foundation.org, Liam.Howlett@...cle.com,
lorenzo.stoakes@...cle.com, vbabka@...e.cz, jannh@...gle.com,
pfalcato@...e.de
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org, stable@...r.kernel.org,
pulehui@...wei.com
Subject: Re: [PATCH v1 1/4] mm: Fix uprobe pte be overwritten when expanding
vma
>
> if (vp->remove) {
> @@ -1823,6 +1829,14 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap,
> faulted_in_anon_vma = false;
> }
>
> + /*
> + * If the VMA we are copying might contain a uprobe PTE, ensure
> + * that we do not establish one upon merge. Otherwise, when mremap()
> + * moves page tables, it will orphan the newly created PTE.
> + */
> + if (vma->vm_file)
> + vmg.skip_vma_uprobe = true;
> +
Assuming we extend the VMA on the way (not merge), would we handle that
properly?
Or is that not possible on this code path or already broken either way?
--
Cheers,
David / dhildenb
Powered by blists - more mailing lists