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:	Sat, 09 Feb 2008 13:33:19 -0800
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Johann Felix Soden <johfel@....de>
CC:	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] time: Fix constant size in kernel/timeconst.h

Johann Felix Soden wrote:
> From: Johann Felix Soden <johfel@...rs.sourceforge.net>
> 
> kernel/timeconst.pl generates only long sized constants in timeconst.pl
> which gives this warning:
> 
> kernel/time.c: In function 'msecs_to_jiffies':
> kernel/time.c:472: warning: integer constant is too large for 'long' type
> 
> unsigned long long is needed.
> 

Hm, you've just taken a warning and elevated it to a bug.

According to the C standard, a constant has the shortest type (>= int) 
needed to hold the constant, and the warning above is somewhat bogus in 
that context (what version of gcc is that, anyway?)

ULL is only appropriate to 32-bit machines, or there will be other 
issues downstream.  The Right Way[TM] to do this would be to get Linux 
to have the [U]INTxx_C() macros from C99.

	-hpa

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