The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Andy Lutomirski <luto@kernel.org>,
	Thorsten Glaser <t.glaser@tarent.de>, X86 ML <x86@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Cc: Andy Lutomirski <luto@kernel.org>, 954294@bugs.debian.org
Subject: Re: __X32_SYSCALL_BIT being defined as UL constant breaks userspace
Date: Thu, 09 Apr 2020 09:47:17 +0200	[thread overview]
Message-ID: <87wo6pp0ca.fsf@nanos.tec.linutronix.de> (raw)
In-Reply-To: <CALCETrUkC0mfbo44+Jb7p6f19S+nH5VAEZAwTaYApbNqy9Fj-w@mail.gmail.com>

Andy Lutomirski <luto@kernel.org> writes:
> On Wed, Apr 8, 2020 at 7:34 AM Thorsten Glaser <t.glaser@tarent.de> wrote:
>> asm/unistd_x32.h:#define __NR_mmap (__X32_SYSCALL_BIT + 9)
>>
>> This construct is, thankfully, still usable in something like
>>         #if (__NR_mmap > __NR_somethingelse)
>> but as __X32_SYSCALL_BIT is no longer int its type also isn’t.
>>
>> Therefore I ask you to revert this change, bringing x32 closer
>> to all other architectures.
>>
>
> One might reasonably ask whether it makes sense for syscall nrs to be
> signed at all.
>
> 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
> 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.)

Yes.

  reply	other threads:[~2020-04-09  7:47 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 ` __X32_SYSCALL_BIT being defined as UL constant breaks userspace Andy Lutomirski
2020-04-09  7:47   ` Thomas Gleixner [this message]
2020-04-09  7:47   ` Thorsten Glaser

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=87wo6pp0ca.fsf@nanos.tec.linutronix.de \
    --to=tglx@linutronix.de \
    --cc=954294@bugs.debian.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=t.glaser@tarent.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