From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Daniel Borkmann <daniel@iogearbox.net>
Cc: Breno Leitao <leitao@debian.org>,
Jakub Kicinski <kuba@kernel.org>,
razor@blackwall.org, andrii@kernel.org, ast@kernel.org,
syzbot <syzbot+08811615f0e17bc6708b@syzkaller.appspotmail.com>,
bpf@vger.kernel.org, davem@davemloft.net, eddyz87@gmail.com,
haoluo@google.com, hawk@kernel.org, john.fastabend@gmail.com,
jolsa@kernel.org, kpsingh@kernel.org,
linux-kernel@vger.kernel.org, martin.lau@linux.dev,
netdev@vger.kernel.org, sdf@fomichev.me, song@kernel.org,
syzkaller-bugs@googlegroups.com, yonghong.song@linux.dev
Subject: Re: [PATCH net-net] tun: Assign missing bpf_net_context.
Date: Mon, 16 Sep 2024 12:19:42 +0200 [thread overview]
Message-ID: <20240916101942.ZJP2h0NM@linutronix.de> (raw)
In-Reply-To: <ccd708bf-580a-3d24-e5be-4e7dc12e7b39@iogearbox.net>
On 2024-09-12 17:03:15 [+0200], Daniel Borkmann wrote:
>
> Oh well, quite annoying that we need this context now everywhere also outside of XDP :(
> Sebastian, do you see any way where this could be noop for !PREEMPT_RT?
This isn't related to XDP but to the redirect part of BPF which is (or
was) using per-CPU variables.
I don't know how much pain it causes here for you and how much of this
is actually helping and not making anything worse:
- If netkit::active is likely to be NULL you could limit assigning the
context only if it != NULL
- If you can ensure (via verifier) that netkit_run() won't access the
redirect helper (such as bpf_redirect()) and won't return
NETKIT_REDIRECT (as a consequence) then the assignment could be
avoided in this case.
Sebastian
next prev parent reply other threads:[~2024-09-16 10:19 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-01 20:19 [syzbot] [net?] [bpf?] general protection fault in dev_map_redirect syzbot
2024-07-02 18:40 ` Jakub Kicinski
2024-07-03 12:27 ` [PATCH net-net] tun: Assign missing bpf_net_context Sebastian Andrzej Siewior
2024-07-03 19:01 ` Jakub Kicinski
2024-07-03 19:21 ` Sebastian Andrzej Siewior
2024-07-04 10:14 ` [PATCH v2 " Sebastian Andrzej Siewior
2024-07-04 14:24 ` Jakub Kicinski
2024-07-04 14:48 ` [PATCH v3 net-next] " Sebastian Andrzej Siewior
2024-07-06 0:10 ` patchwork-bot+netdevbpf
2024-09-12 12:06 ` [PATCH net-net] " Breno Leitao
2024-09-12 12:28 ` Sebastian Andrzej Siewior
2024-09-12 13:17 ` Breno Leitao
2024-09-12 13:32 ` Vadim Fedorenko
2024-09-12 14:19 ` Breno Leitao
2024-09-12 14:30 ` Sebastian Andrzej Siewior
2024-09-12 14:40 ` Breno Leitao
2024-09-12 13:33 ` Sebastian Andrzej Siewior
2024-09-12 15:03 ` Daniel Borkmann
2024-09-16 10:19 ` Sebastian Andrzej Siewior [this message]
2024-09-12 14:24 ` Toke Høiland-Jørgensen
2024-07-06 6:21 ` [syzbot] [bpf?] [net?] general protection fault in dev_map_redirect syzbot
2024-07-06 13:13 ` Sebastian Andrzej Siewior
2024-07-06 13:38 ` syzbot
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=20240916101942.ZJP2h0NM@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=eddyz87@gmail.com \
--cc=haoluo@google.com \
--cc=hawk@kernel.org \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=kuba@kernel.org \
--cc=leitao@debian.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=netdev@vger.kernel.org \
--cc=razor@blackwall.org \
--cc=sdf@fomichev.me \
--cc=song@kernel.org \
--cc=syzbot+08811615f0e17bc6708b@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
--cc=yonghong.song@linux.dev \
/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;
as well as URLs for NNTP newsgroup(s).