Skip to content

nolibc fixes marked for -stable

Willy Tarreau lkml stable 1 version Applied

Status from this message: Queued for v5.17, thank you both!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 4 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/3tools/nolibc: x86-64: Fix startup code bugtools/include/nolibc/nolibc.h+8 -20 replies
2/3tools/nolibc: i386: fix initial stack alignmenttools/include/nolibc/nolibc.h+9 -13 replies
3/3tools/nolibc: fix incorrect truncation of exit codetools/include/nolibc/nolibc.h+5 -80 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] nolibc fixes marked for -stable

Hi Paul,

here are a few fixes for nolibc. Ammar Faizi figured that the stack was not properly aligned on x86_64, it was aligned for after the call instead of before due to my misunderstanding of the spec. This made me check i386 and I got it wrong there as well. Others are OK as they do not push but switch pointers on a call. The problem is essentially detected when using SIMD instructions (either voluntarily or when the compiler does it on its own).

A second (less important) issue is that I thought that it was up to the userland code to truncate the code passed to exit() to 8 bits while it's the kernel that does it. The difference is subtle but is visible in strace, and this was reported by Ammar as well. This time it affected all supported archs.

This series is based on 5.15-rc6. I marked them for backport to stable, just in case anyone uses nolibc for bisecting bugs.

Thanks!
Willy

Ammar Faizi (1):
tools/nolibc: x86-64: Fix startup code bug

Willy Tarreau (2):
tools/nolibc: i386: fix initial stack alignment tools/nolibc: fix incorrect truncation of exit code

 tools/include/nolibc/nolibc.h | 33 ++++++++++++++++++++++-----------
 1 file changed, 22 insertions(+), 11 deletions(-)
Signature · 1 line
2.17.5