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:	Mon, 17 Mar 2014 14:40:36 +0000
From:	David Laight <David.Laight@...LAB.COM>
To:	'Florian Westphal' <fw@...len.de>
CC:	'Pablo Neira Ayuso' <pablo@...filter.org>,
	"netfilter-devel@...r.kernel.org" <netfilter-devel@...r.kernel.org>,
	"davem@...emloft.net" <davem@...emloft.net>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: RE: [PATCH 36/38] netfilter: connlimit: use keyed locks

From: Florian Westphal
> David Laight <David.Laight@...LAB.COM> wrote:
> > From: Pablo Neira Ayuso
> > > +#define CONNLIMIT_SLOTS	256
> > > +#define CONNLIMIT_LOCK_SLOTS	32
> >
> > You might want to make these explicitly unsigned to ensure
> > the divisions are unsigned (so can be done with a simple mask).
> 
> I can do  this but I checked that at least on my machine gcc already
> emits a 'add' instruction to reduce the hash value.

I think you meant 'and' :-)
Yes the hash itself is probably unsigned so forces an unsigned modulus.
It just seemed better to force it from the other argument as well.

	David



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