[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-45e29d119e9923ff14dfb840e3482bef1667bbfb@git.kernel.org>
Date: Mon, 22 Jul 2019 01:34:07 -0700
From: tip-bot for Andy Lutomirski <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: tglx@...utronix.de, hpa@...or.com, linux-kernel@...r.kernel.org,
mingo@...nel.org, luto@...nel.org
Subject: [tip:x86/entry] x86/syscalls: Make __X32_SYSCALL_BIT be unsigned
long
Commit-ID: 45e29d119e9923ff14dfb840e3482bef1667bbfb
Gitweb: https://git.kernel.org/tip/45e29d119e9923ff14dfb840e3482bef1667bbfb
Author: Andy Lutomirski <luto@...nel.org>
AuthorDate: Wed, 3 Jul 2019 13:34:05 -0700
Committer: Thomas Gleixner <tglx@...utronix.de>
CommitDate: Mon, 22 Jul 2019 10:31:22 +0200
x86/syscalls: Make __X32_SYSCALL_BIT be unsigned long
Currently, it's an int. This is bizarre. Fortunately, the code using it
still works: ~__X32_SYSCALL_BIT is also int, so, if nr is unsigned long,
then C kindly sign-extends the ~__X32_SYSCALL_BIT part, and it actually
results in the desired value.
This is far more subtle than it deserves to be. Syscall numbers are, for
all practical purposes, unsigned long, so make __X32_SYSCALL_BIT be
unsigned long.
Signed-off-by: Andy Lutomirski <luto@...nel.org>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Link: https://lkml.kernel.org/r/99b0d83ad891c67105470a1a6b63243fd63a5061.1562185330.git.luto@kernel.org
---
arch/x86/include/uapi/asm/unistd.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/include/uapi/asm/unistd.h b/arch/x86/include/uapi/asm/unistd.h
index 30d7d04d72d6..196fdd02b8b1 100644
--- a/arch/x86/include/uapi/asm/unistd.h
+++ b/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 0x40000000
+#define __X32_SYSCALL_BIT 0x40000000UL
#ifndef __KERNEL__
# ifdef __i386__
Powered by blists - more mailing lists