All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Sumanth Korikkar <sumanthk@linux.ibm.com>
Cc: Jiri Olsa <jolsa@kernel.org>, Andrii Nakryiko <andrii@kernel.org>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
	Ilya Leoshkevich <iii@linux.ibm.com>,
	Heiko Carstens <hca@linux.ibm.com>,
	Vasily Gorbik <gor@linux.ibm.com>,
	Alexander Gordeev <agordeev@linux.ibm.com>
Subject: Re: [PATCH] uprobes: Skip breakpoint installation on non executable vmas
Date: Thu, 6 Aug 2026 17:35:39 +0200	[thread overview]
Message-ID: <anSpyzXNCF_e3NFc@redhat.com> (raw)
In-Reply-To: <anSNg4EA-tUc3C7W@li-0f4bfd12-9554-4bfb-8b14-7ccf0f0767af.ibm.com>

On 08/06, Sumanth Korikkar wrote:
>
> On Thu, Aug 06, 2026 at 01:01:11PM +0200, Oleg Nesterov wrote:
> >
> > 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.

Oleg.


  reply	other threads:[~2026-08-06 15:35 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-05 13:19 [PATCH] uprobes: Skip breakpoint installation on non executable vmas Sumanth Korikkar
2026-08-05 15:14 ` Oleg Nesterov
2026-08-05 17:29   ` Andrii Nakryiko
2026-08-05 18:26     ` Oleg Nesterov
2026-08-05 21:29     ` Sumanth Korikkar
2026-08-05 22:05       ` Sumanth Korikkar
2026-08-05 21:06   ` Sumanth Korikkar
2026-08-06 11:01     ` Oleg Nesterov
2026-08-06 13:34       ` Sumanth Korikkar
2026-08-06 15:35         ` Oleg Nesterov [this message]
2026-08-06 20:42           ` Andrii Nakryiko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=anSpyzXNCF_e3NFc@redhat.com \
    --to=oleg@redhat.com \
    --cc=agordeev@linux.ibm.com \
    --cc=andrii@kernel.org \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=iii@linux.ibm.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=sumanthk@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.