Re: [PATCH net] net: dsa: ksz: fix padding size of skb

Kurt Kanzenbach
2020-10-16T07:45:56Z

[-- Attachment #1: Type: text/plain, Size: 910 bytes --]

On Thu Oct 15 2020, Christian Eggers wrote:
> On Wednesday, 14 October 2020, 19:31:03 CEST, Vladimir Oltean wrote:
>> What problem are you actually trying to solve?
> After (hopefully) understanding the important bits, I would like to solve the
> problem that after calling __skb_put_padto() there may be no tailroom for the
> tail tag.
>
> The conditions where this can happen are quite special. You need a skb->len <
> ETH_ZLEN and the skb must be marked as cloned. One condition where this
> happens in practice is when the skb has been selected for TX time stamping in
> dsa_skb_tx_timestamp() [cloned] and L2 is used as transport for PTP [size <
> ETH_ZLEN]. But maybe cloned sk_buffs can also happen for other reasons.

Hmm. I've never observed any problems using DSA with L2 PTP time
stamping with this tail tag code. What's the impact exactly? Memory
corruption?

Thanks,
Kurt

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]