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: <alpine.DEB.2.22.394.2208251533340.108545@digraph.polyomino.org.uk>
Date:   Thu, 25 Aug 2022 15:37:27 +0000
From:   Joseph Myers <joseph@...esourcery.com>
To:     David Laight <David.Laight@...LAB.COM>
CC:     Linus Torvalds <torvalds@...ux-foundation.org>,
        Florian Weimer <fweimer@...hat.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Alejandro Colomar <alx.manpages@...il.com>,
        Alexei Starovoitov <alexei.starovoitov@...il.com>,
        Alex Colomar <alx@...nel.org>,
        Alexei Starovoitov <ast@...nel.org>,
        linux-man <linux-man@...r.kernel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Zack Weinberg <zackw@...ix.com>,
        LKML <linux-kernel@...r.kernel.org>,
        glibc <libc-alpha@...rceware.org>, GCC <gcc-patches@....gnu.org>,
        bpf <bpf@...r.kernel.org>, LTP List <ltp@...ts.linux.it>,
        Linux API <linux-api@...r.kernel.org>,
        linux-arch <linux-arch@...r.kernel.org>,
        Cyril Hrubis <chrubis@...e.cz>,
        David Howells <dhowells@...hat.com>,
        Arnd Bergmann <arnd@...db.de>, Rich Felker <dalias@...c.org>,
        Adhemerval Zanella <adhemerval.zanella@...aro.org>,
        Michael Kerrisk <mtk.manpages@...il.com>
Subject: RE: [PATCH v3] Many pages: Document fixed-width types with ISO C
 naming

On Thu, 25 Aug 2022, David Laight wrote:

> From: Joseph Myers
> > Sent: 25 August 2022 15:39
> > 
> > On Thu, 25 Aug 2022, Linus Torvalds wrote:
> > 
> > > That's a small detail that yes, we've tried to avoid the absolute
> > > humongous mess that the C standard library has with their horrendous
> > > 'PRId*' mess, but honestly, it's just a tiny detail.
> > 
> > I've not yet implemented it for glibc or for GCC format checking, but C23
> > adds 'wN' format length modifiers so you will be able to e.g. use "%w64d"
> > with printf to print an int64_t and won't need those PRI macros any more.
> 
> Is that meant to work regardless of whether the type is
> int, long or long long provided the size is correct?
> 
> Or does it require the compiler know which type inttypes.h
> uses for uint32_t and uint64_t?

The type passed needs to be that used for the relevant stdint.h typedef, 
not another of the same size.  (For format checking, that means the 
compiler needs to know what the types used in stdint.h are.)

It's now required that if int32_t exists, int_least32_t must have the same 
type, so int_least32_t can also be used with that format (and there are 
'wfN' formats for int_fastN_t / uint_fastN_t as well).

-- 
Joseph S. Myers
joseph@...esourcery.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ