Skip to contentSkip to conversation

Patch "tools/nolibc: use intmax definitions from compiler" has been added to the 6.15-stable tree

DISCUSSION Thomas Weißschuh 2 participants 2 messages Jun 20, 2025 1 message not in the archive Stable branch

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Hi stable team,

Quoted 7 lines · Sasha Levin

This is a note to let you know that I've just added the patch titled

tools/nolibc: use intmax definitions from compiler

to the 6.15-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

Quoted 6 lines

The filename of the patch is:
tools-nolibc-use-intmax-definitions-from-compiler.patch
and it can be found in the queue-6.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

As discussed in [0] and its ancestors, please only backport nolibc patches are were explicitly tagged for stable@.

[0] https://lore.kernel.org/lkml/2025061907-finance-dodgy-b0ae@gregkh/

Thanks,
Thomas

Quoted 36 lines

commit fb60b190f25c7958f85fdae9b7024548139de281

Author: Thomas Weißschuh <[email protected]>
Date:   Fri Apr 11 11:00:39 2025 +0200

tools/nolibc: use intmax definitions from compiler

[ Upstream commit e5407c0820ea5fa7117b85ed32b724af73156d63 ]

The printf format checking in the compiler uses the intmax types from the compiler, not libc. This can lead to compiler errors.

Instead use the types already provided by the compiler.

Example issue with clang 19 for arm64:

nolibc-test.c:30:2: error: format specifies type 'uintmax_t' (aka 'unsigned long') but the argument has type 'uintmax_t' (aka 'unsigned long long') [-Werror,-Wformat]

tools/include/nolibc/stdint.h +2 -2
index cd79ddd6170e0..b052ad6303c38 100644
@@ -39,8 +39,8 @@ typedef   size_t      uint_fast32_t;
 typedef  int64_t       int_fast64_t;
 typedef uint64_t      uint_fast64_t;
 
-typedef  int64_t           intmax_t;
-typedef uint64_t          uintmax_t;
+typedef __INTMAX_TYPE__    intmax_t;
+typedef __UINTMAX_TYPE__  uintmax_t;
 
 /* limits of integral types */
 
maintainer
#2 lore raw
Quoted 14 lines · Thomas Weißschuh

Hi stable team,

Quoted 11 lines · Sasha Levin

This is a note to let you know that I've just added the patch titled

tools/nolibc: use intmax definitions from compiler

to the 6.15-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
tools-nolibc-use-intmax-definitions-from-compiler.patch
and it can be found in the queue-6.15 subdirectory.

Quoted 7 lines
Quoted 2 lines

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

As discussed in [0] and its ancestors, please only backport nolibc patches are were explicitly tagged for stable@.

[0] https://lore.kernel.org/lkml/2025061907-finance-dodgy-b0ae@gregkh/

I don't think Sasha had time to sync up here...

I'll drop this one, and the other nolibc patch that he added to the queues as well.

thanks,

greg k-h