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, 3 Mar 2008 06:32:16 +0000
From:	Al Viro <viro@...IV.linux.org.uk>
To:	"H. Peter Anvin" <hpa@...or.com>
Cc:	Matthew Wilcox <matthew@....cx>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Linux Arch Mailing List <linux-arch@...r.kernel.org>,
	David Brownell <dbrownell@...rs.sourceforge.net>
Subject: Re: [PATCH 1/2] Add C99-style constructor macros for specific-sized integers

On Sun, Mar 02, 2008 at 10:12:37PM -0800, H. Peter Anvin wrote:
> Al Viro wrote:
> >On Sun, Mar 02, 2008 at 08:43:22PM -0800, H. Peter Anvin wrote:
> >>>>+#define S64_C(x) x ## LL
> >>>>+#define U64_C(x) x ## ULL
> >>>but can't we use the latter for all arches?
> >>>
> >>You really don't want to, as the whole point is that you want it to 
> >>match what u64/s64 is defined as, in order to avoid spurious warnings.
> >
> >Excuse me, in which contexts?  Where does replacement of explicitly long
> >constant with explicitly long long one generate warnings on a host that has
> >range(long) equal to range(long long)?
> 
> printf, for example.

Oh, for...  It's not as if we _had_ anything better for u64 than %ull and
convert the argument to unsigned long long for that family.

Unless you are seriously suggesting the use of vomit-inducing atrocity of
PRIu64 and constant concatenation in there, that is.  I would rather move
typechecking for printk-style functions to sparse and tell gcc to STFU
completely on that class of warnings.  Making it extensible, while we are
at it - i.e. telling sparse that this conversion is to be used for dma_addr_t,
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