547 common openat2 sys_openat2
548 common pidfd_getfd sys_pidfd_getfd
549 common faccessat2 sys_faccessat2
-550 common watch_mount sys_watch_mount
+550 common process_madvise sys_process_madvise
++551 common watch_mount sys_watch_mount
437 common openat2 sys_openat2
438 common pidfd_getfd sys_pidfd_getfd
439 common faccessat2 sys_faccessat2
-440 common watch_mount sys_watch_mount
+440 common process_madvise sys_process_madvise
++441 common watch_mount sys_watch_mount
#define __ARM_NR_compat_set_tls (__ARM_NR_COMPAT_BASE + 5)
#define __ARM_NR_COMPAT_END (__ARM_NR_COMPAT_BASE + 0x800)
--#define __NR_compat_syscalls 441
++#define __NR_compat_syscalls 442
#endif
#define __ARCH_WANT_SYS_CLONE
__SYSCALL(__NR_pidfd_getfd, sys_pidfd_getfd)
#define __NR_faccessat2 439
__SYSCALL(__NR_faccessat2, sys_faccessat2)
-#define __NR_watch_mount 440
+#define __NR_process_madvise 440
+__SYSCALL(__NR_process_madvise, sys_process_madvise)
++#define __NR_watch_mount 441
+ __SYSCALL(__NR_watch_mount, sys_watch_mount)
/*
* Please add new compat syscalls above this comment and update
437 common openat2 sys_openat2
438 common pidfd_getfd sys_pidfd_getfd
439 common faccessat2 sys_faccessat2
-440 common watch_mount sys_watch_mount
+440 common process_madvise sys_process_madvise
++441 common watch_mount sys_watch_mount
437 common openat2 sys_openat2
438 common pidfd_getfd sys_pidfd_getfd
439 common faccessat2 sys_faccessat2
-440 common watch_mount sys_watch_mount
+440 common process_madvise sys_process_madvise
++441 common watch_mount sys_watch_mount
437 common openat2 sys_openat2
438 common pidfd_getfd sys_pidfd_getfd
439 common faccessat2 sys_faccessat2
-440 common watch_mount sys_watch_mount
+440 common process_madvise sys_process_madvise
++441 common watch_mount sys_watch_mount
437 n32 openat2 sys_openat2
438 n32 pidfd_getfd sys_pidfd_getfd
439 n32 faccessat2 sys_faccessat2
-440 n32 watch_mount sys_watch_mount
+440 n32 process_madvise sys_process_madvise
++441 n32 watch_mount sys_watch_mount
437 n64 openat2 sys_openat2
438 n64 pidfd_getfd sys_pidfd_getfd
439 n64 faccessat2 sys_faccessat2
-440 n64 watch_mount sys_watch_mount
+440 n64 process_madvise sys_process_madvise
++441 n64 watch_mount sys_watch_mount
437 o32 openat2 sys_openat2
438 o32 pidfd_getfd sys_pidfd_getfd
439 o32 faccessat2 sys_faccessat2
-440 o32 watch_mount sys_watch_mount
+440 o32 process_madvise sys_process_madvise
++441 o32 watch_mount sys_watch_mount
437 common openat2 sys_openat2
438 common pidfd_getfd sys_pidfd_getfd
439 common faccessat2 sys_faccessat2
-440 common watch_mount sys_watch_mount
+440 common process_madvise sys_process_madvise
++441 common watch_mount sys_watch_mount
437 common openat2 sys_openat2
438 common pidfd_getfd sys_pidfd_getfd
439 common faccessat2 sys_faccessat2
-440 common watch_mount sys_watch_mount
+440 common process_madvise sys_process_madvise
++441 common watch_mount sys_watch_mount
437 common openat2 sys_openat2 sys_openat2
438 common pidfd_getfd sys_pidfd_getfd sys_pidfd_getfd
439 common faccessat2 sys_faccessat2 sys_faccessat2
-440 common watch_mount sys_watch_mount sys_watch_mount
+440 common process_madvise sys_process_madvise sys_process_madvise
++441 common watch_mount sys_watch_mount sys_watch_mount
437 common openat2 sys_openat2
438 common pidfd_getfd sys_pidfd_getfd
439 common faccessat2 sys_faccessat2
-440 common watch_mount sys_watch_mount
+440 common process_madvise sys_process_madvise
++441 common watch_mount sys_watch_mount
437 common openat2 sys_openat2
438 common pidfd_getfd sys_pidfd_getfd
439 common faccessat2 sys_faccessat2
-440 common watch_mount sys_watch_mount
+440 common process_madvise sys_process_madvise
++441 common watch_mount sys_watch_mount
437 i386 openat2 sys_openat2
438 i386 pidfd_getfd sys_pidfd_getfd
439 i386 faccessat2 sys_faccessat2
-440 i386 watch_mount sys_watch_mount
+440 i386 process_madvise sys_process_madvise
++441 i386 watch_mount sys_watch_mount
437 common openat2 sys_openat2
438 common pidfd_getfd sys_pidfd_getfd
439 common faccessat2 sys_faccessat2
-440 common watch_mount sys_watch_mount
+440 common process_madvise sys_process_madvise
++441 common watch_mount sys_watch_mount
#
-# x32-specific system call numbers start at 512 to avoid cache impact
-# for native 64-bit operation. The __x32_compat_sys stubs are created
-# on-the-fly for compat_sys_*() compatibility system calls if X86_X32
-# is defined.
+# Due to a historical design error, certain syscalls are numbered differently
+# in x32 as compared to native x86_64. These syscalls have numbers 512-547.
+# Do not add new syscalls to this range. Numbers 548 and above are available
+# for non-x32 use.
#
512 x32 rt_sigaction compat_sys_rt_sigaction
513 x32 rt_sigreturn compat_sys_x32_rt_sigreturn
437 common openat2 sys_openat2
438 common pidfd_getfd sys_pidfd_getfd
439 common faccessat2 sys_faccessat2
-440 common watch_mount sys_watch_mount
+440 common process_madvise sys_process_madvise
++441 common watch_mount sys_watch_mount
#include <linux/poll.h>
#include <linux/ns_common.h>
#include <linux/fs_pin.h>
+ #include <linux/watch_queue.h>
struct mnt_namespace {
- atomic_t count;
struct ns_common ns;
struct mount * root;
/*
* watch_sizeof - Calculate the information part of the size of a watch record,
* given the structure size.
*/
- #define watch_sizeof(STRUCT) (sizeof(STRUCT) << WATCH_INFO_LENGTH__SHIFT)
+ #define watch_sizeof(STRUCT) \
+ ({ \
+ size_t max = WATCH_INFO_LENGTH >> WATCH_INFO_LENGTH__SHIFT; \
+ BUILD_BUG_ON(sizeof(STRUCT) > max); \
+ sizeof(STRUCT) << WATCH_INFO_LENGTH__SHIFT; \
+ })
+#else
+static inline int watch_queue_init(struct pipe_inode_info *pipe)
+{
+ return -ENOPKG;
+}
+
#endif
#endif /* _LINUX_WATCH_QUEUE_H */
__SYSCALL(__NR_pidfd_getfd, sys_pidfd_getfd)
#define __NR_faccessat2 439
__SYSCALL(__NR_faccessat2, sys_faccessat2)
-#define __NR_watch_mount 440
+#define __NR_process_madvise 440
+__SYSCALL(__NR_process_madvise, sys_process_madvise)
++#define __NR_watch_mount 441
+ __SYSCALL(__NR_watch_mount, sys_watch_mount)
#undef __NR_syscalls
--#define __NR_syscalls 441
++#define __NR_syscalls 442
/*
* 32 bit systems traditionally used different