diff options
Diffstat (limited to 'original/uapi/asm-x86')
-rw-r--r-- | original/uapi/asm-x86/asm/unistd.h | 11 | ||||
-rw-r--r-- | original/uapi/asm-x86/asm/unistd_32.h | 4 | ||||
-rw-r--r-- | original/uapi/asm-x86/asm/unistd_64.h | 4 | ||||
-rw-r--r-- | original/uapi/asm-x86/asm/unistd_x32.h | 4 |
4 files changed, 21 insertions, 2 deletions
diff --git a/original/uapi/asm-x86/asm/unistd.h b/original/uapi/asm-x86/asm/unistd.h index 196fdd0..be5e2e7 100644 --- a/original/uapi/asm-x86/asm/unistd.h +++ b/original/uapi/asm-x86/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/original/uapi/asm-x86/asm/unistd_32.h b/original/uapi/asm-x86/asm/unistd_32.h index f6e06fc..29572e0 100644 --- a/original/uapi/asm-x86/asm/unistd_32.h +++ b/original/uapi/asm-x86/asm/unistd_32.h @@ -429,4 +429,8 @@ #define __NR_openat2 437 #define __NR_pidfd_getfd 438 +#ifdef __KERNEL__ +#define __NR_syscall_max 438 +#endif + #endif /* _ASM_X86_UNISTD_32_H */ diff --git a/original/uapi/asm-x86/asm/unistd_64.h b/original/uapi/asm-x86/asm/unistd_64.h index 924f826..c74610d 100644 --- a/original/uapi/asm-x86/asm/unistd_64.h +++ b/original/uapi/asm-x86/asm/unistd_64.h @@ -351,4 +351,8 @@ #define __NR_openat2 437 #define __NR_pidfd_getfd 438 +#ifdef __KERNEL__ +#define __NR_syscall_max 438 +#endif + #endif /* _ASM_X86_UNISTD_64_H */ diff --git a/original/uapi/asm-x86/asm/unistd_x32.h b/original/uapi/asm-x86/asm/unistd_x32.h index 0103077..b6e0a33 100644 --- a/original/uapi/asm-x86/asm/unistd_x32.h +++ b/original/uapi/asm-x86/asm/unistd_x32.h @@ -340,4 +340,8 @@ #define __NR_preadv2 (__X32_SYSCALL_BIT + 546) #define __NR_pwritev2 (__X32_SYSCALL_BIT + 547) +#ifdef __KERNEL__ +#define __NR_syscall_max 547 +#endif + #endif /* _ASM_X86_UNISTD_X32_H */ |