From: Thorsten Glaser <t.glaser@tarent.de>
To: Andy Lutomirski <luto@kernel.org>
Cc: X86 ML <x86@kernel.org>, LKML <linux-kernel@vger.kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
954294@bugs.debian.org
Subject: Re: __X32_SYSCALL_BIT being defined as UL constant breaks userspace
Date: Thu, 9 Apr 2020 09:47:51 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.22.394.2004090945110.31491@tglase-nb.lan.tarent.de> (raw)
In-Reply-To: <CALCETrUkC0mfbo44+Jb7p6f19S+nH5VAEZAwTaYApbNqy9Fj-w@mail.gmail.com>
On Wed, 8 Apr 2020, Andy Lutomirski wrote:
> One might reasonably ask whether it makes sense for syscall nrs to be
> signed at all.
It doesn’t, but it’s probably this way for hysteric raisins.
> But regardless, this breaks userspace and we should fix it. I can
> whip up a patch to split it into X32_SYSCALL_BIT (unsigned long) and
> __X32_SYSCALL_BIT (uapi, int). Thomas, etc, does this seem
This would help with the issue, thanks.
> reasonable? (For those not following all the machinations, this
> change caused some userspace build failures in libseccomp and/or
> systemd for reasons that are vaguely silly.)
Not very silly:
printf("%d\n", __NR_mmap);
That with -Wformat and -Werror (or -Werror=format) rightfully warns,
as the compiler cannot, on x32 (where int=long), detect that, on
architectures where int≠long the constant is int.
Even worse, switching userspace to unsigned long globally would
completely hose this on LP64 architectures.
So this is, in my opinion, completely justified. (Disclaimer: I’m
not affiliated with systemd and not even running it except udev.)
bye,
//mirabilos
--
tarent solutions GmbH
Rochusstraße 2-4, D-53123 Bonn • http://www.tarent.de/
Tel: +49 228 54881-393 • Fax: +49 228 54881-235
HRB 5168 (AG Bonn) • USt-ID (VAT): DE122264941
Geschäftsführer: Dr. Stefan Barth, Kai Ebenrett, Boris Esser, Alexander Steeg
prev parent reply other threads:[~2020-04-09 8:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <alpine.DEB.2.22.394.2004081607050.27197@tglase.lan.tarent.de>
2020-04-09 5:00 ` Andy Lutomirski
2020-04-09 7:47 ` Thomas Gleixner
2020-04-09 7:47 ` Thorsten Glaser [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=alpine.DEB.2.22.394.2004090945110.31491@tglase-nb.lan.tarent.de \
--to=t.glaser@tarent.de \
--cc=954294@bugs.debian.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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®