From: Martin KaFai Lau <martin.lau@linux.dev>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Feng Yang <yangfeng59949@163.com>,
andrii@kernel.org, ast@kernel.org, bpf@vger.kernel.org,
daniel@iogearbox.net, davem@davemloft.net, edumazet@google.com,
horms@kernel.org, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org, pabeni@redhat.com
Subject: Re: [PATCH v5] bpf: test_run: Fix the null pointer dereference issue in bpf_lwt_xmit_push_encap
Date: Tue, 17 Feb 2026 15:26:33 -0800 [thread overview]
Message-ID: <1bc24867-edde-408e-ac1b-2ca2a41622b5@linux.dev> (raw)
In-Reply-To: <20260217140831.52fac4ca@kernel.org>
On 2/17/26 2:08 PM, Jakub Kicinski wrote:
> On Tue, 17 Feb 2026 10:08:29 -0800 Martin KaFai Lau wrote:
>>> The reason for the CI test failure.
>>
>> Make sense, but the early point stays the same: the user-provided skb
>> can have unexpected data. Either an skb->protocol is not handled here,
>> or the earlier dst lookup has an error. I don't know what the current
>> active users left in lwt are. Unless there is an issue with missing
>> skb_dst() in other mainstream program types (e.g., tc), I would prefer
>> to add a check in bpf_lwt_push_ip_encap() instead of complicating
>> bpf_prog_test_run_skb() further.
>
> Can bpf_prog_test_run_skb() simply not support LWT then?
It is a bold move. If we are open to this idea, we can consider to
retire the lwt support completely instead of only retiring lwt in the
test_run_skb alone. I think it will still take time to announce and
deprecate it?
> Having fastpath checks for test harness really feels like duct tape
Adding route lookup on ip[v6]_hdr does not work well either and is a
larger duct tape on the test_run_skb side.
An option is to always set skb to 'some' dst (loopback or
ipv6.fib6_null_entry) on all is_lwt cases without doing the lookup. It
is only to get it going. It is a duct tape also imo but maybe a middle
ground.
next prev parent reply other threads:[~2026-02-17 23:26 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-10 9:06 [PATCH v5] bpf: test_run: Fix the null pointer dereference issue in bpf_lwt_xmit_push_encap Feng Yang
2026-02-10 18:34 ` kernel test robot
2026-02-10 19:08 ` kernel test robot
2026-02-10 19:10 ` Martin KaFai Lau
2026-02-11 7:52 ` Feng Yang
2026-02-17 18:08 ` Martin KaFai Lau
2026-02-17 22:08 ` Jakub Kicinski
2026-02-17 23:26 ` Martin KaFai Lau [this message]
2026-02-17 23:39 ` Jakub Kicinski
2026-02-10 20:26 ` kernel test robot
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=1bc24867-edde-408e-ac1b-2ca2a41622b5@linux.dev \
--to=martin.lau@linux.dev \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=yangfeng59949@163.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