[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240912133309.FA7Uul13@linutronix.de>
Date: Thu, 12 Sep 2024 15:33:09 +0200
From: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To: Breno Leitao <leitao@...ian.org>
Cc: Jakub Kicinski <kuba@...nel.org>, andrii@...nel.org, ast@...nel.org,
syzbot <syzbot+08811615f0e17bc6708b@...kaller.appspotmail.com>,
bpf@...r.kernel.org, daniel@...earbox.net, davem@...emloft.net,
eddyz87@...il.com, haoluo@...gle.com, hawk@...nel.org,
john.fastabend@...il.com, jolsa@...nel.org, kpsingh@...nel.org,
linux-kernel@...r.kernel.org, martin.lau@...ux.dev,
netdev@...r.kernel.org, sdf@...ichev.me, song@...nel.org,
syzkaller-bugs@...glegroups.com, yonghong.song@...ux.dev
Subject: Re: [PATCH net-net] tun: Assign missing bpf_net_context.
On 2024-09-12 06:17:55 [-0700], Breno Leitao wrote:
> Hello Sabastian,
Hi Breno,
> > This origins in netkit_xmit(). If my memory serves me, then Daniel told
> > me that netkit is not doing any redirect and therefore does not need
> > "this". This must have been during one of the first "designs"/ versions.
>
> Right, I've seen several crashes related to this, and in all of them it
> is through netkit_xmit() -> netkit_run() -> bpf_prog_run()
Looking at this again, NETKIT_REDIRECT invokes skb_do_redirect() which
is accessing the per-CPU variables/ context from the very first day.
So I must have misunderstood something.
> > If you are saying, that this is possible then something must be done.
> > Either assign a context or reject the bpf program.
>
> If we want to assign a context, do you meant something like the
> following?
Yes, correct. And I think that we do want the context here.
Feel free to add
Reviewed-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
if you post.
Sebastian
Powered by blists - more mailing lists