Re: [PATCH v2 1/2] uprobes: skip mappings not managed by core mm

From: Andrii Nakryiko

Date: Fri Dec 04 2026 - 16:18:09 EST


On Thu, Dec 3, 2026 at 5:53 AM Oleg Nesterov <oleg@xxxxxxxxxx> wrote:
>
> On 12/03, David Hildenbrand (Arm) wrote:
> >
> > Further, since commit 83e3dc9a5d4d ("uprobes: simplify
> > find_active_uprobe_rcu() VMA checks"), the uprobe lookups no longer check
> > the VMA flags, assuming that a trap instruction in a VMA implies that we
> > installed a breakpoint there. But we never install breakpoints into
> > some VMAs, such as MAP_SHARED mappings. If the file itself contains a
> > trap instruction at the offset of a uprobe, executing it in such a VMA
> > will find the uprobe, and instead of delivering SIGTRAP, > we let the task
> > loop on that trap instruction forever.
>
> OK, I guess this can really happen if prepare_uprobe() wasn't called...
>
> LGTM,
>
> Acked-by: Oleg Nesterov <oleg@xxxxxxxxxx>
>

LGTM as well

Acked-by: Andrii Nakryiko <andrii@xxxxxxxxxx>