Skip to content

nolibc updates for Linux 5.20

Ammar Faizi lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2tools/nolibc/stdlib: Support overflow checking for older compiler versionstools/include/nolibc/stdlib.h+3 -43 replies
2/2tools/nolibc/stdio: Add format attribute to enable printf warningstools/include/nolibc/stdio.h+2 -21 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchWilly TarreauAlviro Iskandar Setiawan
1/2A-b R-b
2/2A-b

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 v1 0/2] nolibc updates for Linux 5.20

Hi Willy,
Hi Paul,

Not much to do this time. Only small nolibc updates here. There are two patches in this series.

1. Address Willy's comment about overflow checking in the multiplication operation [1]. This patch supports overflow checking for older compiler versions. Currently, we use __builtin_mul_overflow() that doesn't exist in older compiler versions. Instead of using this built-in, use a simple division to check for overflow in the calloc() function.

2. The compiler can warn us about wrong printf arguments. This patch enables the warnings. Currently, only two functions use this attribute:
printf and fprintf.

Hopefully, I can send more updates for 5.21+.

Thank you!

---

Alviro Iskandar Setiawan (1):
tools/nolibc/stdio: Add format attribute to enable printf warnings

Ammar Faizi (1):
tools/nolibc/stdlib: Support overflow checking for older compiler versions

 tools/include/nolibc/stdio.h  | 4 ++--
 tools/include/nolibc/stdlib.h | 7 +++----
 2 files changed, 5 insertions(+), 6 deletions(-)

base-commit: 9a9e459ed0e76710f1258b6c1d4c0316b52b4b08
prerequisite-patch-id: e4a9acdc12961f2d4c6bb99e4790b8ffa9d15174
prerequisite-patch-id: 5a618e6a72c7d2beef4ba2c2cf01dadfbaf9a996
prerequisite-patch-id: 1bcffd448f6984eee80d86560af19672cd4ae716
prerequisite-patch-id: 3e31c80bd4dd532e30b4bba76e5d98647e21184b
prerequisite-patch-id: 34e531967a67791d5b3c3e071527de7235715906
prerequisite-patch-id: 14105c6ae9dcc068ddf12a7c1bf431066199b813
prerequisite-patch-id: 4299173943ea579f538da00488fb1a7b1a690a79
prerequisite-patch-id: dd85164f2ec9eb8cea64ab801abac614f9d0c8f5
prerequisite-patch-id: 2c1b940635d1564e26b9959eb57cf9fa6983cb2f

Signature · 1 line
Ammar Faizi