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] [day] [month] [year] [list]
Message-Id: <20241128044831.1672-1-hdanton@sina.com>
Date: Thu, 28 Nov 2024 12:48:31 +0800
From: Hillf Danton <hdanton@...a.com>
To: Alexei Starovoitov <alexei.starovoitov@...il.com>
Cc: Andrii Nakryiko <andrii.nakryiko@...il.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Ruan Bonan <bonan.ruan@...us.edu>,
	Steven Rostedt <rostedt@...dmis.org>,
	LKML <linux-kernel@...r.kernel.org>,
	syzkaller-bugs <syzkaller-bugs@...glegroups.com>,
	Aleksandr Nogikh <nogikh@...gle.com>,
	BPF <bpf@...r.kernel.org>
Subject: Re: [BUG] possible deadlock in __schedule (with reproducer available)

On Wed, 27 Nov 2024 18:27:57 -0800 Alexei Starovoitov <alexei.starovoitov@...il.com>
> On Wed, Nov 27, 2024 at 3:04 PM Hillf Danton <hdanton@...a.com> wrote:
> > On Tue, 26 Nov 2024 13:15:48 -0800 Andrii Nakryiko <andrii.nakryiko@...il.com>
> > > On Mon, Nov 25, 2024 at 1:44 AM Peter Zijlstra <peterz@...radead.org> wrote:
> > > > On Mon, Nov 25, 2024 at 05:24:05AM +0000, Ruan Bonan wrote:
> > > >
> > > > > From the discussion, it appears that the root cause might involve
> > > > > specific printk or BPF operations in the given context. To clarify and
> > > > > possibly avoid similar issues in the future, are there guidelines or
> > > > > best practices for writing BPF programs/hooks that interact with
> > > > > tracepoints, especially those related to scheduler events, to prevent
> > > > > such deadlocks?
> > > >
> > > > The general guideline and recommendation for all tracepoints is to be
> > > > wait-free. Typically all tracer code should be.
> > > >
> > > > Now, BPF (users) (ab)uses tracepoints to do all sorts and takes certain
> > > > liberties with them, but it is very much at the discretion of the BPF
> > > > user.
> > >
> > > We do assume that tracepoints are just like kprobes and can run in
> > > NMI. And in this case BPF is just a vehicle to trigger a
> > > promised-to-be-wait-free strncpy_from_user_nofault(). That's as far as
> > > BPF involvement goes, we should stop discussing BPF in this context,
> > > it's misleading.
> > >
> > Given known issue, syzbot should run without bpf enabled before it is fixed
> > to avoid more useless discussing and misleading.
> 
> If you cared to read the thread it would have been obvious
> that printk is the culprit. Tell syzbot to run without printk?
>
Printk is innocent, and it makes no sense to put the gun vendor into
jail simply because bpf shoot a sheriff in the cafeteira.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ