]> git.baikalelectronics.ru Git - kernel.git/commitdiff
all arch: remove system call sys_sysctl
authorXiaoming Ni <nixiaoming@huawei.com>
Sat, 15 Aug 2020 00:31:07 +0000 (17:31 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 15 Aug 2020 02:56:56 +0000 (19:56 -0700)
Since commit 00ba1b406a7220 ("sysctl: Remove the sysctl system call"),
sys_sysctl is actually unavailable: any input can only return an error.

We have been warning about people using the sysctl system call for years
and believe there are no more users.  Even if there are users of this
interface if they have not complained or fixed their code by now they
probably are not going to, so there is no point in warning them any
longer.

So completely remove sys_sysctl on all architectures.

[nixiaoming@huawei.com: s390: fix build error for sys_call_table_emu]
Link: http://lkml.kernel.org/r/20200618141426.16884-1-nixiaoming@huawei.com
Signed-off-by: Xiaoming Ni <nixiaoming@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Will Deacon <will@kernel.org> [arm/arm64]
Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Aleksa Sarai <cyphar@cyphar.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Bin Meng <bin.meng@windriver.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: chenzefeng <chenzefeng2@huawei.com>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Christian Brauner <christian@brauner.io>
Cc: Chris Zankel <chris@zankel.net>
Cc: David Howells <dhowells@redhat.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Diego Elio Pettenò <flameeyes@flameeyes.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Helge Deller <deller@gmx.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Iurii Zaikin <yzaikin@google.com>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Kars de Jong <jongk@linux-m68k.org>
Cc: Kees Cook <keescook@chromium.org>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Luis Chamberlain <mcgrof@kernel.org>
Cc: Marco Elver <elver@google.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Martin K. Petersen <martin.petersen@oracle.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Miklos Szeredi <mszeredi@redhat.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Cc: Nick Piggin <npiggin@gmail.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Olof Johansson <olof@lixom.net>
Cc: Paul Burton <paulburton@kernel.org>
Cc: "Paul E. McKenney" <paulmck@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Rich Felker <dalias@libc.org>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Sami Tolvanen <samitolvanen@google.com>
Cc: Sargun Dhillon <sargun@sargun.me>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Sudeep Holla <sudeep.holla@arm.com>
Cc: Sven Schnelle <svens@stackframe.org>
Cc: Thiago Jung Bauermann <bauerman@linux.ibm.com>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Zhou Yanjie <zhouyanjie@wanyeetech.com>
Link: http://lkml.kernel.org/r/20200616030734.87257-1-nixiaoming@huawei.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
52 files changed:
arch/alpha/kernel/syscalls/syscall.tbl
arch/arm/configs/am200epdkit_defconfig
arch/arm/tools/syscall.tbl
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/configs/cu1000-neo_defconfig
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/configs/dreamcast_defconfig
arch/sh/configs/espt_defconfig
arch/sh/configs/hp6xx_defconfig
arch/sh/configs/landisk_defconfig
arch/sh/configs/lboxre2_defconfig
arch/sh/configs/microdev_defconfig
arch/sh/configs/migor_defconfig
arch/sh/configs/r7780mp_defconfig
arch/sh/configs/r7785rp_defconfig
arch/sh/configs/rts7751r2d1_defconfig
arch/sh/configs/rts7751r2dplus_defconfig
arch/sh/configs/se7206_defconfig
arch/sh/configs/se7343_defconfig
arch/sh/configs/se7619_defconfig
arch/sh/configs/se7705_defconfig
arch/sh/configs/se7750_defconfig
arch/sh/configs/se7751_defconfig
arch/sh/configs/secureedge5410_defconfig
arch/sh/configs/sh03_defconfig
arch/sh/configs/sh7710voipgw_defconfig
arch/sh/configs/sh7757lcr_defconfig
arch/sh/configs/sh7763rdp_defconfig
arch/sh/configs/shmin_defconfig
arch/sh/configs/titan_defconfig
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/linux/sysctl.h
kernel/Makefile
kernel/sys_ni.c
kernel/sysctl_binary.c [deleted file]
tools/perf/arch/powerpc/entry/syscalls/syscall.tbl
tools/perf/arch/s390/entry/syscalls/syscall.tbl
tools/perf/arch/x86/entry/syscalls/syscall_64.tbl

index a28fb211881df04646e188c255577ee4a44731ca..ec8bed9e7b75b6a9b22fd75a36d614c2712982cc 100644 (file)
 316    common  mlockall                        sys_mlockall
 317    common  munlockall                      sys_munlockall
 318    common  sysinfo                         sys_sysinfo
-319    common  _sysctl                         sys_sysctl
+319    common  _sysctl                         sys_ni_syscall
 # 320 was sys_idle
 321    common  oldumount                       sys_oldumount
 322    common  swapon                          sys_swapon
index f56ac394caf10b4d6218ea24ae895d9b1795be10..4e49d6cb2f62465142a9562f282d049a8db6c17b 100644 (file)
@@ -3,7 +3,6 @@ CONFIG_LOCALVERSION="gum"
 CONFIG_SYSVIPC=y
 CONFIG_SYSFS_DEPRECATED_V2=y
 CONFIG_EXPERT=y
-# CONFIG_SYSCTL_SYSCALL is not set
 # CONFIG_EPOLL is not set
 # CONFIG_SHMEM is not set
 # CONFIG_VM_EVENT_COUNTERS is not set
index 7e8ee4adf2696d5ccc6786557feefe80c6c7b5ae..171077cbf419b419ab7d906a23c7ed120a129ccb 100644 (file)
 146    common  writev                  sys_writev
 147    common  getsid                  sys_getsid
 148    common  fdatasync               sys_fdatasync
-149    common  _sysctl                 sys_sysctl
+149    common  _sysctl                 sys_ni_syscall
 150    common  mlock                   sys_mlock
 151    common  munlock                 sys_munlock
 152    common  mlockall                sys_mlockall
index 17e81bd9a2d3d4736292d149b6b6d3f6c37209a8..734860ac7cf9d51bc5cba74c2f51209e72a2ca83 100644 (file)
@@ -308,8 +308,8 @@ __SYSCALL(__NR_writev, compat_sys_writev)
 __SYSCALL(__NR_getsid, sys_getsid)
 #define __NR_fdatasync 148
 __SYSCALL(__NR_fdatasync, sys_fdatasync)
-#define __NR__sysctl 149
-__SYSCALL(__NR__sysctl, compat_sys_sysctl)
+                       /* 149 was sys_sysctl */
+__SYSCALL(149, sys_ni_syscall)
 #define __NR_mlock 150
 __SYSCALL(__NR_mlock, sys_mlock)
 #define __NR_munlock 151
index ced9c83e47c979bc15fea801db2f338e3e9b3117..f52a41f4c340b866dc1ba5d11bc5ee9a4fea3f52 100644 (file)
 123    common  writev                          sys_writev
 124    common  pread64                         sys_pread64
 125    common  pwrite64                        sys_pwrite64
-126    common  _sysctl                         sys_sysctl
+126    common  _sysctl                         sys_ni_syscall
 127    common  mmap                            sys_mmap
 128    common  munmap                          sys_munmap
 129    common  mlock                           sys_mlock
index 1a4822de72920ffd2ffc573aac479064e3dd26b6..81fc799d839234f00c0b13e56959f5f165827a97 100644 (file)
 146    common  writev                          sys_writev
 147    common  getsid                          sys_getsid
 148    common  fdatasync                       sys_fdatasync
-149    common  _sysctl                         sys_sysctl
+149    common  _sysctl                         sys_ni_syscall
 150    common  mlock                           sys_mlock
 151    common  munlock                         sys_munlock
 152    common  mlockall                        sys_mlockall
index a3f4be8e72385d6fc6a90bd92f969442b0170165..b4e263916f4132a9a710f4f6fc4f604f675d9e3a 100644 (file)
 146    common  writev                          sys_writev
 147    common  getsid                          sys_getsid
 148    common  fdatasync                       sys_fdatasync
-149    common  _sysctl                         sys_sysctl
+149    common  _sysctl                         sys_ni_syscall
 150    common  mlock                           sys_mlock
 151    common  munlock                         sys_munlock
 152    common  mlockall                        sys_mlockall
index 6b471cdb16cfba3c4bba7d654fb7b00869467ca2..e924c817f73d07786a7d37269a08eeeb36102c42 100644 (file)
@@ -17,7 +17,6 @@ CONFIG_CGROUP_CPUACCT=y
 CONFIG_NAMESPACES=y
 CONFIG_USER_NS=y
 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
-CONFIG_SYSCTL_SYSCALL=y
 CONFIG_KALLSYMS_ALL=y
 CONFIG_EMBEDDED=y
 # CONFIG_VM_EVENT_COUNTERS is not set
index 6b4ee92e3aeddcb5ba797349a25b7c38e6adfb21..f9df9edb67a4077eea652097a5b3a50f6fa546ec 100644 (file)
 149    n32     munlockall                      sys_munlockall
 150    n32     vhangup                         sys_vhangup
 151    n32     pivot_root                      sys_pivot_root
-152    n32     _sysctl                         compat_sys_sysctl
+152    n32     _sysctl                         sys_ni_syscall
 153    n32     prctl                           sys_prctl
 154    n32     adjtimex                        sys_adjtimex_time32
 155    n32     setrlimit                       compat_sys_setrlimit
index 391acbf425a0fe2de3bcdbf8ce4953ff9fe7c4c7..557f9954a2b9a8fd66179f572d0fcffb63638bcd 100644 (file)
 149    n64     munlockall                      sys_munlockall
 150    n64     vhangup                         sys_vhangup
 151    n64     pivot_root                      sys_pivot_root
-152    n64     _sysctl                         sys_sysctl
+152    n64     _sysctl                         sys_ni_syscall
 153    n64     prctl                           sys_prctl
 154    n64     adjtimex                        sys_adjtimex
 155    n64     setrlimit                       sys_setrlimit
index 5727c51875082ccc86d7aa6b6caba91f1c2fbbd4..195b43cf27c84812e16b3214c9a9ea41de2d913a 100644 (file)
 150    o32     unused150                       sys_ni_syscall
 151    o32     getsid                          sys_getsid
 152    o32     fdatasync                       sys_fdatasync
-153    o32     _sysctl                         sys_sysctl                      compat_sys_sysctl
+153    o32     _sysctl                         sys_ni_syscall
 154    o32     mlock                           sys_mlock
 155    o32     munlock                         sys_munlock
 156    o32     mlockall                        sys_mlockall
index 292baabefade11541ff9c40cbc4b3f22b63541ee..def64d221cd4fb2e22fa541aa130198cc7a3fa9b 100644 (file)
 146    common  writev                  sys_writev                      compat_sys_writev
 147    common  getsid                  sys_getsid
 148    common  fdatasync               sys_fdatasync
-149    common  _sysctl                 sys_sysctl                      compat_sys_sysctl
+149    common  _sysctl                 sys_ni_syscall
 150    common  mlock                   sys_mlock
 151    common  munlock                 sys_munlock
 152    common  mlockall                sys_mlockall
index be9f7454606806a95947cc6a598bbbc9fb7cdbfc..c2d737ff2e7bec276dfa2b68cf766de454c648c6 100644 (file)
 146    common  writev                          sys_writev                      compat_sys_writev
 147    common  getsid                          sys_getsid
 148    common  fdatasync                       sys_fdatasync
-149    nospu   _sysctl                         sys_sysctl                      compat_sys_sysctl
+149    nospu   _sysctl                         sys_ni_syscall
 150    common  mlock                           sys_mlock
 151    common  munlock                         sys_munlock
 152    common  mlockall                        sys_mlockall
index f1fda4375526303da6303c6ee54378ab482810a1..10456bc936fb09d87afee4fae97fc75ac2ea0b06 100644 (file)
 146  common    writev                  sys_writev                      compat_sys_writev
 147  common    getsid                  sys_getsid                      sys_getsid
 148  common    fdatasync               sys_fdatasync                   sys_fdatasync
-149  common    _sysctl                 sys_sysctl                      compat_sys_sysctl
+149  common    _sysctl                 -                               -
 150  common    mlock                   sys_mlock                       sys_mlock
 151  common    munlock                 sys_munlock                     sys_munlock
 152  common    mlockall                sys_mlockall                    sys_mlockall
index ae067e0b15e3eb7b9cd3a538579926f4e506da08..6a82c7b8ff32b88cdfbe3d003fd53625b0c8a4a5 100644 (file)
@@ -1,7 +1,6 @@
 CONFIG_SYSVIPC=y
 CONFIG_BSD_PROCESS_ACCT=y
 CONFIG_LOG_BUF_SHIFT=14
-# CONFIG_SYSCTL_SYSCALL is not set
 CONFIG_SLAB=y
 CONFIG_PROFILING=y
 CONFIG_MODULES=y
index a5b865a75d223018f9b98adb4c8bdd003cad9316..9a988c347e9d4e987336f15beb94f5417623a8dc 100644 (file)
@@ -5,7 +5,6 @@ CONFIG_LOG_BUF_SHIFT=14
 CONFIG_NAMESPACES=y
 CONFIG_UTS_NS=y
 CONFIG_IPC_NS=y
-# CONFIG_SYSCTL_SYSCALL is not set
 CONFIG_SLAB=y
 CONFIG_PROFILING=y
 CONFIG_OPROFILE=y
index a92db6694ce237f156312e0a506f130d60d53008..70e6605d7f7ef77b7c86b22d3331845be971aa9d 100644 (file)
@@ -3,7 +3,6 @@ CONFIG_IKCONFIG=y
 CONFIG_IKCONFIG_PROC=y
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
-# CONFIG_SYSCTL_SYSCALL is not set
 CONFIG_SLAB=y
 # CONFIG_BLK_DEV_BSG is not set
 CONFIG_CPU_SUBTYPE_SH7709=y
index 567af752b1bb84d36772e2ceb408623deb90ce16..ba6ec042606f5d3201fcc935401da2490a5fa41d 100644 (file)
@@ -1,6 +1,5 @@
 CONFIG_SYSVIPC=y
 CONFIG_LOG_BUF_SHIFT=14
-# CONFIG_SYSCTL_SYSCALL is not set
 CONFIG_KALLSYMS_EXTRA_PASS=y
 CONFIG_SLAB=y
 CONFIG_MODULES=y
index 10f6d371ce2cd643b4f49de9f13f7acb4d5a0ec7..05e4ac6fed5f9c78b951ef67c5e3527d824d645e 100644 (file)
@@ -1,6 +1,5 @@
 CONFIG_SYSVIPC=y
 CONFIG_LOG_BUF_SHIFT=14
-# CONFIG_SYSCTL_SYSCALL is not set
 CONFIG_KALLSYMS_EXTRA_PASS=y
 CONFIG_SLAB=y
 CONFIG_MODULES=y
index ed84d1303acf6ca760948443f16206dfaaa59342..c65667d00313bad3aab8e94bee1a8debda626338 100644 (file)
@@ -2,7 +2,6 @@ CONFIG_BSD_PROCESS_ACCT=y
 CONFIG_LOG_BUF_SHIFT=14
 CONFIG_BLK_DEV_INITRD=y
 # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
-# CONFIG_SYSCTL_SYSCALL is not set
 CONFIG_SLAB=y
 # CONFIG_BLK_DEV_BSG is not set
 CONFIG_CPU_SUBTYPE_SH4_202=y
index 37e9521a99e5b63ad35d23a9f5d63c388fbc68be..a24cf8cd2cea5694752df6b18dc99c9e31502444 100644 (file)
@@ -4,7 +4,6 @@ CONFIG_IKCONFIG_PROC=y
 CONFIG_LOG_BUF_SHIFT=14
 CONFIG_BLK_DEV_INITRD=y
 # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
-# CONFIG_SYSCTL_SYSCALL is not set
 CONFIG_SLAB=y
 CONFIG_PROFILING=y
 CONFIG_OPROFILE=y
index c97ec60cff27d833a2b2fc7aeaabd00c3b5cdc52..e922659fdadba9adf2b5edb49446af3ec89dd747 100644 (file)
@@ -3,7 +3,6 @@ CONFIG_BSD_PROCESS_ACCT=y
 CONFIG_IKCONFIG=y
 CONFIG_IKCONFIG_PROC=y
 CONFIG_LOG_BUF_SHIFT=14
-# CONFIG_SYSCTL_SYSCALL is not set
 # CONFIG_FUTEX is not set
 # CONFIG_EPOLL is not set
 CONFIG_SLAB=y
index 55fce65eb45426f22985755c141ae6f0d79eea0e..5978866358ec89f10818a91281b42a76eba4c1cb 100644 (file)
@@ -7,7 +7,6 @@ CONFIG_RCU_TRACE=y
 CONFIG_IKCONFIG=y
 CONFIG_IKCONFIG_PROC=y
 CONFIG_LOG_BUF_SHIFT=14
-# CONFIG_SYSCTL_SYSCALL is not set
 CONFIG_SLAB=y
 CONFIG_PROFILING=y
 CONFIG_OPROFILE=y
index 6a3cfe08295f9cc4d4bae41edb32335af6c27948..fc9c22152b086dad40f366c20956364df786955b 100644 (file)
@@ -1,7 +1,6 @@
 CONFIG_SYSVIPC=y
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
-# CONFIG_SYSCTL_SYSCALL is not set
 CONFIG_SLAB=y
 CONFIG_PROFILING=y
 CONFIG_OPROFILE=y
index 2b3d7d2806726bba3d4212df8d3075d13eb3c2ed..ff3fd6787fd61c21262c6275ae58fa2195842582 100644 (file)
@@ -1,7 +1,6 @@
 CONFIG_SYSVIPC=y
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
-# CONFIG_SYSCTL_SYSCALL is not set
 CONFIG_SLAB=y
 CONFIG_PROFILING=y
 CONFIG_OPROFILE=y
index 21a43f14ffacb27ea876ad158be7a11168eb42d2..ff5bb448992265466d5bc20d0682a6b4f1568863 100644 (file)
@@ -18,7 +18,6 @@ CONFIG_USER_NS=y
 CONFIG_PID_NS=y
 CONFIG_BLK_DEV_INITRD=y
 # CONFIG_UID16 is not set
-# CONFIG_SYSCTL_SYSCALL is not set
 CONFIG_KALLSYMS_ALL=y
 # CONFIG_ELF_CORE is not set
 # CONFIG_COMPAT_BRK is not set
index 4e794e719a28e226f443c4ad6aa4aa8acf28efb1..5d6c19338ebf2992f4c3405e42731a8a0d9153db 100644 (file)
@@ -2,7 +2,6 @@
 CONFIG_SYSVIPC=y
 CONFIG_POSIX_MQUEUE=y
 CONFIG_LOG_BUF_SHIFT=14
-# CONFIG_SYSCTL_SYSCALL is not set
 # CONFIG_FUTEX is not set
 # CONFIG_EPOLL is not set
 # CONFIG_SHMEM is not set
index 3264415a59314c3b8ad0578d755498499e0565d8..71a672c307168ecfb64346d514251f16dcd3259f 100644 (file)
@@ -1,7 +1,6 @@
 # CONFIG_LOCALVERSION_AUTO is not set
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_UID16 is not set
-# CONFIG_SYSCTL_SYSCALL is not set
 # CONFIG_KALLSYMS is not set
 # CONFIG_HOTPLUG is not set
 # CONFIG_ELF_CORE is not set
index 4496b94b7d8896090aba19b34e03c23e403ecd8a..ed00a6eeadf55e31f258bd3f6d0faf09743bf3b9 100644 (file)
@@ -2,7 +2,6 @@
 CONFIG_LOG_BUF_SHIFT=14
 CONFIG_BLK_DEV_INITRD=y
 # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
-# CONFIG_SYSCTL_SYSCALL is not set
 # CONFIG_KALLSYMS is not set
 # CONFIG_HOTPLUG is not set
 CONFIG_SLAB=y
index b23f67542728cc3120be2b6a7de85f79eb518138..3f1c13799d799c2a0241dc0c9f0c55c1a6948de5 100644 (file)
@@ -5,7 +5,6 @@ CONFIG_IKCONFIG=y
 CONFIG_IKCONFIG_PROC=y
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
-# CONFIG_SYSCTL_SYSCALL is not set
 # CONFIG_HOTPLUG is not set
 CONFIG_SLAB=y
 CONFIG_MODULES=y
index 16234368393752d98630bb36049c58e313bbb4ab..4a024065bb7501affe151890ca07afcbace49deb 100644 (file)
@@ -3,7 +3,6 @@ CONFIG_BSD_PROCESS_ACCT=y
 CONFIG_LOG_BUF_SHIFT=14
 CONFIG_BLK_DEV_INITRD=y
 # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
-# CONFIG_SYSCTL_SYSCALL is not set
 # CONFIG_HOTPLUG is not set
 CONFIG_SLAB=y
 CONFIG_MODULES=y
index 360592d63a2f5dcd21d2685e3deb09b125917184..8422599cfb04dc1144dffa5869fd6c6e7789228e 100644 (file)
@@ -1,7 +1,6 @@
 # CONFIG_SWAP is not set
 CONFIG_LOG_BUF_SHIFT=14
 CONFIG_BLK_DEV_INITRD=y
-# CONFIG_SYSCTL_SYSCALL is not set
 # CONFIG_HOTPLUG is not set
 CONFIG_SLAB=y
 # CONFIG_BLK_DEV_BSG is not set
index 87db9a84b5ecabb9661ca627abf2890c64042d4c..f0073ed3994771c071effbf29365dc144a6c561d 100644 (file)
@@ -3,7 +3,6 @@ CONFIG_POSIX_MQUEUE=y
 CONFIG_BSD_PROCESS_ACCT=y
 CONFIG_LOG_BUF_SHIFT=14
 CONFIG_BLK_DEV_INITRD=y
-# CONFIG_SYSCTL_SYSCALL is not set
 CONFIG_SLAB=y
 CONFIG_PROFILING=y
 CONFIG_OPROFILE=m
index 08426913c0e394a6ea4248113ef610ba73c91f84..0d814770b07fe97bc7fcb0bb30491ba8a1e829fb 100644 (file)
@@ -2,7 +2,6 @@
 CONFIG_SYSVIPC=y
 CONFIG_POSIX_MQUEUE=y
 CONFIG_LOG_BUF_SHIFT=14
-# CONFIG_SYSCTL_SYSCALL is not set
 # CONFIG_FUTEX is not set
 # CONFIG_EPOLL is not set
 # CONFIG_SHMEM is not set
index d0933a9b9799fed0536acf4d716c0cf0dbacfe6e..a2700ab165afb19ac8b61c5c4a9c11e6663a5eca 100644 (file)
@@ -8,7 +8,6 @@ CONFIG_TASK_XACCT=y
 CONFIG_TASK_IO_ACCOUNTING=y
 CONFIG_LOG_BUF_SHIFT=14
 CONFIG_BLK_DEV_INITRD=y
-# CONFIG_SYSCTL_SYSCALL is not set
 CONFIG_KALLSYMS_ALL=y
 CONFIG_SLAB=y
 CONFIG_MODULES=y
index d0a0aa74cecfb6ea89311741b8ea437008c27fd9..26c5fd02c87a152db4bb5ad67c3ced60f1038e52 100644 (file)
@@ -5,7 +5,6 @@ CONFIG_LOG_BUF_SHIFT=14
 CONFIG_NAMESPACES=y
 CONFIG_UTS_NS=y
 CONFIG_IPC_NS=y
-# CONFIG_SYSCTL_SYSCALL is not set
 CONFIG_SLAB=y
 CONFIG_PROFILING=y
 CONFIG_OPROFILE=y
index a27b129b93c5a91fec727302546861bfaf787dbd..c0b6f40d01cca53c6116d5c4ee892c01ab2abf3e 100644 (file)
@@ -1,7 +1,6 @@
 # CONFIG_SWAP is not set
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_UID16 is not set
-# CONFIG_SYSCTL_SYSCALL is not set
 # CONFIG_KALLSYMS is not set
 # CONFIG_HOTPLUG is not set
 # CONFIG_BUG is not set
index 4ec961ace6887864c740e365ee08fbdf18b8ff50..ba887f1351be626ef3a4199ef410172441dcc374 100644 (file)
@@ -6,7 +6,6 @@ CONFIG_IKCONFIG_PROC=y
 CONFIG_LOG_BUF_SHIFT=16
 CONFIG_BLK_DEV_INITRD=y
 # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
-# CONFIG_SYSCTL_SYSCALL is not set
 CONFIG_SLAB=y
 CONFIG_MODULES=y
 CONFIG_MODULE_UNLOAD=y
index 96848db9659e92403ac623969285cbfafd6f86d4..ae0a00beea5f2e8f2b8335c634a5f7341323c345 100644 (file)
 146    common  writev                          sys_writev
 147    common  getsid                          sys_getsid
 148    common  fdatasync                       sys_fdatasync
-149    common  _sysctl                         sys_sysctl
+149    common  _sysctl                         sys_ni_syscall
 150    common  mlock                           sys_mlock
 151    common  munlock                         sys_munlock
 152    common  mlockall                        sys_mlockall
index 46024e80ee864f46109a9a81bd6da3824323be13..4af114e84f2022157afdf7d6dc76c61fa2be4e34 100644 (file)
 249    64      nanosleep               sys_nanosleep
 250    32      mremap                  sys_mremap
 250    64      mremap                  sys_64_mremap
-251    common  _sysctl                 sys_sysctl                      compat_sys_sysctl
+251    common  _sysctl                 sys_ni_syscall
 252    common  getsid                  sys_getsid
 253    common  fdatasync               sys_fdatasync
 254    32      nfsservctl              sys_ni_syscall                  sys_nis_syscall
index e31a75262c9cfdb0ba72e06b8bb1e70bce321873..9d11028736661bc5ed583eb7ed5e89c1c3ef2753 100644 (file)
 146    i386    writev                  sys_writev                      compat_sys_writev
 147    i386    getsid                  sys_getsid
 148    i386    fdatasync               sys_fdatasync
-149    i386    _sysctl                 sys_sysctl                      compat_sys_sysctl
+149    i386    _sysctl                 sys_ni_syscall
 150    i386    mlock                   sys_mlock
 151    i386    munlock                 sys_munlock
 152    i386    mlockall                sys_mlockall
index 9d82078c949aa99926d65400721b696ea103feb8..f30d6ae9a6883c510eb07f821675b460a3fd8754 100644 (file)
 153    common  vhangup                 sys_vhangup
 154    common  modify_ldt              sys_modify_ldt
 155    common  pivot_root              sys_pivot_root
-156    64      _sysctl                 sys_sysctl
+156    64      _sysctl                 sys_ni_syscall
 157    common  prctl                   sys_prctl
 158    common  arch_prctl              sys_arch_prctl
 159    common  adjtimex                sys_adjtimex
index d216ccba42f7029c81b30a2b0a769e56dc791ec0..6276e3c2d3fc0d82ac59907e43c3895f42f54a74 100644 (file)
 204    common  quotactl                        sys_quotactl
 # 205 was old nfsservctl
 205    common  nfsservctl                      sys_ni_syscall
-206    common  _sysctl                         sys_sysctl
+206    common  _sysctl                         sys_ni_syscall
 207    common  bdflush                         sys_bdflush
 208    common  uname                           sys_newuname
 209    common  sysinfo                         sys_sysinfo
index c4255d8a4a8aea0a555aa0ab6f1d30004efcf6b2..d38c4d7e83bd32391dc99df671f88a1bc068cc30 100644 (file)
@@ -851,7 +851,6 @@ asmlinkage long compat_sys_select(int n, compat_ulong_t __user *inp,
 asmlinkage long compat_sys_ustat(unsigned dev, struct compat_ustat __user *u32);
 asmlinkage long compat_sys_recv(int fd, void __user *buf, compat_size_t len,
                                unsigned flags);
-asmlinkage long compat_sys_sysctl(struct compat_sysctl_args __user *args);
 
 /* obsolete: fs/readdir.c */
 asmlinkage long compat_sys_old_readdir(unsigned int fd,
index dc2b827c81e5421218ad13e037137549f7fd79dd..75ac7f8ae93cdbb932b90b585973e2a634f58eae 100644 (file)
@@ -47,7 +47,6 @@ struct stat64;
 struct statfs;
 struct statfs64;
 struct statx;
-struct __sysctl_args;
 struct sysinfo;
 struct timespec;
 struct __kernel_old_timeval;
@@ -1117,7 +1116,6 @@ asmlinkage long sys_send(int, void __user *, size_t, unsigned);
 asmlinkage long sys_bdflush(int func, long data);
 asmlinkage long sys_oldumount(char __user *name);
 asmlinkage long sys_uselib(const char __user *library);
-asmlinkage long sys_sysctl(struct __sysctl_args __user *args);
 asmlinkage long sys_sysfs(int option,
                                unsigned long arg1, unsigned long arg2);
 asmlinkage long sys_fork(void);
index 50bb7f383a1b5dafae9140c90d373ea5d03f8373..51298a4f4623573a6628718193331fb4f31d5469 100644 (file)
@@ -74,15 +74,13 @@ int proc_do_static_key(struct ctl_table *table, int write, void *buffer,
  * sysctl names can be mirrored automatically under /proc/sys.  The
  * procname supplied controls /proc naming.
  *
- * The table's mode will be honoured both for sys_sysctl(2) and
- * proc-fs access.
+ * The table's mode will be honoured for proc-fs access.
  *
  * Leaf nodes in the sysctl tree will be represented by a single file
  * under /proc; non-leaf nodes will be represented by directories.  A
  * null procname disables /proc mirroring at this node.
  *
- * sysctl(2) can automatically manage read and write requests through
- * the sysctl table.  The data and maxlen fields of the ctl_table
+ * The data and maxlen fields of the ctl_table
  * struct enable minimal validation of the values being written to be
  * performed, and the mode field allows minimal authentication.
  * 
index b3da548691c9d5d8a6b8451bbf513d749edf1171..9a20016d4900d12cbdbd400018b50b288b3c92ef 100644 (file)
@@ -5,7 +5,7 @@
 
 obj-y     = fork.o exec_domain.o panic.o \
            cpu.o exit.o softirq.o resource.o \
-           sysctl.o sysctl_binary.o capability.o ptrace.o user.o \
+           sysctl.o capability.o ptrace.o user.o \
            signal.o sys.o umh.o workqueue.o pid.o task_work.o \
            extable.o params.o \
            kthread.o sys_ni.o nsproxy.o \
index 3b69a560a7ac567020c714c27b8241fe2dffc8ce..4d59775ea79c1e6c2ecf10a566c8cd06f593a0a3 100644 (file)
@@ -364,7 +364,6 @@ COND_SYSCALL(socketcall);
 COND_SYSCALL_COMPAT(socketcall);
 
 /* compat syscalls for arm64, x86, ... */
-COND_SYSCALL_COMPAT(sysctl);
 COND_SYSCALL_COMPAT(fanotify_mark);
 
 /* x86 */
diff --git a/kernel/sysctl_binary.c b/kernel/sysctl_binary.c
deleted file mode 100644 (file)
index 7d550cc..0000000
+++ /dev/null
@@ -1,171 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-#include <linux/stat.h>
-#include <linux/sysctl.h>
-#include "../fs/xfs/xfs_sysctl.h"
-#include <linux/sunrpc/debug.h>
-#include <linux/string.h>
-#include <linux/syscalls.h>
-#include <linux/namei.h>
-#include <linux/mount.h>
-#include <linux/fs.h>
-#include <linux/nsproxy.h>
-#include <linux/pid_namespace.h>
-#include <linux/file.h>
-#include <linux/ctype.h>
-#include <linux/netdevice.h>
-#include <linux/kernel.h>
-#include <linux/uuid.h>
-#include <linux/slab.h>
-#include <linux/compat.h>
-
-static ssize_t binary_sysctl(const int *name, int nlen,
-       void __user *oldval, size_t oldlen, void __user *newval, size_t newlen)
-{
-       return -ENOSYS;
-}
-
-static void deprecated_sysctl_warning(const int *name, int nlen)
-{
-       int i;
-
-       /*
-        * CTL_KERN/KERN_VERSION is used by older glibc and cannot
-        * ever go away.
-        */
-       if (nlen >= 2 && name[0] == CTL_KERN && name[1] == KERN_VERSION)
-               return;
-
-       if (printk_ratelimit()) {
-               printk(KERN_INFO
-                       "warning: process `%s' used the deprecated sysctl "
-                       "system call with ", current->comm);
-               for (i = 0; i < nlen; i++)
-                       printk(KERN_CONT "%d.", name[i]);
-               printk(KERN_CONT "\n");
-       }
-       return;
-}
-
-#define WARN_ONCE_HASH_BITS 8
-#define WARN_ONCE_HASH_SIZE (1<<WARN_ONCE_HASH_BITS)
-
-static DECLARE_BITMAP(warn_once_bitmap, WARN_ONCE_HASH_SIZE);
-
-#define FNV32_OFFSET 2166136261U
-#define FNV32_PRIME 0x01000193
-
-/*
- * Print each legacy sysctl (approximately) only once.
- * To avoid making the tables non-const use a external
- * hash-table instead.
- * Worst case hash collision: 6, but very rarely.
- * NOTE! We don't use the SMP-safe bit tests. We simply
- * don't care enough.
- */
-static void warn_on_bintable(const int *name, int nlen)
-{
-       int i;
-       u32 hash = FNV32_OFFSET;
-
-       for (i = 0; i < nlen; i++)
-               hash = (hash ^ name[i]) * FNV32_PRIME;
-       hash %= WARN_ONCE_HASH_SIZE;
-       if (__test_and_set_bit(hash, warn_once_bitmap))
-               return;
-       deprecated_sysctl_warning(name, nlen);
-}
-
-static ssize_t do_sysctl(int __user *args_name, int nlen,
-       void __user *oldval, size_t oldlen, void __user *newval, size_t newlen)
-{
-       int name[CTL_MAXNAME];
-       int i;
-
-       /* Check args->nlen. */
-       if (nlen < 0 || nlen > CTL_MAXNAME)
-               return -ENOTDIR;
-       /* Read in the sysctl name for simplicity */
-       for (i = 0; i < nlen; i++)
-               if (get_user(name[i], args_name + i))
-                       return -EFAULT;
-
-       warn_on_bintable(name, nlen);
-
-       return binary_sysctl(name, nlen, oldval, oldlen, newval, newlen);
-}
-
-SYSCALL_DEFINE1(sysctl, struct __sysctl_args __user *, args)
-{
-       struct __sysctl_args tmp;
-       size_t oldlen = 0;
-       ssize_t result;
-
-       if (copy_from_user(&tmp, args, sizeof(tmp)))
-               return -EFAULT;
-
-       if (tmp.oldval && !tmp.oldlenp)
-               return -EFAULT;
-
-       if (tmp.oldlenp && get_user(oldlen, tmp.oldlenp))
-               return -EFAULT;
-
-       result = do_sysctl(tmp.name, tmp.nlen, tmp.oldval, oldlen,
-                          tmp.newval, tmp.newlen);
-
-       if (result >= 0) {
-               oldlen = result;
-               result = 0;
-       }
-
-       if (tmp.oldlenp && put_user(oldlen, tmp.oldlenp))
-               return -EFAULT;
-
-       return result;
-}
-
-
-#ifdef CONFIG_COMPAT
-
-struct compat_sysctl_args {
-       compat_uptr_t   name;
-       int             nlen;
-       compat_uptr_t   oldval;
-       compat_uptr_t   oldlenp;
-       compat_uptr_t   newval;
-       compat_size_t   newlen;
-       compat_ulong_t  __unused[4];
-};
-
-COMPAT_SYSCALL_DEFINE1(sysctl, struct compat_sysctl_args __user *, args)
-{
-       struct compat_sysctl_args tmp;
-       compat_size_t __user *compat_oldlenp;
-       size_t oldlen = 0;
-       ssize_t result;
-
-       if (copy_from_user(&tmp, args, sizeof(tmp)))
-               return -EFAULT;
-
-       if (tmp.oldval && !tmp.oldlenp)
-               return -EFAULT;
-
-       compat_oldlenp = compat_ptr(tmp.oldlenp);
-       if (compat_oldlenp && get_user(oldlen, compat_oldlenp))
-               return -EFAULT;
-
-       result = do_sysctl(compat_ptr(tmp.name), tmp.nlen,
-                          compat_ptr(tmp.oldval), oldlen,
-                          compat_ptr(tmp.newval), tmp.newlen);
-
-       if (result >= 0) {
-               oldlen = result;
-               result = 0;
-       }
-
-       if (compat_oldlenp && put_user(oldlen, compat_oldlenp))
-               return -EFAULT;
-
-       return result;
-}
-
-#endif /* CONFIG_COMPAT */
index b190f2eb2611b3066436e82e7dde7793d1d44c65..3ca6fe057a0b1f52eba54f83a488d1159851ff2a 100644 (file)
 146    common  writev                          sys_writev                      compat_sys_writev
 147    common  getsid                          sys_getsid
 148    common  fdatasync                       sys_fdatasync
-149    nospu   _sysctl                         sys_sysctl                      compat_sys_sysctl
+149    nospu   _sysctl                         sys_ni_syscall
 150    common  mlock                           sys_mlock
 151    common  munlock                         sys_munlock
 152    common  mlockall                        sys_mlockall
index 56ae24b6e4be6ec741ba7a9e753126df6d82fa3d..6a0bbea225db0d76da7dfe89143face0eb520276 100644 (file)
 146  common    writev                  sys_writev                      compat_sys_writev
 147  common    getsid                  sys_getsid                      sys_getsid
 148  common    fdatasync               sys_fdatasync                   sys_fdatasync
-149  common    _sysctl                 sys_sysctl                      compat_sys_sysctl
+149  common    _sysctl                 -                               -
 150  common    mlock                   sys_mlock                       compat_sys_mlock
 151  common    munlock                 sys_munlock                     compat_sys_munlock
 152  common    mlockall                sys_mlockall                    sys_mlockall
index 9d82078c949aa99926d65400721b696ea103feb8..f30d6ae9a6883c510eb07f821675b460a3fd8754 100644 (file)
 153    common  vhangup                 sys_vhangup
 154    common  modify_ldt              sys_modify_ldt
 155    common  pivot_root              sys_pivot_root
-156    64      _sysctl                 sys_sysctl
+156    64      _sysctl                 sys_ni_syscall
 157    common  prctl                   sys_prctl
 158    common  arch_prctl              sys_arch_prctl
 159    common  adjtimex                sys_adjtimex