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: <9AAE0902D5BC7E449B7C8E4E778ABCD025D6D2@AMSPEX01CL01.citrite.net>
Date:	Thu, 27 Feb 2014 12:39:01 +0000
From:	Paul Durrant <Paul.Durrant@...rix.com>
To:	Jan Beulich <JBeulich@...e.com>
CC:	"davem@...emloft.net" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: RE: [PATCH net-next] consolidate duplicate code is
 skb_checksum_setup() helpers

> -----Original Message-----
> From: Jan Beulich [mailto:JBeulich@...e.com]
> Sent: 27 February 2014 12:20
> To: Paul Durrant
> Cc: davem@...emloft.net; Eric Dumazet; netdev@...r.kernel.org
> Subject: RE: [PATCH net-next] consolidate duplicate code is
> skb_checksum_setup() helpers
> 
> >>> On 27.02.14 at 13:00, Paul Durrant <Paul.Durrant@...rix.com> wrote:
> >>  -----Original Message-----
> >> From: Jan Beulich [mailto:JBeulich@...e.com]
> >> Sent: 27 February 2014 11:50
> >> To: Paul Durrant
> >> Cc: davem@...emloft.net; Eric Dumazet; netdev@...r.kernel.org
> >> Subject: RE: [PATCH net-next] consolidate duplicate code is
> >> skb_checksum_setup() helpers
> >>
> >> >>> On 27.02.14 at 11:57, Paul Durrant <Paul.Durrant@...rix.com> wrote:
> >> >>  -----Original Message-----
> >> >> From: Jan Beulich [mailto:JBeulich@...e.com]
> >> >> Sent: 27 February 2014 09:05
> >> >> To: netdev@...r.kernel.org
> >> >> Cc: Paul Durrant; davem@...emloft.net; Eric Dumazet
> >> >> Subject: [PATCH net-next] consolidate duplicate code is
> >> >> skb_checksum_setup() helpers
> >> >>
> >> >> Realizing that the skb_maybe_pull_tail() calls in the IP-protocol
> >> >> specific portions of both helpers are terminal ones (i.e. no further
> >> >> pulls are expected), their maximum size to be pulled can be made
> match
> >> >> their minimal size needed, thus making the code identical and hence
> >> >> possible to be moved into another helper.
> >> >
> >> > There is a difference in the case of an IPv4 TCP packet with options.
> With
> >> > your patch it will only get pulled up as far as the base header so there
> may
> >> > need to be another pull for options parsing.
> >>
> >> Don't the options start right after the IP header, before the TCP
> >> or UDP one? In which case the pull covers them.
> >>
> >
> > *IP* options do, TCP options are immediately after the TCP header (hence
> the
> > TCP header length field). UDP doesn't have options.
> 
> Oh, right, of course. But then again - is the maximum length of
> TCP options different between v4 and v6? If not, that limit
> should be used here rather than the more generic (and version
> dependent) IP limit.

I don't know off the top of my head - I'd have to go look. My hunch is that TCP options are essentially independent of IP version. Anyway, the header is limited to 60 bytes max due to the 4 bit width of the header length field so you may as well just use that.

> 
> And iiuc the UDP case could remain as is.
> 

Yep.

  Paul
--
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