Thread (21 messages) flat view 21 messages, 2 authors, 16h ago

Re: [PATCH net 7/8] net: bcmgenet: zero-initialize Transmit Status Block in bcmgenet_add_tsb

From: Florian Fainelli <florian.fainelli@broadcom.com>
Date: 2026-09-18 17:41:59
Also in: lkml

On 9/18/26 04:03, Nicolai Buchwitz wrote:
Hi Florian

On 18.9.2026 02:07, Florian Fainelli wrote:
quoted
bcmgenet_add_tsb() pushes 64 bytes of headroom onto the skb to form the
Transmit Status Block (TSB) but only assigns status->tx_csum_info when
skb->ip_summed == CHECKSUM_PARTIAL. For packets without checksum offload,
or for other fields within struct status_64, the status block contains
uninitialized stack/heap memory from previous skb operations.
The MAC only reads tx_csum_info when the descriptor has DMA_TX_DO_CSUM,
and bcmgenet_xmit() sets that only for CHECKSUM_PARTIAL.
The stale value seems to be never used?

Did you hit an actual failure?  Otherwise this would be a 64 byte memset
on every transmitted packet.
Nope this is entirely theoretical, and one could argue that this could 
create a slight drop in performance, happy to drop that one as well 
since we never really experienced any actual issue.
-- 
Florian
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help