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: <20140122174754.GS31570@twins.programming.kicks-ass.net>
Date:	Wed, 22 Jan 2014 18:47:54 +0100
From:	Peter Zijlstra <peterz@...radead.org>
To:	Paul Walmsley <pwalmsley@...dia.com>
Cc:	"H. Peter Anvin" <hpa@...or.com>, Arnd Bergmann <arnd@...db.de>,
	linux-arch@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] bitops: fix signedness of compile-time hweight
 implementations

On Wed, Jan 22, 2014 at 05:19:58PM +0000, Paul Walmsley wrote:
> Hi Peter, hpa, Arnd,
> 
> On Wed, 18 Dec 2013, Paul Walmsley wrote:
> 
> > 
> > Enabling '-Wsign-compare' compiler warnings on code that includes
> > include/linux/bitops.h can generate the following warning:
> > 
> > In file included from include/linux/kernel.h:10:0,
> >                  from <random filename>:48:
> > include/linux/bitops.h: In function ‘hweight_long’:
> > include/linux/bitops.h:77:26: error: signed and unsigned type in conditional
> > expression [-Werror=sign-compare]
> > 
> > (converted to an error with -Werror)
> > 
> > This is due to the use of the logical negation operator '!' in the
> > __const_hweight8 macro in include/asm-generic/bitops/const_hweight.h.
> > The use of that operator here results in a signed value.
> > 
> > Fix by explicitly casting the __const_hweight8 macro expansion to
> > 'unsigned int'.  While here, clean up several checkpatch.pl warnings.
> > 
> > Signed-off-by: Paul Walmsley <pwalmsley@...dia.com>
> > Cc: H. Peter Anvin <hpa@...or.com>
> > Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
> > Cc: Arnd Bergmann <arnd@...db.de>
> > ---
> > Intended for v3.14.
> 
> Ping.  Just checking to see if you have any comments on this one, or if 
> you're planning to send it upstream for v3.14.

I'm not sure through which tree to send it, but just I've queued it so
it doesn't get lost again.

Also, it didn't apply as is for some reason, hit it on the head with a
hammer though.
--
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