Skip to content

Commit

Permalink
sysctl: Remove the sysctl system call
Browse files Browse the repository at this point in the history
This system call has been deprecated almost since it was introduced, and
in a survey of the linux distributions I can no longer find any of them
that enable CONFIG_SYSCTL_SYSCALL.  The only indication that I can find
that anyone might care is that a few of the defconfigs in the kernel
enable CONFIG_SYSCTL_SYSCALL.  However this appears in only 31 of 414
defconfigs in the kernel, so I suspect this symbols presence is simply
because it is harmless to include rather than because it is necessary.

As there appear to be no users of the sysctl system call, remove the
code.  As this removes one of the few uses of the internal kernel mount
of proc I hope this allows for even more simplifications of the proc
filesystem.

Cc: Alex Smith <[email protected]>
Cc: Anders Berg <[email protected]>
Cc: Apelete Seketeli <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Cc: Chee Nouk Phoon <[email protected]>
Cc: Chris Zankel <[email protected]>
Cc: Christian Ruppert <[email protected]>
Cc: Greg Ungerer <[email protected]>
Cc: Harvey Hunt <[email protected]>
Cc: Helge Deller <[email protected]>
Cc: Hongliang Tao <[email protected]>
Cc: Hua Yan <[email protected]>
Cc: Huacai Chen <[email protected]>
Cc: John Crispin <[email protected]>
Cc: Jonas Jensen <[email protected]>
Cc: Josh Boyer <[email protected]>
Cc: Jun Nie <[email protected]>
Cc: Kevin Hilman <[email protected]>
Cc: Kevin Wells <[email protected]>
Cc: Kumar Gala <[email protected]>
Cc: Lars-Peter Clausen <[email protected]>
Cc: Ley Foon Tan <[email protected]>
Cc: Linus Walleij <[email protected]>
Cc: Markos Chandras <[email protected]>
Cc: Max Filippov <[email protected]>
Cc: Noam Camus <[email protected]>
Cc: Olof Johansson <[email protected]>
Cc: Paul Burton <[email protected]>
Cc: Paul Mundt <[email protected]>
Cc: Phil Edworthy <[email protected]>
Cc: Pierrick Hascoet <[email protected]>
Cc: Ralf Baechle <[email protected]>
Cc: Roland Stigge <[email protected]>
Cc: Santosh Shilimkar <[email protected]>
Cc: Scott Telford <[email protected]>
Cc: Stephen Boyd <[email protected]>
Cc: Steven J. Hill <[email protected]>
Cc: Tanmay Inamdar <[email protected]>
Cc: Vineet Gupta <[email protected]>
Cc: Wolfram Sang <[email protected]>
Acked-by: Andi Kleen <[email protected]>
Reviewed-by: Kees Cook <[email protected]>
Signed-off-by: "Eric W. Biederman" <[email protected]>
  • Loading branch information
ebiederm committed Nov 26, 2019
1 parent 54ecb8f commit 61a47c1
Show file tree
Hide file tree
Showing 34 changed files with 0 additions and 1,354 deletions.
1 change: 0 additions & 1 deletion arch/arc/configs/nps_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_BLK_DEV_INITRD=y
CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3=y
CONFIG_SYSCTL_SYSCALL=y
# CONFIG_EPOLL is not set
# CONFIG_SIGNALFD is not set
# CONFIG_TIMERFD is not set
Expand Down
1 change: 0 additions & 1 deletion arch/arc/configs/tb10x_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ CONFIG_INITRAMFS_ROOT_UID=2100
CONFIG_INITRAMFS_ROOT_GID=501
# CONFIG_RD_GZIP is not set
CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3=y
CONFIG_SYSCTL_SYSCALL=y
CONFIG_KALLSYMS_ALL=y
# CONFIG_AIO is not set
CONFIG_EMBEDDED=y
Expand Down
1 change: 0 additions & 1 deletion arch/arm/configs/axm55xx_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ CONFIG_NAMESPACES=y
CONFIG_SCHED_AUTOGROUP=y
CONFIG_RELAY=y
CONFIG_BLK_DEV_INITRD=y
CONFIG_SYSCTL_SYSCALL=y
CONFIG_EMBEDDED=y
# CONFIG_COMPAT_BRK is not set
CONFIG_PROFILING=y
Expand Down
1 change: 0 additions & 1 deletion arch/arm/configs/keystone_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ CONFIG_CGROUP_CPUACCT=y
CONFIG_CGROUP_SCHED=y
CONFIG_BLK_CGROUP=y
CONFIG_BLK_DEV_INITRD=y
CONFIG_SYSCTL_SYSCALL=y
CONFIG_KALLSYMS_ALL=y
# CONFIG_ELF_CORE is not set
# CONFIG_BASE_FULL is not set
Expand Down
1 change: 0 additions & 1 deletion arch/arm/configs/lpc32xx_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ CONFIG_SYSFS_DEPRECATED=y
CONFIG_SYSFS_DEPRECATED_V2=y
CONFIG_BLK_DEV_INITRD=y
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_SYSCTL_SYSCALL=y
CONFIG_EMBEDDED=y
CONFIG_SLAB=y
# CONFIG_ARCH_MULTI_V7 is not set
Expand Down
1 change: 0 additions & 1 deletion arch/arm/configs/moxart_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ CONFIG_SYSVIPC=y
CONFIG_NO_HZ=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_SYSCTL_SYSCALL=y
# CONFIG_ELF_CORE is not set
# CONFIG_BASE_FULL is not set
# CONFIG_SIGNALFD is not set
Expand Down
1 change: 0 additions & 1 deletion arch/arm/configs/qcom_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_CGROUPS=y
CONFIG_BLK_DEV_INITRD=y
CONFIG_SYSCTL_SYSCALL=y
CONFIG_KALLSYMS_ALL=y
CONFIG_EMBEDDED=y
# CONFIG_SLUB_DEBUG is not set
Expand Down
1 change: 0 additions & 1 deletion arch/arm/configs/zx_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ CONFIG_RT_GROUP_SCHED=y
CONFIG_NAMESPACES=y
CONFIG_USER_NS=y
CONFIG_BLK_DEV_INITRD=y
CONFIG_SYSCTL_SYSCALL=y
CONFIG_KALLSYMS_ALL=y
CONFIG_EMBEDDED=y
CONFIG_PERF_EVENTS=y
Expand Down
1 change: 0 additions & 1 deletion arch/m68k/configs/m5475evb_defconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# CONFIG_SWAP is not set
CONFIG_LOG_BUF_SHIFT=14
CONFIG_SYSCTL_SYSCALL=y
# CONFIG_KALLSYMS is not set
# CONFIG_FUTEX is not set
# CONFIG_EPOLL is not set
Expand Down
1 change: 0 additions & 1 deletion arch/mips/configs/ci20_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion arch/mips/configs/loongson3_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ CONFIG_SCHED_AUTOGROUP=y
CONFIG_SYSFS_DEPRECATED=y
CONFIG_RELAY=y
CONFIG_BLK_DEV_INITRD=y
CONFIG_SYSCTL_SYSCALL=y
CONFIG_EMBEDDED=y
CONFIG_MACH_LOONGSON64=y
CONFIG_LOONGSON_MACH3X=y
Expand Down
1 change: 0 additions & 1 deletion arch/mips/configs/malta_qemu_32r6_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ CONFIG_NO_HZ=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=15
CONFIG_SYSCTL_SYSCALL=y
CONFIG_EMBEDDED=y
CONFIG_SLAB=y
CONFIG_MIPS_MALTA=y
Expand Down
1 change: 0 additions & 1 deletion arch/mips/configs/maltaaprp_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ CONFIG_AUDIT=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=15
CONFIG_SYSCTL_SYSCALL=y
CONFIG_EMBEDDED=y
CONFIG_SLAB=y
CONFIG_MIPS_MALTA=y
Expand Down
1 change: 0 additions & 1 deletion arch/mips/configs/maltasmvp_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ CONFIG_NO_HZ=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=15
CONFIG_SYSCTL_SYSCALL=y
CONFIG_EMBEDDED=y
CONFIG_SLAB=y
CONFIG_MIPS_MALTA=y
Expand Down
1 change: 0 additions & 1 deletion arch/mips/configs/maltasmvp_eva_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ CONFIG_NO_HZ=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=15
CONFIG_SYSCTL_SYSCALL=y
CONFIG_EMBEDDED=y
CONFIG_SLAB=y
CONFIG_MIPS_MALTA=y
Expand Down
1 change: 0 additions & 1 deletion arch/mips/configs/maltaup_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ CONFIG_NO_HZ=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=15
CONFIG_SYSCTL_SYSCALL=y
CONFIG_EMBEDDED=y
CONFIG_SLAB=y
CONFIG_MIPS_MALTA=y
Expand Down
1 change: 0 additions & 1 deletion arch/mips/configs/omega2p_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,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
Expand Down
1 change: 0 additions & 1 deletion arch/mips/configs/qi_lb60_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
CONFIG_SYSVIPC=y
# CONFIG_CROSS_MEMORY_ATTACH is not set
CONFIG_LOG_BUF_SHIFT=14
CONFIG_SYSCTL_SYSCALL=y
CONFIG_KALLSYMS_ALL=y
CONFIG_EMBEDDED=y
# CONFIG_VM_EVENT_COUNTERS is not set
Expand Down
1 change: 0 additions & 1 deletion arch/mips/configs/vocore2_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,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
Expand Down
1 change: 0 additions & 1 deletion arch/nios2/configs/10m50_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ CONFIG_SYSVIPC=y
CONFIG_NO_HZ_IDLE=y
CONFIG_BSD_PROCESS_ACCT=y
CONFIG_LOG_BUF_SHIFT=14
CONFIG_SYSCTL_SYSCALL=y
# CONFIG_ELF_CORE is not set
# CONFIG_EPOLL is not set
# CONFIG_SIGNALFD is not set
Expand Down
1 change: 0 additions & 1 deletion arch/nios2/configs/3c120_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ CONFIG_SYSVIPC=y
CONFIG_NO_HZ_IDLE=y
CONFIG_BSD_PROCESS_ACCT=y
CONFIG_LOG_BUF_SHIFT=14
CONFIG_SYSCTL_SYSCALL=y
# CONFIG_ELF_CORE is not set
# CONFIG_EPOLL is not set
# CONFIG_SIGNALFD is not set
Expand Down
1 change: 0 additions & 1 deletion arch/parisc/configs/c8000_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ CONFIG_IKCONFIG_PROC=y
CONFIG_RELAY=y
CONFIG_BLK_DEV_INITRD=y
CONFIG_EXPERT=y
CONFIG_SYSCTL_SYSCALL=y
CONFIG_SLAB=y
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
Expand Down
1 change: 0 additions & 1 deletion arch/parisc/configs/generic-32bit_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=16
CONFIG_BLK_DEV_INITRD=y
CONFIG_EXPERT=y
CONFIG_SYSCTL_SYSCALL=y
CONFIG_PERF_EVENTS=y
CONFIG_SLAB=y
CONFIG_MODULES=y
Expand Down
1 change: 0 additions & 1 deletion arch/powerpc/configs/40x/klondike_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ CONFIG_LOG_BUF_SHIFT=14
CONFIG_SYSFS_DEPRECATED=y
CONFIG_SYSFS_DEPRECATED_V2=y
CONFIG_BLK_DEV_INITRD=y
CONFIG_SYSCTL_SYSCALL=y
CONFIG_EMBEDDED=y
CONFIG_SLAB=y
CONFIG_MODULES=y
Expand Down
1 change: 0 additions & 1 deletion arch/sh/configs/rsk7264_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ CONFIG_NAMESPACES=y
CONFIG_SYSFS_DEPRECATED=y
CONFIG_SYSFS_DEPRECATED_V2=y
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_SYSCTL_SYSCALL=y
CONFIG_KALLSYMS_ALL=y
CONFIG_EMBEDDED=y
CONFIG_PERF_COUNTERS=y
Expand Down
1 change: 0 additions & 1 deletion arch/xtensa/configs/audio_kc705_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ CONFIG_SCHED_AUTOGROUP=y
CONFIG_RELAY=y
CONFIG_BLK_DEV_INITRD=y
CONFIG_EXPERT=y
CONFIG_SYSCTL_SYSCALL=y
CONFIG_KALLSYMS_ALL=y
CONFIG_PROFILING=y
CONFIG_OPROFILE=y
Expand Down
1 change: 0 additions & 1 deletion arch/xtensa/configs/cadence_csp_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ CONFIG_INITRAMFS_SOURCE="$$KERNEL_INITRAMFS_SOURCE"
# CONFIG_RD_LZO is not set
# CONFIG_RD_LZ4 is not set
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_SYSCTL_SYSCALL=y
CONFIG_EMBEDDED=y
CONFIG_PROFILING=y
CONFIG_MODULES=y
Expand Down
1 change: 0 additions & 1 deletion arch/xtensa/configs/generic_kc705_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ CONFIG_SCHED_AUTOGROUP=y
CONFIG_RELAY=y
CONFIG_BLK_DEV_INITRD=y
CONFIG_EXPERT=y
CONFIG_SYSCTL_SYSCALL=y
CONFIG_KALLSYMS_ALL=y
CONFIG_PROFILING=y
CONFIG_OPROFILE=y
Expand Down
1 change: 0 additions & 1 deletion arch/xtensa/configs/iss_defconfig
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
CONFIG_SYSVIPC=y
CONFIG_LOG_BUF_SHIFT=14
CONFIG_EXPERT=y
CONFIG_SYSCTL_SYSCALL=y
# CONFIG_IOSCHED_DEADLINE is not set
# CONFIG_IOSCHED_CFQ is not set
# CONFIG_PCI is not set
Expand Down
1 change: 0 additions & 1 deletion arch/xtensa/configs/nommu_kc705_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ CONFIG_BLK_DEV_INITRD=y
# CONFIG_RD_LZO is not set
# CONFIG_RD_LZ4 is not set
CONFIG_EXPERT=y
CONFIG_SYSCTL_SYSCALL=y
CONFIG_KALLSYMS_ALL=y
CONFIG_PERF_EVENTS=y
CONFIG_MODULES=y
Expand Down
1 change: 0 additions & 1 deletion arch/xtensa/configs/smp_lx200_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ CONFIG_SCHED_AUTOGROUP=y
CONFIG_RELAY=y
CONFIG_BLK_DEV_INITRD=y
CONFIG_EXPERT=y
CONFIG_SYSCTL_SYSCALL=y
CONFIG_KALLSYMS_ALL=y
CONFIG_PROFILING=y
CONFIG_OPROFILE=y
Expand Down
1 change: 0 additions & 1 deletion arch/xtensa/configs/virt_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ CONFIG_SCHED_AUTOGROUP=y
CONFIG_RELAY=y
CONFIG_BLK_DEV_INITRD=y
CONFIG_EXPERT=y
CONFIG_SYSCTL_SYSCALL=y
CONFIG_KALLSYMS_ALL=y
CONFIG_PERF_EVENTS=y
CONFIG_XTENSA_VARIANT_DC233C=y
Expand Down
17 changes: 0 additions & 17 deletions init/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1372,23 +1372,6 @@ config SYSFS_SYSCALL

If unsure say Y here.

config SYSCTL_SYSCALL
bool "Sysctl syscall support" if EXPERT
depends on PROC_SYSCTL
default n
select SYSCTL
---help---
sys_sysctl uses binary paths that have been found challenging
to properly maintain and use. The interface in /proc/sys
using paths with ascii names is now the primary path to this
information.

Almost nothing using the binary sysctl interface so if you are
trying to save some space it is probably safe to disable this,
making your kernel marginally smaller.

If unsure say N here.

config FHANDLE
bool "open by fhandle syscalls" if EXPERT
select EXPORTFS
Expand Down
Loading

0 comments on commit 61a47c1

Please sign in to comment.