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-next>] [day] [month] [year] [list]
Message-ID: <20101129181742.GA29192@rere.qmqm.pl>
Date:	Mon, 29 Nov 2010 19:17:42 +0100
From:	Michał Mirosław <mirq-linux@...e.qmqm.pl>
To:	netdev@...r.kernel.org
Cc:	Toshiharu Okada <toshiharu-linux@....okisemi.com>,
	e1000-devel@...ts.sourceforge.net
Subject: Broken TX checksumming offloads

Hi!

Unless I'm horribly mistaken, generic HW checksumming works as follows:
 - driver sets netdev->features & NETIF_F_HW_CSUM to indicate support
   for generic checksumming; if the flag is not set, networking core
   will checksum skb before calling ndo_start_xmit (let's ignore
   other checksumming options for now) and not pass skb with
   skb->ip_summed == CHECKSUM_PARTIAL
 - ndo_start_xmit() should use skb->csum_start and skb->csum_offset
   (or skb->csum) to update checksum in software or instruct HW to do so

Looking at pch_gbe_xmit_frame() and its callee - pch_gbe_tx_queue() it
looks like the driver should set NETIF_F_IP_CSUM instead of NETIF_F_HW_CSUM
feature.

Similar thing happens in ixgbe driver: it sets NETIF_F_HW_CSUM and checks
for skb->ip_summed == CHECKSUM_PARTIAL, but then just warns on protocols
other that TCP and SCTP (see: ixgbe_psum()).

This means that these drivers might send packets with broken checksums
when TX checksumming offload is enabled. I haven't checked other drivers, yet.

Best Regards,
Michał Mirosław
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ