]> www.infradead.org Git - users/hch/block.git/commitdiff
Merge remote-tracking branch 'notifications/notifications-pipe-core' into master
authorStephen Rothwell <sfr@canb.auug.org.au>
Fri, 30 Oct 2020 02:19:51 +0000 (13:19 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 30 Oct 2020 02:19:52 +0000 (13:19 +1100)
32 files changed:
1  2 
Documentation/watch_queue.rst
arch/alpha/kernel/syscalls/syscall.tbl
arch/arm/tools/syscall.tbl
arch/arm64/include/asm/unistd.h
arch/arm64/include/asm/unistd32.h
arch/ia64/kernel/syscalls/syscall.tbl
arch/m68k/kernel/syscalls/syscall.tbl
arch/microblaze/kernel/syscalls/syscall.tbl
arch/mips/kernel/syscalls/syscall_n32.tbl
arch/mips/kernel/syscalls/syscall_n64.tbl
arch/mips/kernel/syscalls/syscall_o32.tbl
arch/parisc/kernel/syscalls/syscall.tbl
arch/powerpc/kernel/syscalls/syscall.tbl
arch/s390/kernel/syscalls/syscall.tbl
arch/sh/kernel/syscalls/syscall.tbl
arch/sparc/kernel/syscalls/syscall.tbl
arch/x86/entry/syscalls/syscall_32.tbl
arch/x86/entry/syscalls/syscall_64.tbl
arch/xtensa/kernel/syscalls/syscall.tbl
fs/Kconfig
fs/Makefile
fs/mount.h
fs/namespace.c
include/linux/dcache.h
include/linux/lsm_hook_defs.h
include/linux/lsm_hooks.h
include/linux/security.h
include/linux/syscalls.h
include/linux/watch_queue.h
include/uapi/asm-generic/unistd.h
kernel/sys_ni.c
security/security.c

Simple merge
index ee7b01bb7346c9c57843e68a3fff34ad703601fa,b6cf8403da351a1f4e1faab0a5ccf3b748c74064..c5cc5bfa2062d38518898b5ca4922a2b8c9db51a
  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
index d056a548358ea024fc64f3a107849951a26838d7,27cc1f53f4a06be2d314945a6b487e115002f90a..47325b3b661afd70f2ede0e235a419254f71b579
  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
index b3b2019f8d16bbeef51948c249dcfb6dbd97a0fb,b3b2019f8d16bbeef51948c249dcfb6dbd97a0fb..86a9d7b3eabe9ee254df4abd7f4fd008176d1cf5
@@@ -38,7 -38,7 +38,7 @@@
  #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
index 107f08e03b9fdc4d54b41c7fca707727e1524c92,4f9cf98cdf0fdc014d438fe8213b42fef3332cdc..6c1dcca067e0b098657818d8be2e19029992392f
@@@ -887,8 -885,8 +887,10 @@@ __SYSCALL(__NR_openat2, sys_openat2
  __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
index b96ed8b8a508999112a1d8065db035d90efaec0c,fc6d87903781f28fc8c8564aa8cb3f5313b726bf..0332444623501bb261edfafdb6b8e0d332c24643
  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
index 625fb6d3284240e0d8bc96556c0b3ff92b350540,c671aa0e4d255a1c39f99b6fd6541c402310f617..efd3ecb3cdfc06ec9d71fde207bcaf1fd95907dd
  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
index aae729c95cf99d23e056c510651c6f3126d4ceff,65cc53f129ef1abe2f44358dd8d506554dd4eb47..67ae5a5e4d213bfad82ddbdaa8c6dae3a28b15bb
  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
index 32817c954435d7c7dba4a126b35054f18ae0d9ee,7f034a239930c12fb9ff863084296bcc3482b737..c59bc6acc47ac88fc2043e01727f109e27129562
  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
index 9e4ea3c31b1ce026fdad266866b60be6426d882b,d39b90de3642f86869c6c2c8c76ba94df5f6b073..50bbb95170527668248b42d71bfc850826e8c1be
  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
index 29f5f28cf5cea83d6119637ea57d40ad6abe4d40,09f426cb45b119ec50b3f42e62699217dfe02e35..1d5644e221b41eb5572813f2457130e2ba8f2ce4
  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
index f375ea528e59c34e799e16f9cc9ec8a97cc32fec,52ff3454baa19b1516006f9e74691432d27f3121..4492cc2fce239ebf5cdd871e28fde07fca18cc7c
  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
index 1275daec7fec365024fd50d2b43d42616d829b20,10b7ed3c7a1bdce71215a11d33bd3b8da3538ecc..ee122bfc2ddcf5525988fec31c84f5b9901d6889
  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
index 28c16800048344821461943d58f99ff1f50ab4c6,86f317bf52dff83d5937c7d6dcba1aeff196f721..b467b57d66d12ed18985dc70484b902e5a73a4e6
  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
index 783738448ff555f66baa8d9b559dce0d3e08b325,0bb0f0b372c7a64b166297d8efa0a6982081d15a..f9c7ca5cb969226796e845e60cd68c3c2fcd2acd
  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
index 78160260991be726ff888371314cfd10b82d5b6a,369ab65c1e9a67e646e92bb113ce22948f241971..341fd4ba053b0995ee3d8e96e7dceade74ec2cd7
  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
index 0d0667a9fbd70aeb9e297342b9f855a457d45ea4,e760ba92c58d22c5b82effffb943b4085a80815d..c52ab1c4a755d13d138b12149c15df0002681470
  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
index 379819244b91d275b2c98f7ff38a59049c24b42a,5b58621d4f75d3b49db66818c7e0c71b0b6234d6..f3270a9ef4678255246e7938bcc609776918c9fa
  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
index b070f272995d6447895287704a0c76237619c2cc,5b28ee39f70ffd5fc730e608827658726430b49f..6225d87be81fcccdd73cae1e192635f84dbbc651
  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
diff --cc fs/Kconfig
Simple merge
diff --cc fs/Makefile
Simple merge
diff --cc fs/mount.h
index ce6c376e0bc2d9378af90d141d12bf387d9c11b9,85456a5f5a3a5d70e7c2667e08d7214d68647033..84d176c0b37f059936a658297e1f7e7913de299b
@@@ -4,8 -4,10 +4,9 @@@
  #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;
        /*
diff --cc fs/namespace.c
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index c994d1b2cdbaa2abb313170749d0ee396a807a90,38e04c7a7951aad84ab689037d8dedf3528db351..f1086d12cd03f66a3c288761cc2023672a5d9d5a
@@@ -120,14 -120,13 +120,19 @@@ static inline void remove_watch_list(st
   * 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 */
index 2056318988f774931c4e0a3104144bf4a75ff52f,fcdca8c7d30ac84f8d23e6e53027a51f7062d666..5df46517260e5319503ef8560b70efe68a453323
@@@ -857,11 -857,11 +857,13 @@@ __SYSCALL(__NR_openat2, sys_openat2
  __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
diff --cc kernel/sys_ni.c
Simple merge
Simple merge