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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <877d5a1dww.fsf@oldenburg.str.redhat.com>
Date:   Tue, 21 Jun 2022 12:58:23 +0200
From:   Florian Weimer <fweimer@...hat.com>
To:     Cyril Hrubis <metan@....cz>
Cc:     linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org,
        libc-alpha@...rceware.org, arnd@...db.de,
        linux-api@...r.kernel.org, dhowells@...hat.com,
        David.Laight@...lab.com, zack@...folio.org, ltp@...ts.linux.it
Subject: Re: [LTP] [PATCH v2] uapi: Make __{u, s}64 match {u, }int64_t in
 userspace

* Cyril Hrubis:

> From: Cyril Hrubis <chrubis@...e.cz>
>
> This changes the __u64 and __s64 in userspace on 64bit platforms from
> long long (unsigned) int to just long (unsigned) int in order to match
> the uint64_t and int64_t size in userspace.
>
> This allows us to use the kernel structure definitions in userspace.
>
> For example we can use PRIu64 and PRId64 modifiers in printf() to print
> structure membere. Morever with this there would be no need to redefine
> these structures in an libc implementations as it is done now.
>
> Consider for example the newly added statx() syscall. If we use the
> header from uapi we will get warnings when attempting to print it's
> members as:
>
> 	printf("%" PRIu64 "\n", stx.stx_size);
>
> We get:
>
> 	warning: format '%lu' expects argument of type 'long unsigned int',
> 	         but argument 5 has type '__u64' {aka 'long long unsigned int'}
>
> Signed-off-by: Cyril Hrubis <chrubis@...e.cz>

Could you add some motivation for the C++ condition to the commit
message?

Thanks,
Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ