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: <20111122154132.GA25127@p183.telecom.by>
Date:	Tue, 22 Nov 2011 18:41:32 +0300
From:	Alexey Dobriyan <adobriyan@...il.com>
To:	David Laight <David.Laight@...LAB.COM>
Cc:	Eric Dumazet <eric.dumazet@...il.com>, davem@...emloft.net,
	netdev@...r.kernel.org
Subject: Re: [PATCH] xfrm: optimize ipv4 selector matching

On Tue, Nov 22, 2011 at 03:15:25PM -0000, David Laight wrote:
>  
> > Please use :
> > 
> > +static inline bool addr4_match(__be32 a1, __be32 a2, u8 prefixlen)
> > +{
> > +       /* C99 6.5.7 (3): u32 << 32 is undefined behaviour */
> > +       if (prefixlen == 0)
> > +               return true;
> > +       return !((a1 ^ a2) & htonl(0xFFFFFFFFu << (32 - prefixlen)));
> > +}
> 
> I'm not sure I'd agree about using 'u8'.
> It may well cause an unnecessary mask with 0xff.

It's u8 in all other places.
--
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