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: <20110412211658.GB20135@p183>
Date:	Wed, 13 Apr 2011 00:16:58 +0300
From:	Alexey Dobriyan <adobriyan@...il.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Randy Dunlap <rdunlap@...otime.net>, linux-kernel@...r.kernel.org,
	behlendorf1@...l.gov, oleg@...hat.com
Subject: Re: [PATCH] remove abs64()

On Tue, Apr 12, 2011 at 02:10:40PM -0700, Andrew Morton wrote:
> On Tue, 12 Apr 2011 14:07:26 -0700
> Randy Dunlap <rdunlap@...otime.net> wrote:
> 
> > > +	__builtin_choose_expr(						\
> > > +		__builtin_types_compatible_p(typeof(_x), long long),	\
> > > +		(unsigned long long)({ _x < 0 ? -_x : _x; }),		\
> > > +	_x)))));							\
> > > +})
> > 
> > that is better?
> 
> I think so.
> 
> It's a bit concerning that it changes the return type of abs().

I haven't read every abs() user, but, yes, sizeof(abs()) silently
changing is the issue.
--
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