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, 29 Mar 2010 13:00:42 -0700
From:	Joe Perches <joe@...ches.com>
To:	Randy Dunlap <randy.dunlap@...cle.com>
Cc:	Jiri Kosina <trivial@...nel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] treewide: Add and use ADD_MOD macro

On Mon, 2010-03-29 at 12:47 -0700, Randy Dunlap wrote:
> On Sun, 28 Mar 2010 14:57:27 -0700 Joe Perches wrote:
> > Add a macro for the somewhat common use of
> > 	(something + value) % value
> > because the test uses ADD_MOD
> > --- a/include/linux/kernel.h
> > +++ b/include/linux/kernel.h
> > +#define ADD_MOD(x, y) (((x) + (y)) % (y))
> It would be better not to evaluate y more than one time.

That could be said for nearly all the convenience
macros in kernel.h

> Also it's not safe for 64-bit 'y' on i386, right?
> Looks like it would cause missing reference to __imoddi3
> or whatever it is called.

Which is also true for nearly all the convenience
macros in kernel.h

> so it can easily be misused IMO.

etc.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ