From: "Thomas Weißschuh" <linux@weissschuh.net>
To: Danish Khateeb <danishkhateeb03@gmail.com>
Cc: Willy Tarreau <w@1wt.eu>, Shuah Khan <shuah@kernel.org>,
linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/2] tools/nolibc: fix verrx() and errx()
Date: Thu, 24 Sep 2026 21:29:35 +0200 [thread overview]
Message-ID: <4215a112-138b-4fc9-b958-a0ac112cee83@t-8ch.de> (raw)
In-Reply-To: <20260924120958.23698-1-danishkhateeb03@gmail.com>
On 2026-09-24 07:09:56-0500, Danish Khateeb wrote:
> verrx() passes its va_list to the variadic warnx() instead of vwarnx(),
> so errx() and verrx() print their messages with the wrong arguments,
> and can crash when the format has a "%s".
>
> Patch 1 fixes it. Patch 2 adds a nolibc-test case for errx(), which
> would have caught it.
>
> The series is independent of the readdir_r()/FD_* series [1] and merges
> cleanly with it.
>
> Tested on top of nolibc/for-next 61fb00d6efee, on x86_64 and i386, and
> on arm, arm64 and sparc64 under qemu-user:
>
> - nolibc-test, all tests: no failures with the series. The only
> difference from before is the new errx test, which passes. It also
> passes against glibc (make libc-test).
>
> - Without patch 1, the errx test fails on all five. On x86_64 the child
> is killed by SIGSEGV.
>
> [1] https://lore.kernel.org/all/20260924015222.31693-1-danishkhateeb03@gmail.com/
>
> Danish Khateeb (2):
> tools/nolibc: fix verrx() and errx() message formatting
> selftests/nolibc: add a test for errx()
Thanks!
I picked up the bugfix. The selftests looks like a lot of additional
code for the value it provides, so I didn't apply it.
> tools/include/nolibc/err.h | 2 +-
> tools/testing/selftests/nolibc/nolibc-test.c | 47 ++++++++++++++++++++
> 2 files changed, 48 insertions(+), 1 deletion(-)
>
>
> base-commit: 61fb00d6efeeeb9fd65c81db3bd8b2ac140f573c
> --
> 2.55.0
>
prev parent reply other threads:[~2026-09-24 19:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-24 12:09 Danish Khateeb
2026-09-24 12:09 ` [PATCH 1/2] tools/nolibc: fix verrx() and errx() message formatting Danish Khateeb
2026-09-24 12:09 ` [PATCH 2/2] selftests/nolibc: add a test for errx() Danish Khateeb
2026-09-24 19:29 ` Thomas Weißschuh [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4215a112-138b-4fc9-b958-a0ac112cee83@t-8ch.de \
--to=linux@weissschuh.net \
--cc=danishkhateeb03@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=shuah@kernel.org \
--cc=w@1wt.eu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®