Skip to content

printf() fixes

Alejandro Colomar linux-man 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest12 patches 27 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12dl_iterate_phdr.3: Cast 'ElfN_Word' to 'uintmax_t' for printf()man3/dl_iterate_phdr.3+4 -34 replies
2/12malloc_hook.3: Remove unneeded cast, and print 'size_t' with "%zu"man3/malloc_hook.3+2 -21 reply
3/12pthread_getcpuclockid.3: Cast 'time_t' to 'intmax_t' for printf()man3/pthread_getcpuclockid.3+2 -16 replies
4/12getgrent_r.3: Cast 'gid_t' to 'intmax_t' for printf()man3/getgrent_r.3+2 -11 reply
5/12getpwent_r.3: Cast 'uid_t' to 'intmax_t' for printf()man3/getpwent_r.3+3 -25 replies
6/12rtld-audit.7: Use "%u" rather than "%d" when printing 'unsigned int' valuesman7/rtld-audit.7+3 -31 reply
7/12userfaultfd.2: Use 'PRIx64' rather than "%llx" when printing 64-bit fixed-width typesman2/userfaultfd.2+4 -31 reply
8/12clock_getres.2: Cast 'time_t' to 'intmax_t' for printf() and fix the length modifiersman2/clock_getres.2+5 -26 replies
9/12open_by_handle_at.2: Use "%u" rather than "%d" when printing 'unsigned int' valuesman2/open_by_handle_at.2+1 -11 reply
10/12spu_run.2: Cast 'int' to 'unsigned int' when printing with "%x"man2/spu_run.2+1 -12 replies
11/12mprotect.2: Use "%p" rather than casting to 'long' when printing adresses (pointer values)man2/mprotect.2+2 -31 reply
12/12pidfd_open.2: Cast 'short' to 'unsigned int' when printing with "%x"man2/pidfd_open.2+2 -12 replies

Reviews trailers per patch

1 of 12 patches has a Reviewed-by or Acked-by.

PatchJakub Wilk
1/12
2/12
3/12
4/12
5/12
6/12
7/12
8/12R-b
9/12
10/12
11/12
12/12

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/12] printf() fixes

Hello Michael,

Here are some patches related to printf().

Cheers,

Alex

Alejandro Colomar (12):
dl_iterate_phdr.3: Cast 'ElfN_Word' to 'uintmax_t' for printf() malloc_hook.3: Remove unneeded cast, and print 'size_t' with "%zu" pthread_getcpuclockid.3: Cast 'time_t' to 'intmax_t' for printf() getgrent_r.3: Cast 'gid_t' to 'intmax_t' for printf() getpwent_r.3: Cast 'uid_t' to 'intmax_t' for printf() rtld-audit.7: Use "%u" rather than "%d" when printing 'unsigned int'
values
userfaultfd.2: Use 'PRIx64' rather than "%llx" when printing 64-bit
fixed-width types
clock_getres.2: Cast 'time_t' to 'intmax_t' for printf() and fix the
length modifiers
open_by_handle_at.2: Use "%u" rather than "%d" when printing 'unsigned
int' values
spu_run.2: Cast 'int' to 'unsigned int' when printing with "%x" mprotect.2: Use "%p" rather than casting to 'long' when printing
adresses (pointer values)
pidfd_open.2: Cast 'short' to 'unsigned int' when printing with "%x"

 man2/clock_getres.2          | 7 +++++--
 man2/mprotect.2              | 5 ++---
 man2/open_by_handle_at.2     | 2 +-
 man2/pidfd_open.2            | 3 ++-
 man2/spu_run.2               | 2 +-
 man2/userfaultfd.2           | 7 ++++---
 man3/dl_iterate_phdr.3       | 7 ++++---
 man3/getgrent_r.3            | 3 ++-
 man3/getpwent_r.3            | 5 +++--
 man3/malloc_hook.3           | 4 ++--
 man3/pthread_getcpuclockid.3 | 3 ++-
 man7/rtld-audit.7            | 6 +++---
 12 files changed, 31 insertions(+), 23 deletions(-)
Signature · 1 line
2.28.0