lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250904185553.GB23718@redhat.com>
Date: Thu, 4 Sep 2025 20:55:54 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: Andrii Nakryiko <andrii.nakryiko@...il.com>
Cc: Alexei Starovoitov <alexei.starovoitov@...il.com>,
	Jiri Olsa <olsajiri@...il.com>,
	Masami Hiramatsu <mhiramat@...nel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Andrii Nakryiko <andrii@...nel.org>, bpf <bpf@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>,
	linux-trace-kernel <linux-trace-kernel@...r.kernel.org>,
	X86 ML <x86@...nel.org>, Song Liu <songliubraving@...com>,
	Yonghong Song <yhs@...com>,
	John Fastabend <john.fastabend@...il.com>,
	Hao Luo <haoluo@...gle.com>, Steven Rostedt <rostedt@...dmis.org>,
	Ingo Molnar <mingo@...nel.org>
Subject: Re: [PATCH perf/core 02/11] uprobes: Skip emulate/sstep on unique
 uprobe when ip is changed

On 09/04, Andrii Nakryiko wrote:
>
> On Thu, Sep 4, 2025 at 8:02 AM Alexei Starovoitov
> <alexei.starovoitov@...il.com> wrote:
> >
> > On Thu, Sep 4, 2025 at 4:26 AM Oleg Nesterov <oleg@...hat.com> wrote:
> > >
> > > On 09/04, Jiri Olsa wrote:
> > > >
> > > >
> > > > ok, got excited too soon.. so you meant getting rid of is_unique
> > > > check only for this patch and have just change below..  but keep
> > > > the unique/exclusive flag from patch#1
> > >
> > > Yes, this is what I meant,
> > >
> > > > IIUC Andrii would remove the unique flag completely?
> > >
> > > Lets wait for Andrii...
> >
> > Not Andrii, but I see only negatives in this extra flag.
> > It doesn't add any safety or guardrails.
> > No need to pollute uapi with pointless flags.
>
> +1. I think it's fine to just have something like
>
> if (unlikely(instruction_pointer(regs) != bp_vaddr))
>       goto out;
>
> after all uprobe callbacks were processed. Even if every single one of
> them modify IP, the last one that did that wins.

OK. If any consumer can change regs->ip, then I can only repeat:

	Yes... but what if we there are multiple consumers? The 1st one changes
	instruction_pointer, the next is unaware. Or it may change regs->ip too...

> Others (if they care)
> can detect this.

How? If the the consumer which changes regs->ip is not the 1st one?

That said. If you guys don't see a problem - I won't even try to argue.

As I said many times, I have no idea how people actually use uprobes ;)

Oleg.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ