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:	Wed, 6 Feb 2013 09:48:54 -0000
From:	"David Laight" <David.Laight@...LAB.COM>
To:	"Cong Wang" <amwang@...hat.com>
Cc:	<netdev@...r.kernel.org>, "Jesse Gross" <jesse@...ira.com>,
	"David S. Miller" <davem@...emloft.net>
Subject: RE: [PATCH net-next v2] net: adjust skb_gso_segment() for calling in rx path

> On Wed, 2013-02-06 at 09:23 +0000, David Laight wrote:
> > > +/* openvswitch calls this on rx path, so we need a different check.
> > > + */
> > > +static inline bool skb_needs_check(struct sk_buff *skb, bool tx_path)
> > > +{
> > > +	if (tx_path)
> > > +		return skb->ip_summed != CHECKSUM_PARTIAL;
> > > +	else
> > > +		return skb->ip_summed == CHECKSUM_NONE;
> > > +}
> > > +
> >
> > That code wants a lot of unlikely() added.
> >
> > It seems wrong to be adding code a very common path for one
> > obscure caller.
> 
> Its caller does:
> 
> +       if (unlikely(skb_needs_check(skb, tx_path))) {

In my experience that isn't enough to get all the sub-tests
of complex conditionals compiled in the desired way.

	David

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ