From: Willy Tarreau <w@1wt.eu>
To: "Thomas Weißschuh" <linux@weissschuh.net>
Cc: linux-kernel@vger.kernel.org, Daniel Palmer <daniel@0x0f.com>
Subject: Re: [PATCH] tools/nolibc: mark arg1 operand in __nolibc_syscall0() as write-only
Date: Fri, 3 Jul 2026 19:45:09 +0200 [thread overview]
Message-ID: <akf1JbfKKTLOszi-@1wt.eu> (raw)
In-Reply-To: <akf0Zk-ci0WG93Mc@1wt.eu>
On Fri, Jul 03, 2026 at 07:41:58PM +0200, Willy Tarreau wrote:
> Hi Thomas!
>
> On Fri, Jul 03, 2026 at 07:30:16PM +0200, Thomas Weißschuh wrote:
> > __nolibc_syscall0() does not set the arg1 variable before passing it to
> > the asm block. This uninitialized variable read is undefined behavior.
> > Clang can miscompile this.
>
> Interesting. I don't know how we ended up like this, most likely just
> due to reusing the same code blocks for the different variants. I'm
> noting that m68k is affected as well then. I'm CCing Daniel for a
> double-check.
Hmmm no I'm wrong, sorry Daniel for the noise, on m68k _num is initialized
before being passed to the asm statement so "+r" is fine there.
Willy
prev parent reply other threads:[~2026-07-03 17:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-03 17:30 [PATCH] tools/nolibc: mark arg1 operand in __nolibc_syscall0() as write-only Thomas Weißschuh
2026-07-03 17:41 ` Willy Tarreau
2026-07-03 17:45 ` Willy Tarreau [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=akf1JbfKKTLOszi-@1wt.eu \
--to=w@1wt.eu \
--cc=daniel@0x0f.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@weissschuh.net \
/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