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: <65531518-b889-46b8-8e1e-09e626222a4a@bsbernd.com>
Date: Sat, 3 Jan 2026 17:47:06 +0100
From: Bernd Schubert <bernd@...ernd.com>
To: David Laight <david.laight.linux@...il.com>
Cc: Thomas Weißschuh <thomas.weissschuh@...utronix.de>,
 Miklos Szeredi <miklos@...redi.hu>, linux-fsdevel@...r.kernel.org,
 linux-kernel@...r.kernel.org, Arnd Bergmann <arnd@...db.de>
Subject: Re: [PATCH v2] fuse: uapi: use UAPI types



On 1/3/26 15:10, David Laight wrote:
> On Fri, 2 Jan 2026 23:27:16 +0100
> Bernd Schubert <bernd@...ernd.com> wrote:
> 
>> On 12/30/25 13:10, Thomas Weißschuh wrote:
>>> Using libc types and headers from the UAPI headers is problematic as it
>>> introduces a dependency on a full C toolchain.
>>>
>>> Use the fixed-width integer types provided by the UAPI headers instead.
>>> To keep compatibility with non-Linux platforms, add a stdint.h fallback.
>>>
>>> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
>>> ---
>>> Changes in v2:
>>> - Fix structure member alignments
>>> - Keep compatibility with non-Linux platforms
>>> - Link to v1: https://lore.kernel.org/r/20251222-uapi-fuse-v1-1-85a61b87baa0@linutronix.de
>>> ---
>>>  include/uapi/linux/fuse.h | 626 +++++++++++++++++++++++-----------------------
>>>  1 file changed, 319 insertions(+), 307 deletions(-)  
>>
>> I tested this and it breaks libfuse compilation
>>
>> https://github.com/libfuse/libfuse/pull/1410
>>
>> Any chance you could test libfuse compilation for v3? Easiest way is to
>> copy it to <libfuse>/include/fuse_kernel.h and then create PR. That
>> includes a BSD test.
>>
>>
>> libfuse3.so.3.19.0.p/fuse_uring.c.o -c
>> ../../../home/runner/work/libfuse/libfuse/lib/fuse_uring.c
>> ../../../home/runner/work/libfuse/libfuse/lib/fuse_uring.c:197:5: error:
>> format specifies type 'unsigned long' but the argument has type '__u64'
>> (aka 'unsigned long long') [-Werror,-Wformat]
>>   196 |                 fuse_log(FUSE_LOG_DEBUG, "    unique: %" PRIu64
>> ", result=%d\n",
>>       |                                                       ~~~~~~~~~
>>   197 |                          out->unique, ent_in_out->payload_sz);
>>       |                          ^~~~~~~~~~~
>> 1 error generated.
>>
>>
>> I can certainly work it around in libfuse by adding a cast, IMHO,
>> PRIu64 is the right format.
> 
> Or use 'unsigned long long' for the 64bit values and %llu for the format.
> I'm pretty sure that works for all reasonable modern architectures.
> 
> You might still want to use the fuse_[us][8|16|32|64] names but they
> can be defined directly as char/short/int/long long.

Well, what speaks against to it like I have done? A few more lines of
code, but even unlikely arch issues are excluded.

Thanks,
Bernd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ