Thread View: linux.kernel.netdev
3 messages
3 total messages
Started by Jason Xing
Thu, 19 Nov 2026 13:58
Re: [PATCH net v2] xsk: set network header on skb at generic transmit
Author: Jason Xing
Date: Thu, 19 Nov 2026 13:58
Date: Thu, 19 Nov 2026 13:58
89 lines
15488 bytes
15488 bytes
On Wed, Sep 23, 2026 at 12:06โฏAM Maciej Fijalkowski <maciej.fijalkowski@intel.com> wrote: ... > > > The minimal reset doesn't help with the checksum problem mentioned above. > > > > > > Adding simple logic like resetting l2/l3 headers doesn't guarantee > > > that csum problem won't be triggered. Adding complete probing hurts > > > perfomance for sure. > > > > > > Maybe we can cook two patches: > > > 1. Fix the current bug syzbot reported as is. > > > 2. Fix offload logic by adding complete probing > > > > > > @Jakub, Maciej, Stan > > > Do we need a complex logic like af_packet to handle this? > > > > Until now, it seems we've got three fixes in the queue: > > 1. reset mac header: > > https://lore.kernel.org/all/20260817153957.3177627-1-poros@redhat.com/ > > (commit 35fcde7f8deb "xsk: support for Tx") > > Hi! Hi Maciej, I'm going to revive this thread since we all received a severe bug report regarding this patch privately. It points to a potential information leak. > > I'd keep this separate and focus on Eric's hint to fix the drivers so they > use skb_eth_hdr() consistently > > > 2. reset network header like this patch. (commit 3914d88f7608 "xsk: > > Respect device's headroom and tailroom") > > For packets without CHECKSUM_PARTIAL, resetting network_header should be > enough to fix the negative offset reported by syzbot. I'll send it as is with the correct commit message by the end of this week. The blamed commit is 3914d88f7608. > > For CHECKSUM_PARTIAL, however, I think we need to establish proper skb > header metadata. Existing drivers do rely on it. For example, i40e and ice > use both skb_network_header() and skb_transport_header() in their non-GSO > checksum offload paths, while ixgbe derives its offsets from > skb_network_offset() and skb_checksum_start_offset(). The blamed commit is 48eb03dd2630 which is different here since it should take care of the new network reset/probe logic regardless of the current patch. Since the blamed commit is not the same, I chose to send a separate fix after the current one. cc Eric and James James, I would add your tested-by/reported-by tag if you don't mind. Thanks, Jason > > For Ethernet I would avoid depending on mac_header here. The frame can > also be non-linear with IFF_TX_SKB_NO_LINEAR, so using > skb_header_pointer() to inspect the Ethernet header and the fragment-safe > VLAN helpers looks more appropriate than dev_parse_header_protocol(). > > > 3. handle csum offload issue by adding probing code. (commit > > 48eb03dd2630 "xsk: Add TX ... checksum offload support") > > > > Thanks, > > Jason > > > > > > > > Thanks, > > > Jason > > > > > > > network_header as a placeholder and drop the claims about the AF_PACKET > > > > convention and the absence of checksum offload? > > > > > > > > -- > > > > Sashiko AI review ยท https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260901083325.3445-1-kerneljasonxing%40gmail.com
RE: [PATCH net v2] xsk: set network header on skb at generic transmit
Author: James Sawyer
Date: Thu, 19 Nov 2026 14:10
Date: Thu, 19 Nov 2026 14:10
18 lines
18510 bytes
18510 bytes
On Thu, Nov 19, 2026, Jason Xing wrote: > James, I would add your tested-by/reported-by tag if you don't mind. Hi Jason, Thank you, I'd be glad to. Please use: Reported-by: James Sawyer <jamessawyer@outlook.com> I tested the v3 hunk (skb_reset_network_header() at the top of xsk_skb_init_misc()) and it closed the issue. I will run v4 through the same test when you post it and reply with Tested-by, so the tag matches the patch that was actually tested. Thanks for taking this forward. James
Re: [PATCH net v2] xsk: set network header on skb at generic transmit
Author: Jason Xing
Date: Fri, 20 Nov 2026 02:13
Date: Fri, 20 Nov 2026 02:13
25 lines
13652 bytes
13652 bytes
On Thu, Nov 19, 2026 at 10:10โฏPM James Sawyer <jamessawyer@outlook.com> wrote: > > On Thu, Nov 19, 2026, Jason Xing wrote: > > James, I would add your tested-by/reported-by tag if you don't mind. > > Hi Jason, > > Thank you, I'd be glad to. Please use: > > Reported-by: James Sawyer <jamessawyer@outlook.com> > > I tested the v3 hunk (skb_reset_network_header() at the top of > xsk_skb_init_misc()) and it closed the issue. I will run v4 through the > same test when you post it and reply with Tested-by, so the tag matches > the patch that was actually tested. > > Thanks for taking this forward. Thanks for your report and the careful testing! Will send it by Sunday this week. Thanks, Jason
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads