epoll: wire up syscall epoll_pwait2
authorWillem de Bruijn <willemb@google.com>
Fri, 18 Dec 2020 22:05:41 +0000 (14:05 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 19 Dec 2020 19:18:38 +0000 (11:18 -0800)
Split off from prev patch in the series that implements the syscall.

Link: https://lkml.kernel.org/r/20201121144401.3727659-4-willemdebruijn.kernel@gmail.com
Signed-off-by: Willem de Bruijn <willemb@google.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
22 files changed:
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
include/linux/compat.h
include/linux/syscalls.h
include/uapi/asm-generic/unistd.h
kernel/sys_ni.c

index ee7b01b..a661706 100644 (file)
 548    common  pidfd_getfd                     sys_pidfd_getfd
 549    common  faccessat2                      sys_faccessat2
 550    common  process_madvise                 sys_process_madvise
+551    common  epoll_pwait2                    sys_epoll_pwait2
index d056a54..20e1170 100644 (file)
 438    common  pidfd_getfd                     sys_pidfd_getfd
 439    common  faccessat2                      sys_faccessat2
 440    common  process_madvise                 sys_process_madvise
+441    common  epoll_pwait2                    sys_epoll_pwait2
index b3b2019..86a9d7b 100644 (file)
@@ -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 107f08e..f4bca2b 100644 (file)
@@ -889,6 +889,8 @@ __SYSCALL(__NR_pidfd_getfd, sys_pidfd_getfd)
 __SYSCALL(__NR_faccessat2, sys_faccessat2)
 #define __NR_process_madvise 440
 __SYSCALL(__NR_process_madvise, sys_process_madvise)
+#define __NR_epoll_pwait2 441
+__SYSCALL(__NR_epoll_pwait2, sys_epoll_pwait2)
 
 /*
  * Please add new compat syscalls above this comment and update
index b96ed8b..bfc00f2 100644 (file)
 438    common  pidfd_getfd                     sys_pidfd_getfd
 439    common  faccessat2                      sys_faccessat2
 440    common  process_madvise                 sys_process_madvise
+441    common  epoll_pwait2                    sys_epoll_pwait2
index 625fb6d..7fe4e45 100644 (file)
 438    common  pidfd_getfd                     sys_pidfd_getfd
 439    common  faccessat2                      sys_faccessat2
 440    common  process_madvise                 sys_process_madvise
+441    common  epoll_pwait2                    sys_epoll_pwait2
index aae729c..a522adf 100644 (file)
 438    common  pidfd_getfd                     sys_pidfd_getfd
 439    common  faccessat2                      sys_faccessat2
 440    common  process_madvise                 sys_process_madvise
+441    common  epoll_pwait2                    sys_epoll_pwait2
index 32817c9..ad9c3dd 100644 (file)
 438    n32     pidfd_getfd                     sys_pidfd_getfd
 439    n32     faccessat2                      sys_faccessat2
 440    n32     process_madvise                 sys_process_madvise
+441    n32     epoll_pwait2                    sys_epoll_pwait2
index 9e4ea3c..9164969 100644 (file)
 438    n64     pidfd_getfd                     sys_pidfd_getfd
 439    n64     faccessat2                      sys_faccessat2
 440    n64     process_madvise                 sys_process_madvise
+441    n64     epoll_pwait2                    sys_epoll_pwait2
index 29f5f28..4bad0c4 100644 (file)
 438    o32     pidfd_getfd                     sys_pidfd_getfd
 439    o32     faccessat2                      sys_faccessat2
 440    o32     process_madvise                 sys_process_madvise
+441    o32     epoll_pwait2                    sys_epoll_pwait2                compat_sys_epoll_pwait2
index f375ea5..6bcc319 100644 (file)
 438    common  pidfd_getfd                     sys_pidfd_getfd
 439    common  faccessat2                      sys_faccessat2
 440    common  process_madvise                 sys_process_madvise
+441    common  epoll_pwait2                    sys_epoll_pwait2                compat_sys_epoll_pwait2
index 1275dae..f744eb5 100644 (file)
 438    common  pidfd_getfd                     sys_pidfd_getfd
 439    common  faccessat2                      sys_faccessat2
 440    common  process_madvise                 sys_process_madvise
+441    common  epoll_pwait2                    sys_epoll_pwait2                compat_sys_epoll_pwait2
index 28c1680..14f6525 100644 (file)
 438  common    pidfd_getfd             sys_pidfd_getfd                 sys_pidfd_getfd
 439  common    faccessat2              sys_faccessat2                  sys_faccessat2
 440  common    process_madvise         sys_process_madvise             sys_process_madvise
+441  common    epoll_pwait2            sys_epoll_pwait2                sys_epoll_pwait2
index 7837384..9df40ac 100644 (file)
 438    common  pidfd_getfd                     sys_pidfd_getfd
 439    common  faccessat2                      sys_faccessat2
 440    common  process_madvise                 sys_process_madvise
+441    common  epoll_pwait2                    sys_epoll_pwait2
index 7816026..c7da4c3 100644 (file)
 438    common  pidfd_getfd                     sys_pidfd_getfd
 439    common  faccessat2                      sys_faccessat2
 440    common  process_madvise                 sys_process_madvise
+441    common  epoll_pwait2                    sys_epoll_pwait2
index 0d0667a..874aeac 100644 (file)
 438    i386    pidfd_getfd             sys_pidfd_getfd
 439    i386    faccessat2              sys_faccessat2
 440    i386    process_madvise         sys_process_madvise
+441    i386    epoll_pwait2            sys_epoll_pwait2                compat_sys_epoll_pwait2
index 3798192..7867212 100644 (file)
 438    common  pidfd_getfd             sys_pidfd_getfd
 439    common  faccessat2              sys_faccessat2
 440    common  process_madvise         sys_process_madvise
+441    common  epoll_pwait2            sys_epoll_pwait2
 
 #
 # Due to a historical design error, certain syscalls are numbered differently
index b070f27..46116a2 100644 (file)
 438    common  pidfd_getfd                     sys_pidfd_getfd
 439    common  faccessat2                      sys_faccessat2
 440    common  process_madvise                 sys_process_madvise
+441    common  epoll_pwait2                    sys_epoll_pwait2
index 400c094..6e65be7 100644 (file)
@@ -537,6 +537,12 @@ asmlinkage long compat_sys_epoll_pwait(int epfd,
                        int maxevents, int timeout,
                        const compat_sigset_t __user *sigmask,
                        compat_size_t sigsetsize);
+asmlinkage long compat_sys_epoll_pwait2(int epfd,
+                       struct epoll_event __user *events,
+                       int maxevents,
+                       const struct __kernel_timespec __user *timeout,
+                       const compat_sigset_t __user *sigmask,
+                       compat_size_t sigsetsize);
 
 /* fs/fcntl.c */
 asmlinkage long compat_sys_fcntl(unsigned int fd, unsigned int cmd,
index df0c3c7..f3929af 100644 (file)
@@ -362,6 +362,11 @@ asmlinkage long sys_epoll_pwait(int epfd, struct epoll_event __user *events,
                                int maxevents, int timeout,
                                const sigset_t __user *sigmask,
                                size_t sigsetsize);
+asmlinkage long sys_epoll_pwait2(int epfd, struct epoll_event __user *events,
+                                int maxevents,
+                                const struct __kernel_timespec __user *timeout,
+                                const sigset_t __user *sigmask,
+                                size_t sigsetsize);
 
 /* fs/fcntl.c */
 asmlinkage long sys_dup(unsigned int fildes);
index fc48c64..7287529 100644 (file)
@@ -859,9 +859,11 @@ __SYSCALL(__NR_pidfd_getfd, sys_pidfd_getfd)
 __SYSCALL(__NR_faccessat2, sys_faccessat2)
 #define __NR_process_madvise 440
 __SYSCALL(__NR_process_madvise, sys_process_madvise)
+#define __NR_epoll_pwait2 441
+__SC_COMP(__NR_epoll_pwait2, sys_epoll_pwait2, compat_sys_epoll_pwait2)
 
 #undef __NR_syscalls
-#define __NR_syscalls 441
+#define __NR_syscalls 442
 
 /*
  * 32 bit systems traditionally used different
index f27ac94..19aa806 100644 (file)
@@ -68,6 +68,8 @@ COND_SYSCALL(epoll_create1);
 COND_SYSCALL(epoll_ctl);
 COND_SYSCALL(epoll_pwait);
 COND_SYSCALL_COMPAT(epoll_pwait);
+COND_SYSCALL(epoll_pwait2);
+COND_SYSCALL_COMPAT(epoll_pwait2);
 
 /* fs/fcntl.c */