From: Qihang <q.h.hack.winter@gmail.com>
To: netdev@vger.kernel.org
Cc: willemdebruijn.kernel@gmail.com, daniel.zahka@gmail.com,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, horms@kernel.org, stable@vger.kernel.org,
Qihang <q.h.hack.winter@gmail.com>
Subject: [PATCH net v4 0/2] packet: use consistent hard_header_len in send paths
Date: Wed, 29 Jul 2026 11:00:53 +0800 [thread overview]
Message-ID: <20260729030055.21334-1-q.h.hack.winter@gmail.com> (raw)
AF_PACKET send paths read dev->hard_header_len at several stages of skb
allocation and construction. Concurrent netdevice reconfiguration can
make those reads inconsistent and cause skb headroom underflow.
Split the regular and TX_RING paths so each patch has one Fixes tag.
The separate SOCK_DGRAM consistency issue between hard_header_len and
header_ops->create remains outside this series.
Changes in v4:
- Use one hard_header_len snapshot throughout tpacket_snd(), including
reserve and per-frame skb construction.
- Carry Willem's Reviewed-by on patch 1.
Link to v3: https://lore.kernel.org/netdev/20260728031345.49562-1-q.h.hack.winter@gmail.com/
Qihang (2):
packet: use consistent hard_header_len in non-ring send paths
packet: use consistent hard_header_len in TX_RING send path
include/linux/netdevice.h | 6 +++--
net/packet/af_packet.c | 46 ++++++++++++++++++++++++---------------
2 files changed, 32 insertions(+), 20 deletions(-)
--
2.50.1 (Apple Git-155)
next reply other threads:[~2026-07-29 3:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-29 3:00 Qihang [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-07-29 3:01 [PATCH net v4 0/2] packet: use consistent hard_header_len in send paths Qihang
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=20260729030055.21334-1-q.h.hack.winter@gmail.com \
--to=q.h.hack.winter@gmail.com \
--cc=daniel.zahka@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=stable@vger.kernel.org \
--cc=willemdebruijn.kernel@gmail.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