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:	Sun, 04 May 2008 15:50:47 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	johannes@...solutions.net
Cc:	netdev@...r.kernel.org, herbert@...dor.apana.org.au,
	linux-wireless@...r.kernel.org
Subject: Re: S/G operation, skb checksums, data copying

From: Johannes Berg <johannes@...solutions.net>
Date: Sun, 04 May 2008 20:28:45 +0200

> Should we do IP checksumming in software within mac80211, announce s/g
> support and hardware checksumming to the rest of the networking layer
> and hope that we only have to copy the header instead of the data for
> many packets then, if the underlying hardware is capable enough?

No, this doesn't work.

There is a correctness reason why we don't allow SG without HW
checksum support.

Those scatter-gather pages could be in the page cache for a sendfile()
or similar operation.

Any process in the system can write into and change the contents of
those pages while the packet is still in flight to the device.

So the only way to always generate correct checksums is to enforce
that the hardware do it once the full packet is in the device FIFO
after being DMA'd.

If you do the checksum in software, we'll generate incorrect checksums
if another process is writing into the page at the same time, so we
must not allow this.
--
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