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: <CAADnVQKEKLPvy5etjRvF12hbi4cgZrnXvx6tEfu9aRF4eZv+Ew@mail.gmail.com>
Date: Wed, 1 Oct 2025 07:02:55 -0700
From: Alexei Starovoitov <alexei.starovoitov@...il.com>
To: Jiri Olsa <olsajiri@...il.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>, bpf <bpf@...r.kernel.org>, 
	Daniel Borkmann <daniel@...earbox.net>, Andrii Nakryiko <andrii@...nel.org>, 
	Martin KaFai Lau <martin.lau@...nel.org>, Peter Zijlstra <peterz@...radead.org>, 
	Jakub Kicinski <kuba@...nel.org>, LKML <linux-kernel@...r.kernel.org>, 
	Ingo Molnar <mingo@...nel.org>, Network Development <netdev@...r.kernel.org>
Subject: Re: [GIT PULL] BPF changes for 6.18

On Wed, Oct 1, 2025 at 5:26 AM Jiri Olsa <olsajiri@...il.com> wrote:
>
> On Wed, Oct 01, 2025 at 12:58:29PM +0200, Jiri Olsa wrote:
> > On Tue, Sep 30, 2025 at 07:09:43PM -0700, Linus Torvalds wrote:
> > > [ Jiri added to participants ]
> > >
> > > On Sun, 28 Sept 2025 at 08:46, Alexei Starovoitov
> > > <alexei.starovoitov@...il.com> wrote:
> > > >
> > > > Note, there is a trivial conflict between tip and bpf-next trees:
> > > > in kernel/events/uprobes.c between commit:
> > > >   4363264111e12 ("uprobe: Do not emulate/sstep original instruction when ip is changed")
> > > > from the bpf-next tree and commit:
> > > >   ba2bfc97b4629 ("uprobes/x86: Add support to optimize uprobes")
> > > > from the tip tree:
> > > > https://lore.kernel.org/all/aNVMR5rjA2geHNLn@sirena.org.uk/
> > > > since Jiri's two separate uprobe/bpf related patch series landed
> > > > in different trees. One was mostly uprobe. Another was mostly bpf.
> > >
> > > So the conflict isn't complicated and I did it the way linux-next did
> > > it, but honestly, the placement of that arch_uprobe_optimize() thing
> > > isn't obvious.
> > >
> > > My first reaction was to put it before the instruction_pointer()
> > > check, because it seems like whatever rewriting the arch wants to do
> > > might as well be done regardless.
> > >
> > > It's very confusing how it's sometimes skipped, and sometimes not
> > > skipped. For example. if the uprobe is skipped because of
> > > single-stepping disabling it, the arch optimization still *will* be
> > > done, because the "skip_sstep()" test is done after - but other
> > > skipping tests are done before.
> > >
> > > Jiri, it would be good to just add a note about when that optimization
> > > is done and when not done. Because as-is, it's very confusing.
> > >
> > > The answer may well be "it doesn't matter, semantics are the same" (I
> > > suspect that _is_ the answer), but even so that current ordering is
> > > just confusing when it sometimes goes through that
> > > arch_uprobe_optimize() and sometimes skips it.
> >
> > yes, either way will work fine, but perhaps the other way round to
> > first optimize and then skip uprobe if needed is less confusing
> >
> > >
> > > Side note: the conflict in the selftests was worse, and the magic to
> > > build it is not obvious. It errors out randomly with various kernel
> > > configs with useless error messages, and I eventually just gave up
> > > entirely with a
> > >
> > >    attempt to use poisoned ‘gettid’
> > >
> > > error.
> > >
> > >              Linus
> >
> > I ended up with changes below, should I send formal patches?
>
> I sent out the bpf selftest fixes:
>   https://lore.kernel.org/bpf/20251001122223.170830-1-jolsa@kernel.org/T/#t

Applied selftests fixes to make CI green(at) again.
uprobe patch should probably go via tip.

Will send bpf.git PR in a day or two with a couple more fixes.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ