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: <20241127230349.1619-1-hdanton@sina.com>
Date: Thu, 28 Nov 2024 07:03:49 +0800
From: Hillf Danton <hdanton@...a.com>
To: Andrii Nakryiko <andrii.nakryiko@...il.com>
Cc: Peter Zijlstra <peterz@...radead.org>,
	Ruan Bonan <bonan.ruan@...us.edu>,
	Steven Rostedt <rostedt@...dmis.org>,
	Alexei Starovoitov <alexei.starovoitov@...il.com>,
	LKML <linux-kernel@...r.kernel.org>,
	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 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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ