lkml.org 
[lkml]   [2026]   [Aug]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] uprobes: Skip breakpoint installation on non executable vmas
> > Even though it's the same file offset, it is mapped to two different
> > virtual addresses, so I think it should be two different memory pages
> > that will have two separate int3 instructions. I don't think there is
> > any contradiction or surprise, is there?
>
> True. cross checked the behaviour with bpftrace stacktrace. Pasted the
> output in previous thread.

I meant to say the following in response to your reply:
"Even though it's the same file offset, it is mapped to two different
virtual addresses, so I think it should be two different memory pages
that will have two separate int3 instructions."

Right, and traced this behaviour using bpftrace stacktrace. stacktrace
is pasted in the previous thread.

> > > > Installing a breakpoint for mapping without VM_EXEC and
> > > > updating usdt reference counter in that case is not useful.
> > > >
> > > > Skip non VM_EXEC mappings in install_breakpoint(). This fixes semaphore
> > > > double increment as shown in the above usecase.
> >
> > You said that mapping is VM_MAYEXEC, which means that kernel allows to
> > re-mmap it as executable, if that happens, we will miss uprobe in that
> > location, so that's probably why breakpoint is installed for
> > VM_MAYEXEC.

ref commit 78a320542e6c ("uprobes: Change valid_vma() to demand
VM_MAYEXEC rather than VM_EXEC")

Thank you

\
 
 \ /
  Last update: 2026-08-06 00:05    [W:0.072 / U:2.317 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog