diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-11-23 08:47:23 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-11-23 08:47:23 +0100 |
commit | 5a4549f7ebf22787b2a76908ba90598e453d4a15 (patch) | |
tree | ae3fc6cb130c4944f1b7bf7790e036fba779e606 /0002-arch-wire-up-the-readfile-syscall.patch | |
parent | 42e4dab3dbfbf82344ceacacdc039d79feca67a5 (diff) | |
download | patches-5a4549f7ebf22787b2a76908ba90598e453d4a15.tar.gz |
readfile patches updated
Diffstat (limited to '0002-arch-wire-up-the-readfile-syscall.patch')
-rw-r--r-- | 0002-arch-wire-up-the-readfile-syscall.patch | 215 |
1 files changed, 122 insertions, 93 deletions
diff --git a/0002-arch-wire-up-the-readfile-syscall.patch b/0002-arch-wire-up-the-readfile-syscall.patch index 35f10475143f89..d1b4a3b933d9b2 100644 --- a/0002-arch-wire-up-the-readfile-syscall.patch +++ b/0002-arch-wire-up-the-readfile-syscall.patch @@ -1,4 +1,4 @@ -From 4135ebc2076a72c3ad10d0102e8ebc82140abf8d Mon Sep 17 00:00:00 2001 +From 39b066fa7c6b33fffe445e2201f19a6740b4fbc2 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Date: Sun, 24 May 2020 12:36:21 +0200 Subject: [PATCH 2/4] arch: wire up the readfile syscall @@ -7,168 +7,192 @@ This wires up the readfile syscall for all architectures Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> --- - arch/alpha/kernel/syscalls/syscall.tbl | 1 + - arch/arm/tools/syscall.tbl | 1 + - arch/arm64/include/asm/unistd.h | 2 +- - arch/arm64/include/asm/unistd32.h | 2 ++ - arch/ia64/kernel/syscalls/syscall.tbl | 1 + - arch/m68k/kernel/syscalls/syscall.tbl | 1 + - arch/microblaze/kernel/syscalls/syscall.tbl | 1 + - arch/mips/kernel/syscalls/syscall_n32.tbl | 1 + - arch/mips/kernel/syscalls/syscall_n64.tbl | 1 + - arch/mips/kernel/syscalls/syscall_o32.tbl | 1 + - arch/parisc/kernel/syscalls/syscall.tbl | 1 + - arch/powerpc/kernel/syscalls/syscall.tbl | 1 + - arch/s390/kernel/syscalls/syscall.tbl | 1 + - arch/sh/kernel/syscalls/syscall.tbl | 1 + - arch/sparc/kernel/syscalls/syscall.tbl | 1 + - arch/x86/entry/syscalls/syscall_32.tbl | 1 + - arch/x86/entry/syscalls/syscall_64.tbl | 1 + - arch/xtensa/kernel/syscalls/syscall.tbl | 1 + - include/linux/syscalls.h | 2 ++ - include/uapi/asm-generic/unistd.h | 4 +++- - 20 files changed, 24 insertions(+), 2 deletions(-) + arch/alpha/kernel/syscalls/syscall.tbl | 1 + + arch/arm/tools/syscall.tbl | 1 + + arch/arm64/include/asm/unistd32.h | 2 ++ + arch/ia64/kernel/syscalls/syscall.tbl | 1 + + arch/m68k/kernel/syscalls/syscall.tbl | 1 + + arch/microblaze/kernel/syscalls/syscall.tbl | 1 + + arch/mips/kernel/syscalls/syscall_n32.tbl | 1 + + arch/mips/kernel/syscalls/syscall_n64.tbl | 1 + + arch/mips/kernel/syscalls/syscall_o32.tbl | 1 + + arch/parisc/kernel/syscalls/syscall.tbl | 1 + + arch/powerpc/kernel/syscalls/syscall.tbl | 1 + + arch/s390/kernel/syscalls/syscall.tbl | 1 + + arch/sh/kernel/syscalls/syscall.tbl | 1 + + arch/sparc/kernel/syscalls/syscall.tbl | 1 + + arch/x86/entry/syscalls/syscall_32.tbl | 1 + + arch/x86/entry/syscalls/syscall_64.tbl | 1 + + arch/xtensa/kernel/syscalls/syscall.tbl | 1 + + include/linux/syscalls.h | 2 ++ + include/uapi/asm-generic/unistd.h | 4 +++- + 19 files changed, 23 insertions(+), 1 deletion(-) +diff --git a/arch/alpha/kernel/syscalls/syscall.tbl b/arch/alpha/kernel/syscalls/syscall.tbl +index ee7b01bb7346..9665012486e7 100644 --- a/arch/alpha/kernel/syscalls/syscall.tbl +++ b/arch/alpha/kernel/syscalls/syscall.tbl -@@ -479,3 +479,4 @@ - 547 common openat2 sys_openat2 +@@ -480,3 +480,4 @@ 548 common pidfd_getfd sys_pidfd_getfd 549 common faccessat2 sys_faccessat2 -+550 common readfile sys_readfile + 550 common process_madvise sys_process_madvise ++551 common readfile sys_readfile +diff --git a/arch/arm/tools/syscall.tbl b/arch/arm/tools/syscall.tbl +index d056a548358e..88acc17373bb 100644 --- a/arch/arm/tools/syscall.tbl +++ b/arch/arm/tools/syscall.tbl -@@ -453,3 +453,4 @@ - 437 common openat2 sys_openat2 +@@ -454,3 +454,4 @@ 438 common pidfd_getfd sys_pidfd_getfd 439 common faccessat2 sys_faccessat2 -+440 common readfile sys_readfile ---- a/arch/arm64/include/asm/unistd.h -+++ b/arch/arm64/include/asm/unistd.h -@@ -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 440 -+#define __NR_compat_syscalls 441 - #endif - - #define __ARCH_WANT_SYS_CLONE + 440 common process_madvise sys_process_madvise ++441 common readfile sys_readfile +diff --git a/arch/arm64/include/asm/unistd32.h b/arch/arm64/include/asm/unistd32.h +index 107f08e03b9f..b92b3e3fac18 100644 --- a/arch/arm64/include/asm/unistd32.h +++ b/arch/arm64/include/asm/unistd32.h -@@ -887,6 +887,8 @@ __SYSCALL(__NR_openat2, sys_openat2) - __SYSCALL(__NR_pidfd_getfd, sys_pidfd_getfd) - #define __NR_faccessat2 439 +@@ -889,6 +889,8 @@ __SYSCALL(__NR_pidfd_getfd, sys_pidfd_getfd) __SYSCALL(__NR_faccessat2, sys_faccessat2) -+#define __NR_readfile 440 + #define __NR_process_madvise 440 + __SYSCALL(__NR_process_madvise, sys_process_madvise) ++#define __NR_readfile 441 +__SYSCALL(__NR_readfile, sys_readfile) /* * Please add new compat syscalls above this comment and update +diff --git a/arch/ia64/kernel/syscalls/syscall.tbl b/arch/ia64/kernel/syscalls/syscall.tbl +index b96ed8b8a508..ad5e62125858 100644 --- a/arch/ia64/kernel/syscalls/syscall.tbl +++ b/arch/ia64/kernel/syscalls/syscall.tbl -@@ -360,3 +360,4 @@ - 437 common openat2 sys_openat2 +@@ -361,3 +361,4 @@ 438 common pidfd_getfd sys_pidfd_getfd 439 common faccessat2 sys_faccessat2 -+440 common readfile sys_readfile + 440 common process_madvise sys_process_madvise ++441 common readfile sys_readfile +diff --git a/arch/m68k/kernel/syscalls/syscall.tbl b/arch/m68k/kernel/syscalls/syscall.tbl +index 625fb6d32842..fbe539d66af9 100644 --- a/arch/m68k/kernel/syscalls/syscall.tbl +++ b/arch/m68k/kernel/syscalls/syscall.tbl -@@ -439,3 +439,4 @@ - 437 common openat2 sys_openat2 +@@ -440,3 +440,4 @@ 438 common pidfd_getfd sys_pidfd_getfd 439 common faccessat2 sys_faccessat2 -+440 common readfile sys_readfile + 440 common process_madvise sys_process_madvise ++441 common readfile sys_readfile +diff --git a/arch/microblaze/kernel/syscalls/syscall.tbl b/arch/microblaze/kernel/syscalls/syscall.tbl +index aae729c95cf9..e0a7084f2128 100644 --- a/arch/microblaze/kernel/syscalls/syscall.tbl +++ b/arch/microblaze/kernel/syscalls/syscall.tbl -@@ -445,3 +445,4 @@ - 437 common openat2 sys_openat2 +@@ -446,3 +446,4 @@ 438 common pidfd_getfd sys_pidfd_getfd 439 common faccessat2 sys_faccessat2 -+440 common readfile sys_readfile + 440 common process_madvise sys_process_madvise ++441 common readfile sys_readfile +diff --git a/arch/mips/kernel/syscalls/syscall_n32.tbl b/arch/mips/kernel/syscalls/syscall_n32.tbl +index 32817c954435..9e3bbd44e277 100644 --- a/arch/mips/kernel/syscalls/syscall_n32.tbl +++ b/arch/mips/kernel/syscalls/syscall_n32.tbl -@@ -378,3 +378,4 @@ - 437 n32 openat2 sys_openat2 +@@ -379,3 +379,4 @@ 438 n32 pidfd_getfd sys_pidfd_getfd 439 n32 faccessat2 sys_faccessat2 -+440 n32 readfile sys_readfile + 440 n32 process_madvise sys_process_madvise ++441 n32 readfile sys_readfile +diff --git a/arch/mips/kernel/syscalls/syscall_n64.tbl b/arch/mips/kernel/syscalls/syscall_n64.tbl +index 9e4ea3c31b1c..efa890ff2d6d 100644 --- a/arch/mips/kernel/syscalls/syscall_n64.tbl +++ b/arch/mips/kernel/syscalls/syscall_n64.tbl -@@ -354,3 +354,4 @@ - 437 n64 openat2 sys_openat2 +@@ -355,3 +355,4 @@ 438 n64 pidfd_getfd sys_pidfd_getfd 439 n64 faccessat2 sys_faccessat2 -+440 n64 readfile sys_readfile + 440 n64 process_madvise sys_process_madvise ++441 n64 readfile sys_readfile +diff --git a/arch/mips/kernel/syscalls/syscall_o32.tbl b/arch/mips/kernel/syscalls/syscall_o32.tbl +index 29f5f28cf5ce..68b48d230657 100644 --- a/arch/mips/kernel/syscalls/syscall_o32.tbl +++ b/arch/mips/kernel/syscalls/syscall_o32.tbl -@@ -427,3 +427,4 @@ - 437 o32 openat2 sys_openat2 +@@ -428,3 +428,4 @@ 438 o32 pidfd_getfd sys_pidfd_getfd 439 o32 faccessat2 sys_faccessat2 -+440 o32 readfile sys_readfile + 440 o32 process_madvise sys_process_madvise ++441 o32 readfile sys_readfile +diff --git a/arch/parisc/kernel/syscalls/syscall.tbl b/arch/parisc/kernel/syscalls/syscall.tbl +index f375ea528e59..ea0b323b9af3 100644 --- a/arch/parisc/kernel/syscalls/syscall.tbl +++ b/arch/parisc/kernel/syscalls/syscall.tbl -@@ -437,3 +437,4 @@ - 437 common openat2 sys_openat2 +@@ -438,3 +438,4 @@ 438 common pidfd_getfd sys_pidfd_getfd 439 common faccessat2 sys_faccessat2 -+440 common readfile sys_readfile + 440 common process_madvise sys_process_madvise ++441 common readfile sys_readfile +diff --git a/arch/powerpc/kernel/syscalls/syscall.tbl b/arch/powerpc/kernel/syscalls/syscall.tbl +index 1275daec7fec..15ace3e8e99c 100644 --- a/arch/powerpc/kernel/syscalls/syscall.tbl +++ b/arch/powerpc/kernel/syscalls/syscall.tbl -@@ -529,3 +529,4 @@ - 437 common openat2 sys_openat2 +@@ -530,3 +530,4 @@ 438 common pidfd_getfd sys_pidfd_getfd 439 common faccessat2 sys_faccessat2 -+440 common readfile sys_readfile + 440 common process_madvise sys_process_madvise ++441 common readfile sys_readfile +diff --git a/arch/s390/kernel/syscalls/syscall.tbl b/arch/s390/kernel/syscalls/syscall.tbl +index 28c168000483..7e80ef92ef96 100644 --- a/arch/s390/kernel/syscalls/syscall.tbl +++ b/arch/s390/kernel/syscalls/syscall.tbl -@@ -442,3 +442,4 @@ - 437 common openat2 sys_openat2 sys_openat2 +@@ -443,3 +443,4 @@ 438 common pidfd_getfd sys_pidfd_getfd sys_pidfd_getfd 439 common faccessat2 sys_faccessat2 sys_faccessat2 -+440 common readfile sys_readfile sys_readfile + 440 common process_madvise sys_process_madvise sys_process_madvise ++441 common readfile sys_readfile sys_readfile +diff --git a/arch/sh/kernel/syscalls/syscall.tbl b/arch/sh/kernel/syscalls/syscall.tbl +index 783738448ff5..56a6b3030733 100644 --- a/arch/sh/kernel/syscalls/syscall.tbl +++ b/arch/sh/kernel/syscalls/syscall.tbl -@@ -442,3 +442,4 @@ - 437 common openat2 sys_openat2 +@@ -443,3 +443,4 @@ 438 common pidfd_getfd sys_pidfd_getfd 439 common faccessat2 sys_faccessat2 -+440 common readfile sys_readfile + 440 common process_madvise sys_process_madvise ++441 common readfile sys_readfile +diff --git a/arch/sparc/kernel/syscalls/syscall.tbl b/arch/sparc/kernel/syscalls/syscall.tbl +index 78160260991b..a14c1690fae5 100644 --- a/arch/sparc/kernel/syscalls/syscall.tbl +++ b/arch/sparc/kernel/syscalls/syscall.tbl -@@ -485,3 +485,4 @@ - 437 common openat2 sys_openat2 +@@ -486,3 +486,4 @@ 438 common pidfd_getfd sys_pidfd_getfd 439 common faccessat2 sys_faccessat2 -+440 common readfile sys_readfile + 440 common process_madvise sys_process_madvise ++441 common readfile sys_readfile +diff --git a/arch/x86/entry/syscalls/syscall_32.tbl b/arch/x86/entry/syscalls/syscall_32.tbl +index 0d0667a9fbd7..c50df8220baf 100644 --- a/arch/x86/entry/syscalls/syscall_32.tbl +++ b/arch/x86/entry/syscalls/syscall_32.tbl -@@ -444,3 +444,4 @@ - 437 i386 openat2 sys_openat2 +@@ -445,3 +445,4 @@ 438 i386 pidfd_getfd sys_pidfd_getfd 439 i386 faccessat2 sys_faccessat2 -+440 i386 readfile sys_readfile + 440 i386 process_madvise sys_process_madvise ++441 i386 readfile sys_readfile +diff --git a/arch/x86/entry/syscalls/syscall_64.tbl b/arch/x86/entry/syscalls/syscall_64.tbl +index 379819244b91..c2d57fca0bd8 100644 --- a/arch/x86/entry/syscalls/syscall_64.tbl +++ b/arch/x86/entry/syscalls/syscall_64.tbl -@@ -361,6 +361,7 @@ - 437 common openat2 sys_openat2 +@@ -362,6 +362,7 @@ 438 common pidfd_getfd sys_pidfd_getfd 439 common faccessat2 sys_faccessat2 -+440 common readfile sys_readfile + 440 common process_madvise sys_process_madvise ++441 common readfile sys_readfile # - # x32-specific system call numbers start at 512 to avoid cache impact + # Due to a historical design error, certain syscalls are numbered differently +diff --git a/arch/xtensa/kernel/syscalls/syscall.tbl b/arch/xtensa/kernel/syscalls/syscall.tbl +index b070f272995d..db4a5e18ecc8 100644 --- a/arch/xtensa/kernel/syscalls/syscall.tbl +++ b/arch/xtensa/kernel/syscalls/syscall.tbl -@@ -410,3 +410,4 @@ - 437 common openat2 sys_openat2 +@@ -411,3 +411,4 @@ 438 common pidfd_getfd sys_pidfd_getfd 439 common faccessat2 sys_faccessat2 -+440 common readfile sys_readfile + 440 common process_madvise sys_process_madvise ++441 common readfile sys_readfile +diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h +index 37bea07c12f2..653d3a3ad1c4 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h -@@ -1006,6 +1006,8 @@ asmlinkage long sys_pidfd_send_signal(in +@@ -1008,6 +1008,8 @@ asmlinkage long sys_pidfd_send_signal(int pidfd, int sig, siginfo_t __user *info, unsigned int flags); asmlinkage long sys_pidfd_getfd(int pidfd, int fd, unsigned int flags); @@ -177,18 +201,23 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> /* * Architecture-specific system calls +diff --git a/include/uapi/asm-generic/unistd.h b/include/uapi/asm-generic/unistd.h +index 2056318988f7..7a0bee36e0a7 100644 --- a/include/uapi/asm-generic/unistd.h +++ b/include/uapi/asm-generic/unistd.h -@@ -859,9 +859,11 @@ __SYSCALL(__NR_openat2, sys_openat2) - __SYSCALL(__NR_pidfd_getfd, sys_pidfd_getfd) - #define __NR_faccessat2 439 +@@ -859,9 +859,11 @@ __SYSCALL(__NR_pidfd_getfd, sys_pidfd_getfd) __SYSCALL(__NR_faccessat2, sys_faccessat2) -+#define __NR_readfile 440 + #define __NR_process_madvise 440 + __SYSCALL(__NR_process_madvise, sys_process_madvise) ++#define __NR_readfile 441 +__SYSCALL(__NR_readfile, sys_readfile) #undef __NR_syscalls --#define __NR_syscalls 440 -+#define __NR_syscalls 441 +-#define __NR_syscalls 441 ++#define __NR_syscalls 442 /* * 32 bit systems traditionally used different +-- +2.29.2 + |