Skip to content

Commit 45e29d1

Browse files
amlutoKAGA-KOKO
authored andcommitted
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 <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Link: https://lkml.kernel.org/r/99b0d83ad891c67105470a1a6b63243fd63a5061.1562185330.git.luto@kernel.org
1 parent 5f9e832 commit 45e29d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/include/uapi/asm/unistd.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#define _UAPI_ASM_X86_UNISTD_H
44

55
/* x32 syscall flag bit */
6-
#define __X32_SYSCALL_BIT 0x40000000
6+
#define __X32_SYSCALL_BIT 0x40000000UL
77

88
#ifndef __KERNEL__
99
# ifdef __i386__

0 commit comments

Comments
 (0)