sysctl: remove CONFIG_PROC_SYSCTL, it just mirrors CONFIG_SYSCTL

CONFIG_SYSCTL used to make sense as a separate hidden bool before commit
61a47c1ad3 ("sysctl: Remove the sysctl system call"); it was selected
by both CONFIG_SYSCTL_SYSCALL and CONFIG_PROC_SYSCTL.

Today CONFIG_PROC_SYSCTL is the only selector, so the two are always
equal. Kill the hidden bool, rename the PROC_SYSCTL prompt to SYSCTL,
and s/CONFIG_PROC_SYSCTL/CONFIG_SYSCTL/ tree-wide.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Joel Granados <joel.granados@kernel.org>
This commit is contained in:
Oleg Nesterov 2026-07-27 16:47:22 +02:00 committed by Joel Granados
parent 7170ca0162
commit 8d75c338f0
21 changed files with 32 additions and 37 deletions

View File

@ -74,7 +74,7 @@ CONFIG_RTC_DRV_DS1307=y
# CONFIG_DNOTIFY is not set # CONFIG_DNOTIFY is not set
# CONFIG_INOTIFY_USER is not set # CONFIG_INOTIFY_USER is not set
CONFIG_FSCACHE=y CONFIG_FSCACHE=y
# CONFIG_PROC_SYSCTL is not set # CONFIG_SYSCTL is not set
CONFIG_JFFS2_FS=y CONFIG_JFFS2_FS=y
CONFIG_ROMFS_FS=y CONFIG_ROMFS_FS=y
CONFIG_ROMFS_BACKED_BY_BOTH=y CONFIG_ROMFS_BACKED_BY_BOTH=y

View File

@ -87,7 +87,7 @@ CONFIG_EXT4_FS_SECURITY=y
# CONFIG_DNOTIFY is not set # CONFIG_DNOTIFY is not set
# CONFIG_INOTIFY_USER is not set # CONFIG_INOTIFY_USER is not set
CONFIG_OVERLAY_FS=y CONFIG_OVERLAY_FS=y
# CONFIG_PROC_SYSCTL is not set # CONFIG_SYSCTL is not set
CONFIG_SQUASHFS=y CONFIG_SQUASHFS=y
CONFIG_XZ_DEC=y CONFIG_XZ_DEC=y
CONFIG_PRINTK_TIME=y CONFIG_PRINTK_TIME=y

View File

@ -575,7 +575,7 @@ config HIPERDISPATCH_ON
def_bool y def_bool y
bool "Use hiperdispatch on vertical polarization by default" bool "Use hiperdispatch on vertical polarization by default"
depends on SCHED_TOPOLOGY depends on SCHED_TOPOLOGY
depends on PROC_SYSCTL depends on SYSCTL
help help
Hiperdispatch aims to improve the CPU scheduler's decision Hiperdispatch aims to improve the CPU scheduler's decision
making when using vertical polarization by adjusting CPU making when using vertical polarization by adjusting CPU
@ -893,7 +893,7 @@ config CMM_IUCV
config APPLDATA_BASE config APPLDATA_BASE
def_bool n def_bool n
prompt "Linux - VM Monitor Stream, base infrastructure" prompt "Linux - VM Monitor Stream, base infrastructure"
depends on PROC_SYSCTL depends on SYSCTL
help help
This provides a kernel interface for creating and updating z/VM APPLDATA This provides a kernel interface for creating and updating z/VM APPLDATA
monitor records. The monitor records are updated at certain time monitor records. The monitor records are updated at certain time

View File

@ -50,7 +50,7 @@ static struct ratelimit_state bld_ratelimit;
static unsigned int sysctl_sld_mitigate = 1; static unsigned int sysctl_sld_mitigate = 1;
static DEFINE_SEMAPHORE(buslock_sem, 1); static DEFINE_SEMAPHORE(buslock_sem, 1);
#ifdef CONFIG_PROC_SYSCTL #ifdef CONFIG_SYSCTL
static const struct ctl_table sld_sysctls[] = { static const struct ctl_table sld_sysctls[] = {
{ {
.procname = "split_lock_mitigate", .procname = "split_lock_mitigate",

View File

@ -80,10 +80,9 @@ config PROC_VMCORE_DEVICE_RAM
Relevant architectures should select NEED_PROC_VMCORE_DEVICE_RAM. Relevant architectures should select NEED_PROC_VMCORE_DEVICE_RAM.
config PROC_SYSCTL config SYSCTL
bool "Sysctl support (/proc/sys)" if EXPERT bool "Sysctl support (/proc/sys)" if EXPERT
depends on PROC_FS depends on PROC_FS
select SYSCTL
default y default y
help help
The sysctl interface provides a means of dynamically changing The sysctl interface provides a means of dynamically changing

View File

@ -29,7 +29,7 @@ proc-y += softirqs.o
proc-y += namespaces.o proc-y += namespaces.o
proc-y += self.o proc-y += self.o
proc-y += thread_self.o proc-y += thread_self.o
proc-$(CONFIG_PROC_SYSCTL) += proc_sysctl.o proc-$(CONFIG_SYSCTL) += proc_sysctl.o
proc-$(CONFIG_NET) += proc_net.o proc-$(CONFIG_NET) += proc_net.o
proc-$(CONFIG_PROC_KCORE) += kcore.o proc-$(CONFIG_PROC_KCORE) += kcore.o
proc-$(CONFIG_PROC_VMCORE) += vmcore.o proc-$(CONFIG_PROC_VMCORE) += vmcore.o

View File

@ -351,7 +351,7 @@ extern void proc_thread_self_init(void);
/* /*
* proc_sysctl.c * proc_sysctl.c
*/ */
#ifdef CONFIG_PROC_SYSCTL #ifdef CONFIG_SYSCTL
extern int proc_sys_init(void); extern int proc_sys_init(void);
extern void proc_sys_evict_inode(struct inode *inode, extern void proc_sys_evict_inode(struct inode *inode,
struct ctl_table_header *head); struct ctl_table_header *head);

View File

@ -18,7 +18,7 @@ enum uts_proc {
UTS_PROC_DOMAINNAME, UTS_PROC_DOMAINNAME,
}; };
#ifdef CONFIG_PROC_SYSCTL #ifdef CONFIG_SYSCTL
extern void uts_proc_notify(enum uts_proc proc); extern void uts_proc_notify(enum uts_proc proc);
#else #else
static inline void uts_proc_notify(enum uts_proc proc) static inline void uts_proc_notify(enum uts_proc proc)

View File

@ -1661,9 +1661,6 @@ config LD_ORPHAN_WARN_LEVEL
default "error" if WERROR default "error" if WERROR
default "warn" default "warn"
config SYSCTL
bool
config HAVE_UID16 config HAVE_UID16
bool bool

View File

@ -54,7 +54,7 @@ void delayacct_init(void)
set_delayacct(delayacct_on); set_delayacct(delayacct_on);
} }
#ifdef CONFIG_PROC_SYSCTL #ifdef CONFIG_SYSCTL
static int sysctl_delayacct(const struct ctl_table *table, int write, void *buffer, static int sysctl_delayacct(const struct ctl_table *table, int write, void *buffer,
size_t *lenp, loff_t *ppos) size_t *lenp, loff_t *ppos)
{ {

View File

@ -4638,7 +4638,7 @@ void set_numabalancing_state(bool enabled)
__set_numabalancing_state(enabled); __set_numabalancing_state(enabled);
} }
#ifdef CONFIG_PROC_SYSCTL #ifdef CONFIG_SYSCTL
static void reset_memory_tiering(void) static void reset_memory_tiering(void)
{ {
struct pglist_data *pgdat; struct pglist_data *pgdat;
@ -4674,7 +4674,7 @@ static int sysctl_numa_balancing(const struct ctl_table *table, int write,
} }
return err; return err;
} }
#endif /* CONFIG_PROC_SYSCTL */ #endif /* CONFIG_SYSCTL */
#endif /* CONFIG_NUMA_BALANCING */ #endif /* CONFIG_NUMA_BALANCING */
#ifdef CONFIG_SCHEDSTATS #ifdef CONFIG_SCHEDSTATS
@ -4718,7 +4718,7 @@ static int __init setup_schedstats(char *str)
} }
__setup("schedstats=", setup_schedstats); __setup("schedstats=", setup_schedstats);
#ifdef CONFIG_PROC_SYSCTL #ifdef CONFIG_SYSCTL
static int sysctl_schedstats(const struct ctl_table *table, int write, void *buffer, static int sysctl_schedstats(const struct ctl_table *table, int write, void *buffer,
size_t *lenp, loff_t *ppos) size_t *lenp, loff_t *ppos)
{ {
@ -4738,7 +4738,7 @@ static int sysctl_schedstats(const struct ctl_table *table, int write, void *buf
set_schedstats(state); set_schedstats(state);
return err; return err;
} }
#endif /* CONFIG_PROC_SYSCTL */ #endif /* CONFIG_SYSCTL */
#endif /* CONFIG_SCHEDSTATS */ #endif /* CONFIG_SCHEDSTATS */
#ifdef CONFIG_SYSCTL #ifdef CONFIG_SYSCTL

View File

@ -271,7 +271,7 @@ void rebuild_sched_domains_energy(void)
mutex_unlock(&sched_energy_mutex); mutex_unlock(&sched_energy_mutex);
} }
#ifdef CONFIG_PROC_SYSCTL #ifdef CONFIG_SYSCTL
static int sched_energy_aware_handler(const struct ctl_table *table, int write, static int sched_energy_aware_handler(const struct ctl_table *table, int write,
void *buffer, size_t *lenp, loff_t *ppos) void *buffer, size_t *lenp, loff_t *ppos)
{ {
@ -317,7 +317,7 @@ static int __init sched_energy_aware_sysctl_init(void)
} }
late_initcall(sched_energy_aware_sysctl_init); late_initcall(sched_energy_aware_sysctl_init);
#endif /* CONFIG_PROC_SYSCTL */ #endif /* CONFIG_SYSCTL */
static void free_pd(struct perf_domain *pd) static void free_pd(struct perf_domain *pd)
{ {

View File

@ -35,7 +35,7 @@ EXPORT_SYMBOL_GPL(sysctl_long_vals);
static const int ngroups_max = NGROUPS_MAX; static const int ngroups_max = NGROUPS_MAX;
static const int cap_last_cap = CAP_LAST_CAP; static const int cap_last_cap = CAP_LAST_CAP;
#ifdef CONFIG_PROC_SYSCTL #ifdef CONFIG_SYSCTL
/** /**
* enum sysctl_writes_mode - supported sysctl write modes * enum sysctl_writes_mode - supported sysctl write modes
@ -64,14 +64,14 @@ enum sysctl_writes_mode {
}; };
static enum sysctl_writes_mode sysctl_writes_strict = SYSCTL_WRITES_STRICT; static enum sysctl_writes_mode sysctl_writes_strict = SYSCTL_WRITES_STRICT;
#endif /* CONFIG_PROC_SYSCTL */ #endif /* CONFIG_SYSCTL */
#endif /* CONFIG_SYSCTL */ #endif /* CONFIG_SYSCTL */
/* /*
* /proc/sys support * /proc/sys support
*/ */
#ifdef CONFIG_PROC_SYSCTL #ifdef CONFIG_SYSCTL
static int _proc_do_string(char *data, int maxlen, int dir, static int _proc_do_string(char *data, int maxlen, int dir,
char *buffer, size_t *lenp, loff_t *ppos) char *buffer, size_t *lenp, loff_t *ppos)
@ -1265,7 +1265,7 @@ int proc_do_large_bitmap(const struct ctl_table *table, int dir,
return err; return err;
} }
#else /* CONFIG_PROC_SYSCTL */ #else /* CONFIG_SYSCTL */
int proc_dostring(const struct ctl_table *table, int dir, int proc_dostring(const struct ctl_table *table, int dir,
void *buffer, size_t *lenp, loff_t *ppos) void *buffer, size_t *lenp, loff_t *ppos)
@ -1364,7 +1364,7 @@ int proc_do_large_bitmap(const struct ctl_table *table, int dir,
return -ENOSYS; return -ENOSYS;
} }
#endif /* CONFIG_PROC_SYSCTL */ #endif /* CONFIG_SYSCTL */
#if defined(CONFIG_SYSCTL) #if defined(CONFIG_SYSCTL)
int proc_do_static_key(const struct ctl_table *table, int dir, int proc_do_static_key(const struct ctl_table *table, int dir,
@ -1398,7 +1398,7 @@ int proc_do_static_key(const struct ctl_table *table, int dir,
} }
static const struct ctl_table sysctl_subsys_table[] = { static const struct ctl_table sysctl_subsys_table[] = {
#ifdef CONFIG_PROC_SYSCTL #ifdef CONFIG_SYSCTL
{ {
.procname = "sysctl_writes_strict", .procname = "sysctl_writes_strict",
.data = &sysctl_writes_strict, .data = &sysctl_writes_strict,

View File

@ -98,7 +98,7 @@ void __init register_refined_jiffies(long cycles_per_second)
__clocksource_register(&refined_jiffies); __clocksource_register(&refined_jiffies);
} }
#ifdef CONFIG_PROC_SYSCTL #ifdef CONFIG_SYSCTL
static ulong mult_hz(const ulong val) static ulong mult_hz(const ulong val)
{ {
return val * HZ; return val * HZ;
@ -202,8 +202,7 @@ static int do_proc_ulong_conv_ms_jiffies(bool *negp, ulong *u_ptr, ulong *k_ptr,
sysctl_u2k_ulong_conv_ms, sysctl_k2u_ulong_conv_ms); sysctl_u2k_ulong_conv_ms, sysctl_k2u_ulong_conv_ms);
} }
#else // CONFIG_SYSCTL
#else // CONFIG_PROC_SYSCTL
static int do_proc_int_conv_jiffies(bool *negp, ulong *u_ptr, int *k_ptr, static int do_proc_int_conv_jiffies(bool *negp, ulong *u_ptr, int *k_ptr,
int dir, const struct ctl_table *tbl) int dir, const struct ctl_table *tbl)
{ {

View File

@ -13,7 +13,7 @@
#include <linux/wait.h> #include <linux/wait.h>
#include <linux/rwsem.h> #include <linux/rwsem.h>
#ifdef CONFIG_PROC_SYSCTL #ifdef CONFIG_SYSCTL
static void *get_uts(const struct ctl_table *table) static void *get_uts(const struct ctl_table *table)
{ {
@ -122,7 +122,7 @@ static const struct ctl_table uts_kern_table[] = {
}, },
}; };
#ifdef CONFIG_PROC_SYSCTL #ifdef CONFIG_SYSCTL
/* /*
* Notify userspace about a change in a certain entry of uts_kern_table, * Notify userspace about a change in a certain entry of uts_kern_table,
* identified by the parameter proc. * identified by the parameter proc.

View File

@ -2710,7 +2710,7 @@ config TEST_FIRMWARE
config TEST_SYSCTL config TEST_SYSCTL
tristate "sysctl test driver" tristate "sysctl test driver"
depends on PROC_SYSCTL depends on SYSCTL
help help
This builds the "test_sysctl" module. This driver enables to test the This builds the "test_sysctl" module. This driver enables to test the
proc sysctl interfaces available to drivers safely without affecting proc sysctl interfaces available to drivers safely without affecting

View File

@ -7,7 +7,7 @@
/* /*
* This module provides an interface to the proc sysctl interfaces. This * This module provides an interface to the proc sysctl interfaces. This
* driver requires CONFIG_PROC_SYSCTL. It will not normally be loaded by the * driver requires CONFIG_SYSCTL. It will not normally be loaded by the
* system unless explicitly requested by name. You can also build this driver * system unless explicitly requested by name. You can also build this driver
* into your kernel. * into your kernel.
*/ */

View File

@ -26,7 +26,7 @@ config NET_MPLS_GSO
config MPLS_ROUTING config MPLS_ROUTING
tristate "MPLS: routing support" tristate "MPLS: routing support"
depends on NET_IP_TUNNEL || NET_IP_TUNNEL=n depends on NET_IP_TUNNEL || NET_IP_TUNNEL=n
depends on PROC_SYSCTL depends on SYSCTL
help help
Add support for forwarding of mpls packets. Add support for forwarding of mpls packets.

View File

@ -118,7 +118,7 @@ CONFIG_OPENVSWITCH_GENEVE=m
CONFIG_OPENVSWITCH_GRE=m CONFIG_OPENVSWITCH_GRE=m
CONFIG_OPENVSWITCH_VXLAN=m CONFIG_OPENVSWITCH_VXLAN=m
CONFIG_PAGE_POOL_STATS=y CONFIG_PAGE_POOL_STATS=y
CONFIG_PROC_SYSCTL=y CONFIG_SYSCTL=y
CONFIG_PSAMPLE=m CONFIG_PSAMPLE=m
CONFIG_RPS=y CONFIG_RPS=y
CONFIG_SYN_COOKIES=y CONFIG_SYN_COOKIES=y

View File

@ -4,7 +4,7 @@ CONFIG_IPV6=y
CONFIG_NET_NS=y CONFIG_NET_NS=y
CONFIG_NET_SCH_FIFO=y CONFIG_NET_SCH_FIFO=y
CONFIG_NET_SCH_FQ=y CONFIG_NET_SCH_FQ=y
CONFIG_PROC_SYSCTL=y CONFIG_SYSCTL=y
CONFIG_SYN_COOKIES=y CONFIG_SYN_COOKIES=y
CONFIG_TCP_CONG_CUBIC=y CONFIG_TCP_CONG_CUBIC=y
CONFIG_TCP_MD5SIG=y CONFIG_TCP_MD5SIG=y

View File

@ -63,7 +63,7 @@ CONFIG_FILE_LOCKING=y
CONFIG_POSIX_TIMERS=y CONFIG_POSIX_TIMERS=y
CONFIG_DEVTMPFS=y CONFIG_DEVTMPFS=y
CONFIG_PROC_FS=y CONFIG_PROC_FS=y
CONFIG_PROC_SYSCTL=y CONFIG_SYSCTL=y
CONFIG_SYSFS=y CONFIG_SYSFS=y
CONFIG_TMPFS=y CONFIG_TMPFS=y
CONFIG_CONSOLE_LOGLEVEL_DEFAULT=15 CONFIG_CONSOLE_LOGLEVEL_DEFAULT=15