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]
Date:	Tue, 30 Sep 2014 14:48:19 -0400 (EDT)
From:	David Miller <davem@...emloft.net>
To:	alexei.starovoitov@...il.com
Cc:	therbert@...gle.com, Yuval.Mintz@...gic.com, netdev@...r.kernel.org
Subject: Re: How exactly does CHECKSUM_COMPLETE works?

From: Alexei Starovoitov <alexei.starovoitov@...il.com>
Date: Tue, 30 Sep 2014 09:58:32 -0700

> On Tue, Sep 30, 2014 at 7:59 AM, Tom Herbert <therbert@...gle.com> wrote:
>>
>>> So, to summarize my questions -
>>> 1. What should a driver set as the SKBs csum value when passing CHECKSUM_COMPLETE?
>>
>> This ones complete checksum of the Ethernet payload (start of IP
>> header to the end of the packet).
> 
> I think it's confusing to describe CHECKSUM_COMPLETE this way.
> It is such only because driver pulls eth header before passing skb to stack.
> CHECKSUM_COMPLETE should cover the whole packet. If there are multiple
> vlan headers in front of IP they should be part of csum, since not all
> drivers may
> have hw offloading for vlan. The most simplistic HW would compute csum over
> the whole packet including eth header and driver will do
> eth_type_trans+skb_postpull_rcsum

The sungem computes the checksum over the entire frame.  Here are the relevant
parts from the programmer's manual:

	RX Descriptor Fields
  ...
	TCP Pseudo-Checksum - Contains the 16-bit TCP checksum calculated over
	the entire frame, starting at an offset programmable in the RX
	Configuration Register.

In the gengem driver this is the RXDMA_CFG_CSUMOFF field of the RXDMA_CFG
register.

The driver seems to set this to the size of the ethernet header, which has
the problems you mention.
--
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