lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4d3ea715-676c-c550-cff6-18c94a9d93e6@gmail.com>
Date:   Fri, 3 May 2019 19:04:35 -0700
From:   Florian Fainelli <f.fainelli@...il.com>
To:     Vladimir Oltean <olteanv@...il.com>, vivien.didelot@...il.com,
        andrew@...n.ch, davem@...emloft.net
Cc:     netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next 4/9] net: dsa: Keep private info in the skb->cb



On 5/3/2019 6:18 PM, Vladimir Oltean wrote:
> Map a DSA structure over the 48-byte control block that will hold
> persistent skb info on transmit and receive.
> 

On receive you cannot quite do that because you don't know if the DSA
master network device calls netif_receive_skb() or napi_gro_receive().
The latter arguably may not be able to aggregate flows at all because it
does not know how to parse the SKB, but the point remains that skb->cb[]
on receive may already be used, up to 48 bytes already. I tried to make
use of it for storing the HW extracted Broadcom tag, but it blew the
budge on 64-bit hosts:

https://www.spinics.net/lists/netdev/msg337777.html

Not asking you to change anything here, just to be aware of it.

> Also add a DSA_SKB_CB_PRIV() macro which retrieves a pointer to the
> space up to 48 bytes that the DSA structure does not use. This space can
> be used for drivers to add their own private info.
> 
> One use is for the PTP timestamping code path. When cloning a skb,
> annotate the original with a pointer to the clone, which the driver can
> then find easily and place the timestamp to. This avoids the need of a
> separate queue to hold clones and a way to match an original to a cloned
> skb.
> 
> Signed-off-by: Vladimir Oltean <olteanv@...il.com>

Reviewed-by: Florian Fainelli <f.fainelli@...il.com>
-- 
Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ