Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.kernel > #67186 > unrolled thread
| Started by | Thorsten Glaser <t.glaser@tarent.de> |
|---|---|
| First post | 2020-05-26 18:00 +0200 |
| Last post | 2020-05-26 18:00 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.debian.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Bug#954294: [tip: x86/urgent] x86/syscalls: Revert "x86/syscalls: Make __X32_SYSCALL_BIT be unsigned long" (fwd) Thorsten Glaser <t.glaser@tarent.de> - 2020-05-26 18:00 +0200
Processed: [tip: x86/urgent] x86/syscalls: Revert "x86/syscalls: Make __X32_SYSCALL_BIT be unsigned long" (fwd) "Debian Bug Tracking System" <owner@bugs.debian.org> - 2020-05-26 18:00 +0200
| From | Thorsten Glaser <t.glaser@tarent.de> |
|---|---|
| Date | 2020-05-26 18:00 +0200 |
| Subject | Bug#954294: [tip: x86/urgent] x86/syscalls: Revert "x86/syscalls: Make __X32_SYSCALL_BIT be unsigned long" (fwd) |
| Message-ID | <AaK9H-3QZ-1@gated-at.bofh.it> |
tags 954294 + fixed-upstream
thanks
---------- Forwarded message ----------
From: tip-bot2 for Andy Lutomirski <tip-bot2@linutronix.de>
Message-ID: <159050477082.17951.1414743958663563425.tip-bot2@tip-bot2>
To: linux-tip-commits@vger.kernel.org
Cc: Thorsten Glaser <t.glaser@tarent.de>, Andy Lutomirski <luto@kernel.org>,
Borislav Petkov <bp@suse.de>, stable@kernel.org, x86 <x86@kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Date: Tue, 26 May 2020 14:52:50 -0000
Subject: [tip: x86/urgent] x86/syscalls: Revert
"x86/syscalls: Make __X32_SYSCALL_BIT be unsigned long"
Reply-To: linux-kernel@vger.kernel.org
The following commit has been merged into the x86/urgent branch of tip:
Commit-ID: 700d3a5a664df267f01ec8887fd2d8ff98f67e7f
Gitweb: https://git.kernel.org/tip/700d3a5a664df267f01ec8887fd2d8ff98f67e7f
Author: Andy Lutomirski <luto@kernel.org>
AuthorDate: Fri, 08 May 2020 17:25:32 -07:00
Committer: Borislav Petkov <bp@suse.de>
CommitterDate: Tue, 26 May 2020 16:42:43 +02:00
x86/syscalls: Revert "x86/syscalls: Make __X32_SYSCALL_BIT be unsigned long"
Revert
45e29d119e99 ("x86/syscalls: Make __X32_SYSCALL_BIT be unsigned long")
and add a comment to discourage someone else from making the same
mistake again.
It turns out that some user code fails to compile if __X32_SYSCALL_BIT
is unsigned long. See, for example [1] below.
[ bp: Massage and do the same thing in the respective tools/ header. ]
Fixes: 45e29d119e99 ("x86/syscalls: Make __X32_SYSCALL_BIT be unsigned long")
Reported-by: Thorsten Glaser <t.glaser@tarent.de>
Signed-off-by: Andy Lutomirski <luto@kernel.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: stable@kernel.org
Link: [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=954294
Link: https://lkml.kernel.org/r/92e55442b744a5951fdc9cfee10badd0a5f7f828.1588983892.git.luto@kernel.org
---
arch/x86/include/uapi/asm/unistd.h | 11 +++++++++--
tools/arch/x86/include/uapi/asm/unistd.h | 2 +-
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/arch/x86/include/uapi/asm/unistd.h b/arch/x86/include/uapi/asm/unistd.h
index 196fdd0..be5e2e7 100644
--- a/arch/x86/include/uapi/asm/unistd.h
+++ b/arch/x86/include/uapi/asm/unistd.h
@@ -2,8 +2,15 @@
#ifndef _UAPI_ASM_X86_UNISTD_H
#define _UAPI_ASM_X86_UNISTD_H
-/* x32 syscall flag bit */
-#define __X32_SYSCALL_BIT 0x40000000UL
+/*
+ * x32 syscall flag bit. Some user programs expect syscall NR macros
+ * and __X32_SYSCALL_BIT to have type int, even though syscall numbers
+ * are, for practical purposes, unsigned long.
+ *
+ * Fortunately, expressions like (nr & ~__X32_SYSCALL_BIT) do the right
+ * thing regardless.
+ */
+#define __X32_SYSCALL_BIT 0x40000000
#ifndef __KERNEL__
# ifdef __i386__
diff --git a/tools/arch/x86/include/uapi/asm/unistd.h b/tools/arch/x86/include/uapi/asm/unistd.h
index 196fdd0..30d7d04 100644
--- a/tools/arch/x86/include/uapi/asm/unistd.h
+++ b/tools/arch/x86/include/uapi/asm/unistd.h
@@ -3,7 +3,7 @@
#define _UAPI_ASM_X86_UNISTD_H
/* x32 syscall flag bit */
-#define __X32_SYSCALL_BIT 0x40000000UL
+#define __X32_SYSCALL_BIT 0x40000000
#ifndef __KERNEL__
# ifdef __i386__
[toc] | [next] | [standalone]
| From | "Debian Bug Tracking System" <owner@bugs.debian.org> |
|---|---|
| Date | 2020-05-26 18:00 +0200 |
| Subject | Processed: [tip: x86/urgent] x86/syscalls: Revert "x86/syscalls: Make __X32_SYSCALL_BIT be unsigned long" (fwd) |
| Message-ID | <AaK9I-3QZ-9@gated-at.bofh.it> |
| In reply to | #67186 |
Processing commands for control@bugs.debian.org: > tags 954294 + fixed-upstream Bug #954294 [linux-libc-dev] linux: __X32_SYSCALL_BIT being defined as UL constant breaks userspace Added tag(s) fixed-upstream. > thanks Stopping processing here. Please contact me if you need assistance. -- 954294: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=954294 Debian Bug Tracking System Contact owner@bugs.debian.org with problems
[toc] | [prev] | [standalone]
Back to top | Article view | linux.debian.kernel
csiph-web