From: Florian Westphal <fw@strlen.de>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: Kuniyuki Iwashima <kuniyu@google.com>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>, Daniel Xu <dxu@dxuuu.xyz>,
Pablo Neira Ayuso <pablo@netfilter.org>,
Jozsef Kadlecsik <kadlec@netfilter.org>,
Kuniyuki Iwashima <kuni1840@gmail.com>, bpf <bpf@vger.kernel.org>,
Network Development <netdev@vger.kernel.org>,
netfilter-devel <netfilter-devel@vger.kernel.org>,
syzbot+40f772d37250b6d10efc@syzkaller.appspotmail.com
Subject: Re: [PATCH v1 bpf] bpf: Disable migration in nf_hook_run_bpf().
Date: Thu, 17 Jul 2025 23:26:32 +0200 [thread overview]
Message-ID: <aHlqiEaG43iqUsOX@strlen.de> (raw)
In-Reply-To: <CAADnVQJdn5ERUBfmTHAdfmn0dLozcY6FHsHodNnvfOA40GZYWg@mail.gmail.com>
Alexei Starovoitov <alexei.starovoitov@gmail.com> wrote:
> > Let's call migrate_disable() before calling bpf_prog_run() in
> > nf_hook_run_bpf().
Or use bpf_prog_run_pin_on_cpu() which wraps bpf_prog_run().
> > Fixes: 91721c2d02d3 ("netfilter: bpf: Support BPF_F_NETFILTER_IP_DEFRAG in netfilter link")
>
> Fixes tag looks wrong.
> I don't think it's Daniel's defrag series.
> No idea why syzbot bisected it to this commit.
Didn't check but I'd wager the bpf prog attach is rejected due to an
unsupported flag before this commit. Looks like correct tag is
Fixes: fd9c663b9ad6 ("bpf: minimal support for programs hooked into netfilter framework")
I don't see anything that implicitly disables preemption and even 6.4 has
the cant_migrate() call there.
> > + unsigned int ret;
> >
> > - return bpf_prog_run(prog, &ctx);
> > + migrate_disable();
> > + ret = bpf_prog_run(prog, &ctx);
> > + migrate_enable();
>
> The fix looks correct, but we need to root cause it better.
> Why did it start now ?
I guess most people don't have preemptible rcu enabled.
next prev parent reply other threads:[~2025-07-17 21:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-17 18:58 [PATCH v1 bpf] bpf: Disable migration in nf_hook_run_bpf() Kuniyuki Iwashima
2025-07-17 20:54 ` Alexei Starovoitov
2025-07-17 21:26 ` Florian Westphal [this message]
2025-07-17 21:41 ` Kuniyuki Iwashima
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aHlqiEaG43iqUsOX@strlen.de \
--to=fw@strlen.de \
--cc=alexei.starovoitov@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=dxu@dxuuu.xyz \
--cc=kadlec@netfilter.org \
--cc=kuni1840@gmail.com \
--cc=kuniyu@google.com \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
--cc=syzbot+40f772d37250b6d10efc@syzkaller.appspotmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox