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: <20251218160925.3c02a721@gandalf.local.home>
Date: Thu, 18 Dec 2025 16:09:25 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Alexei Starovoitov <alexei.starovoitov@...il.com>
Cc: liujing40 <liujing.root@...il.com>, Alexei Starovoitov <ast@...nel.org>,
 Daniel Borkmann <daniel@...earbox.net>, Andrii Nakryiko
 <andrii@...nel.org>, Masami Hiramatsu <mhiramat@...nel.org>, Martin KaFai
 Lau <martin.lau@...ux.dev>, Eduard <eddyz87@...il.com>, Song Liu
 <song@...nel.org>, Yonghong Song <yonghong.song@...ux.dev>, John Fastabend
 <john.fastabend@...il.com>, KP Singh <kpsingh@...nel.org>, Stanislav
 Fomichev <sdf@...ichev.me>, Hao Luo <haoluo@...gle.com>, Jiri Olsa
 <jolsa@...nel.org>, bpf <bpf@...r.kernel.org>, LKML
 <linux-kernel@...r.kernel.org>, linux-trace-kernel
 <linux-trace-kernel@...r.kernel.org>, liujing40@...omi.com
Subject: Re: [PATCH 2/2] bpf: Implement kretprobe fallback for kprobe multi
 link

On Thu, 18 Dec 2025 09:53:16 -0800
Alexei Starovoitov <alexei.starovoitov@...il.com> wrote:

> > +static void bpf_kprobe_unregister(struct bpf_kprobe *kps, u32 cnt)
> > +{
> > +       for (int i = 0; i < cnt; i++)
> > +               unregister_kretprobe(&kps[i].rp);
> > +}  
> 
> Nack.
> This is not a good idea.
> unregister_kretprobe() calls synchronize_rcu().
> So the above loop will cause soft lockups for sure.

Looks like it could be replaced with:

	unregister_kretprobes(kps, cnt);

Which unregisters an array of kreptrobes and does a single
synchronize_rcu().

-- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ