Thread (11 messages) flat view 11 messages, 3 authors, 6d ago

Re: [PATCH] uprobes: Skip breakpoint installation on non executable vmas

From: Andrii Nakryiko <hidden>
Date: 2026-08-06 20:42:23
Also in: lkml

On Thu, Aug 6, 2026 at 8:35 AM Oleg Nesterov [off-list ref] wrote:
On 08/06, Sumanth Korikkar wrote:
quoted
On Thu, Aug 06, 2026 at 01:01:11PM +0200, Oleg Nesterov wrote:
quoted
But your change in install_breakpoint() essentually reverts that commit?
If uprobe_register() -> register_for_each_vma() finds a VM_MAYEXEC vma
without VM_EXEC valid_vma() will return true, but then install_breakpoint()
will fail anyway.
Initially non exec vma will be ignored via uprobe_register(),
install_breakpoint() will reject non vma mappings initially.

As far as I understand,  if mprotect(PROT_EXEC) is performed later by a
process, it adds VM_EXEC flag to vma and calls vma_complete() via
vma_modify_flags(). uprobe_mmap() will then call install_breakpoint()
and now it should succeed because VM_EXEC is set.
Heh, I am stupid the 2nd time in the same thread ;)

Sumanth, thanks for correcting me! It seems that I forgot everything about
these code paths.

Then this change makes more sense, but the VM_EXEC check needs the comment
to explain this all.

However, I personally still don't think it's worth "fixing". But I leave the
decision to Andrii and Jiri who (unlike me) understand how USDT's are used.
I agree, I don't see what needs to be fixed here.
Oleg.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help