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: <YO9F2LhTizvr1l11@lunn.ch>
Date:   Wed, 14 Jul 2021 22:15:20 +0200
From:   Andrew Lunn <andrew@...n.ch>
To:     Vladimir Oltean <olteanv@...il.com>
Cc:     Lino Sanfilippo <LinoSanfilippo@....de>, woojung.huh@...rochip.com,
        UNGLinuxDriver@...rochip.com, vivien.didelot@...il.com,
        f.fainelli@...il.com, davem@...emloft.net, kuba@...nel.org,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] net: dsa: tag_ksz: dont let the hardware process the
 layer 4 checksum

On Wed, Jul 14, 2021 at 10:48:12PM +0300, Vladimir Oltean wrote:
> Hi Lino,
> 
> On Wed, Jul 14, 2021 at 09:17:23PM +0200, Lino Sanfilippo wrote:
> > If the checksum calculation is offloaded to the network device (e.g due to
> > NETIF_F_HW_CSUM inherited from the DSA master device), the calculated
> > layer 4 checksum is incorrect. This is since the DSA tag which is placed
> > after the layer 4 data is seen as a part of the data portion and thus
> > errorneously included into the checksum calculation.
> > To avoid this, always calculate the layer 4 checksum in software.
> > 
> > Signed-off-by: Lino Sanfilippo <LinoSanfilippo@....de>
> > ---
> 
> This needs to be solved more generically for all tail taggers. Let me
> try out a few things tomorrow and come with a proposal.

Maybe the skb_linearize() is also a generic problem, since many of the
tag drivers are using skb_put()? It looks like skb_linearize() is
cheap because checking if the skb is already linear is cheap. So maybe
we want to do it unconditionally?

      Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ