Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.bugs.dist > #1003375

Bug#954294: linux: __X32_SYSCALL_BIT being defined as UL constant breaks userspace (was Re: libseccomp-dev: API break: SCMP_SYS() is unsigned long (was Re: Bug#954294: systemd: FTBFS on x32 due to format string errors, need explicit casts))

From Thorsten Glaser <t.glaser@tarent.de>
Newsgroups linux.debian.bugs.dist, linux.debian.kernel
Subject Bug#954294: linux: __X32_SYSCALL_BIT being defined as UL constant breaks userspace (was Re: libseccomp-dev: API break: SCMP_SYS() is unsigned long (was Re: Bug#954294: systemd: FTBFS on x32 due to format string errors, need explicit casts))
Date 2020-04-07 14:50 +0200
Message-ID <zSVPY-86M-13@gated-at.bofh.it> (permalink)
References (3 earlier) <zSCtY-4Ta-21@gated-at.bofh.it> <zSSfo-5UL-3@gated-at.bofh.it> <zSVGi-83p-15@gated-at.bofh.it> <zM9El-8uV-3@gated-at.bofh.it> <zSVGi-83p-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Cross-posted to 2 groups.

Show all headers | View raw


Dear kernel team,

libseccomp uses the __NR_* constants from <asm/unistd.h> in its
macro SCMP_SYS() which is designed to return int.

However, on x32 some codes return unsigned long instead, breaking this.
The cause is that this…

> /usr/include/x86_64-linux-gnux32/asm/unistd.h:#define __X32_SYSCALL_BIT 0x40000000UL

… is OR’d into the numbers.

I’d like to propose the change…
-#define __X32_SYSCALL_BIT 0x40000000UL
+#define __X32_SYSCALL_BIT 0x40000000
… which should be safe to do as the number fits into signed int,
but must be checked against other users (especially in the kernel
itself I’d guess).

This should also technically be correct, since on all(?) other
architectures syscall numbers are int constants.

Please forward this to upstream.

Thanks,
//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

**********

Mit der tarent Academy bieten wir auch Trainings und Schulungen in den
Bereichen Softwareentwicklung, Agiles Arbeiten und Zukunftstechnologien an.

Besuchen Sie uns auf www.tarent.de/academy. Wir freuen uns auf Ihren Kontakt.

**********

Back to linux.debian.bugs.dist | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Bug#954294: systemd: FTBFS on x32 due to format string errors, need explicit casts Thorsten Glaser <tg@mirbsd.de> - 2020-03-19 21:10 +0100
  Bug#954294: linux: __X32_SYSCALL_BIT being defined as UL constant breaks userspace (was Re: libseccomp-dev: API break: SCMP_SYS() is unsigned long (was Re: Bug#954294: systemd: FTBFS on x32 due to format string errors, need explicit casts)) Thorsten Glaser <t.glaser@tarent.de> - 2020-04-07 14:50 +0200
    Bug#954294: linux: __X32_SYSCALL_BIT being defined as UL constant breaks userspace (was Re: libseccomp-dev: API break: SCMP_SYS() is unsigned long (was Re: Bug#954294: systemd: FTBFS on x32 due to format string errors, need explicit casts)) Ben Hutchings <ben@decadent.org.uk> - 2020-04-08 16:00 +0200
      Bug#954294: linux: __X32_SYSCALL_BIT being defined as UL constant breaks userspace (was Re: libseccomp-dev: API break: SCMP_SYS() is unsigned long (was Re: Bug#954294: systemd: FTBFS on x32 due to format string errors, need explicit casts)) Thorsten Glaser <t.glaser@tarent.de> - 2020-04-08 16:10 +0200
  Bug#954294: libseccomp-dev: API break: SCMP_SYS() is unsigned long (was Re: Bug#954294: systemd: FTBFS on x32 due to format string errors, need explicit casts) Thorsten Glaser <t.glaser@tarent.de> - 2020-04-08 16:10 +0200
  Bug#954294: __X32_SYSCALL_BIT being defined as UL constant breaks userspace Thorsten Glaser <t.glaser@tarent.de> - 2020-04-08 16:30 +0200

csiph-web