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] [day] [month] [year] [list]
Date:   Fri, 9 Apr 2021 17:24:14 +0000
From:   David Laight <David.Laight@...LAB.COM>
To:     'Sven Van Asbroeck' <thesven73@...il.com>,
        Heiner Kallweit <hkallweit1@...il.com>
CC:     George McCollister <george.mccollister@...il.com>,
        Bryan Whitehead <bryan.whitehead@...rochip.com>,
        David S Miller <davem@...emloft.net>,
        "Jakub Kicinski" <kuba@...nel.org>,
        Microchip Linux Driver Support <UNGLinuxDriver@...rochip.com>,
        netdev <netdev@...r.kernel.org>,
        open list <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH net v1] Revert "lan743x: trim all 4 bytes of the FCS; not
 just 2"

From: Sven Van Asbroeck
> Sent: 08 April 2021 19:35
...
> -       buffer_length = netdev->mtu + ETH_HLEN + 4 + RX_HEAD_PADDING;
> +       buffer_length = netdev->mtu + ETH_HLEN + ETH_FCS_LEN + RX_HEAD_PADDING;

I'd try to write the lengths in the order they happen, so:
	buffer_length = RX_HEAD_PADDING + ETH_HLEN + netdev->mtu + ETH_FCS_LEN;

The compiler should add all the constants together,
so the generated code ought to be the same.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ