diff options
author | Andy Lutomirski <luto@kernel.org> | 2019-07-03 22:34:05 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2019-07-22 10:31:22 +0200 |
commit | 45e29d119e9923ff14dfb840e3482bef1667bbfb (patch) | |
tree | c6cffb14d2047427f379d100a48f86ae71f8763d /arch/x86 | |
parent | Linus 5.3-rc1 (diff) | |
download | linux-45e29d119e9923ff14dfb840e3482bef1667bbfb.tar.xz linux-45e29d119e9923ff14dfb840e3482bef1667bbfb.zip |
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@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/99b0d83ad891c67105470a1a6b63243fd63a5061.1562185330.git.luto@kernel.org
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/include/uapi/asm/unistd.h | 2 |
1 files changed, 1 insertions, 1 deletions
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__ |