All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Alexey Gladkov <legion@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	Nathan Chancellor <nathan@kernel.org>,
	Nicolas Schier <nsc@kernel.org>
Cc: linux-kernel@vger.kernel.org
Subject: [RFC PATCH 1/1] sysctl: remove CONFIG_SYSCTL, it just mirrors CONFIG_PROC_SYSCTL
Date: Wed, 22 Jul 2026 14:44:46 +0200	[thread overview]
Message-ID: <amC7Pm5I6CMh7KpD@redhat.com> (raw)
In-Reply-To: <amC7F7oKFjYKcQW2@redhat.com>

CONFIG_SYSCTL used to make sense before 61a47c1ad3a4 ("sysctl: Remove
the sysctl system call"); it was selected by both CONFIG_SYSCTL_SYSCALL
and CONFIG_PROC_SYSCTL.

Today it is a hidden bool with no prompt and no default. The only way
to enable it is through CONFIG_PROC_SYSCTL, which selects it. This means
that CONFIG_SYSCTL=y if and only if CONFIG_PROC_SYSCTL=y.

Remove SYSCTL from init/Kconfig and s/CONFIG_SYSCTL/CONFIG_PROC_SYSCTL/
tree-wide.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
---
 arch/arm64/Kconfig                            |  2 +-
 arch/arm64/kernel/fpsimd.c                    | 12 +++++------
 arch/powerpc/kernel/idle.c                    |  2 +-
 arch/powerpc/platforms/pseries/mobility.c     |  4 ++--
 arch/riscv/kernel/vector.c                    |  6 +++---
 arch/x86/entry/vdso/vdso32-setup.c            |  4 ++--
 arch/x86/kernel/cpu/transmeta.c               |  2 +-
 drivers/base/firmware_loader/fallback_table.c |  4 ++--
 drivers/base/firmware_loader/sysfs.h          |  4 ++--
 drivers/cdrom/cdrom.c                         |  6 +++---
 drivers/char/random.c                         |  2 +-
 drivers/macintosh/Kconfig                     |  2 +-
 drivers/net/vrf.c                             |  2 +-
 drivers/parport/procfs.c                      |  2 +-
 drivers/scsi/Makefile                         |  2 +-
 drivers/scsi/scsi_priv.h                      |  4 ++--
 fs/Makefile                                   |  2 +-
 fs/aio.c                                      |  2 +-
 fs/cachefiles/Kconfig                         |  2 +-
 fs/coda/Makefile                              |  2 +-
 fs/coda/coda_int.h                            |  2 +-
 fs/coredump.c                                 |  4 ++--
 fs/dcache.c                                   |  2 +-
 fs/eventpoll.c                                |  4 ++--
 fs/exec.c                                     |  4 ++--
 fs/file_table.c                               |  2 +-
 fs/fuse/Makefile                              |  2 +-
 fs/fuse/fuse_i.h                              |  4 ++--
 fs/inode.c                                    |  2 +-
 fs/lockd/svc.c                                | 12 +++++------
 fs/locks.c                                    |  4 ++--
 fs/namei.c                                    |  4 ++--
 fs/namespace.c                                |  4 ++--
 fs/nfs/Makefile                               |  6 +++---
 fs/nfs/nfs4_fs.h                              |  2 +-
 fs/notify/dnotify/dnotify.c                   |  2 +-
 fs/notify/fanotify/fanotify_user.c            |  4 ++--
 fs/notify/inotify/inotify_user.c              |  4 ++--
 fs/ntfs/sysctl.c                              |  4 ++--
 fs/ntfs/sysctl.h                              |  4 ++--
 fs/pipe.c                                     |  4 ++--
 fs/proc/Kconfig                               |  1 -
 fs/verity/init.c                              |  6 +++---
 fs/xfs/Makefile                               |  2 +-
 fs/xfs/xfs_globals.c                          |  2 +-
 fs/xfs/xfs_sysctl.h                           |  4 ++--
 include/linux/coredump.h                      |  2 +-
 include/linux/mm.h                            |  2 +-
 include/linux/netdevice.h                     |  4 ++--
 include/linux/nfs_fs.h                        |  2 +-
 include/linux/pid_namespace.h                 |  6 +++---
 include/linux/sys_info.h                      |  2 +-
 include/linux/sysctl.h                        |  6 +++---
 include/linux/user_namespace.h                |  2 +-
 include/net/ip.h                              |  2 +-
 include/net/ip_vs.h                           | 20 +++++++++----------
 include/net/ipv6.h                            |  2 +-
 include/net/llc.h                             |  4 ++--
 include/net/ndisc.h                           |  2 +-
 include/net/net_namespace.h                   |  6 +++---
 include/net/netfilter/nf_conntrack.h          |  2 +-
 include/net/netfilter/nf_conntrack_l4proto.h  |  4 ++--
 include/net/netfilter/nf_hooks_lwtunnel.h     |  2 +-
 include/net/netns/core.h                      |  2 +-
 include/net/netns/ieee802154_6lowpan.h        |  2 +-
 include/net/netns/ipv4.h                      |  4 ++--
 include/net/netns/ipv6.h                      |  2 +-
 include/net/netns/netfilter.h                 |  2 +-
 include/net/netns/sctp.h                      |  2 +-
 include/net/netns/smc.h                       |  2 +-
 include/net/netns/xfrm.h                      |  2 +-
 include/net/sctp/sctp.h                       |  2 +-
 include/net/x25.h                             |  4 ++--
 include/net/xfrm.h                            |  2 +-
 init/Kconfig                                  |  7 ++-----
 io_uring/io_uring.c                           |  4 ++--
 kernel/Makefile                               |  2 +-
 kernel/acct.c                                 |  4 ++--
 kernel/bpf/syscall.c                          |  4 ++--
 kernel/exit.c                                 |  2 +-
 kernel/hung_task.c                            |  4 ++--
 kernel/kexec_core.c                           |  2 +-
 kernel/kprobes.c                              |  6 +++---
 kernel/kstack_erase.c                         |  4 ++--
 kernel/latencytop.c                           |  4 ++--
 kernel/locking/lockdep.c                      |  4 ++--
 kernel/panic.c                                |  2 +-
 kernel/pid.c                                  | 10 +++++-----
 kernel/pid_namespace.c                        |  2 +-
 kernel/pid_sysctl.h                           |  2 +-
 kernel/printk/Makefile                        |  2 +-
 kernel/printk/internal.h                      |  2 +-
 kernel/printk/printk.c                        |  4 ++--
 kernel/reboot.c                               |  4 ++--
 kernel/sched/autogroup.c                      |  6 +++---
 kernel/sched/core.c                           |  8 ++++----
 kernel/sched/deadline.c                       |  4 ++--
 kernel/sched/fair.c                           |  4 ++--
 kernel/sched/rt.c                             |  8 ++++----
 kernel/seccomp.c                              |  4 ++--
 kernel/signal.c                               |  4 ++--
 kernel/sysctl.c                               |  8 ++++----
 kernel/time/timer.c                           |  4 ++--
 kernel/trace/ftrace.c                         |  2 +-
 kernel/ucount.c                               | 10 +++++-----
 kernel/umh.c                                  |  4 ++--
 kernel/watchdog.c                             |  6 +++---
 lib/alloc_tag.c                               |  6 +++---
 lib/sys_info.c                                |  2 +-
 mm/hugetlb_internal.h                         |  2 +-
 mm/hugetlb_sysctl.c                           |  4 ++--
 mm/memfd.c                                    |  2 +-
 mm/mmap.c                                     |  6 +++---
 mm/oom_kill.c                                 |  4 ++--
 mm/page-writeback.c                           |  8 ++++----
 mm/userfaultfd.c                              |  4 ++--
 mm/util.c                                     |  4 ++--
 net/Makefile                                  |  2 +-
 net/bridge/br_netfilter_hooks.c               | 10 +++++-----
 net/bridge/br_netfilter_ipv6.c                |  2 +-
 net/bridge/br_nf_core.c                       |  2 +-
 net/core/Makefile                             |  2 +-
 net/core/neighbour.c                          |  6 +++---
 net/core/net-sysfs.c                          |  2 +-
 net/ieee802154/6lowpan/reassembly.c           |  2 +-
 net/ipv4/Makefile                             |  2 +-
 net/ipv4/af_inet.c                            |  4 ++--
 net/ipv4/arp.c                                |  4 ++--
 net/ipv4/devinet.c                            | 18 ++++++++---------
 net/ipv4/ip_fragment.c                        |  2 +-
 net/ipv4/route.c                              |  8 ++++----
 net/ipv4/xfrm4_policy.c                       |  4 ++--
 net/ipv6/Makefile                             |  2 +-
 net/ipv6/addrconf.c                           | 14 ++++++-------
 net/ipv6/af_inet6.c                           |  4 ++--
 net/ipv6/icmp.c                               |  4 ++--
 net/ipv6/ndisc.c                              | 10 +++++-----
 net/ipv6/netfilter/nf_conntrack_reasm.c       |  2 +-
 net/ipv6/reassembly.c                         |  2 +-
 net/ipv6/route.c                              |  4 ++--
 net/ipv6/xfrm6_policy.c                       |  4 ++--
 net/llc/Makefile                              |  2 +-
 net/mptcp/ctrl.c                              | 10 +++++-----
 net/netfilter/ipvs/ip_vs_conn.c               |  6 +++---
 net/netfilter/ipvs/ip_vs_core.c               |  2 +-
 net/netfilter/ipvs/ip_vs_ctl.c                |  8 ++++----
 net/netfilter/ipvs/ip_vs_lblc.c               |  6 +++---
 net/netfilter/ipvs/ip_vs_lblcr.c              |  6 +++---
 net/netfilter/nf_conntrack_proto.c            |  2 +-
 net/netfilter/nf_conntrack_standalone.c       | 12 +++++------
 net/netfilter/nf_hooks_lwtunnel.c             |  4 ++--
 net/netfilter/nf_log.c                        |  4 ++--
 net/rxrpc/Kconfig                             |  2 +-
 net/rxrpc/Makefile                            |  2 +-
 net/rxrpc/ar-internal.h                       |  2 +-
 net/sctp/Makefile                             |  2 +-
 net/smc/Makefile                              |  2 +-
 net/smc/smc_sysctl.h                          |  4 ++--
 net/sunrpc/Kconfig                            |  2 +-
 net/sunrpc/Makefile                           |  2 +-
 net/tipc/Makefile                             |  2 +-
 net/tipc/core.h                               |  2 +-
 net/unix/Makefile                             |  2 +-
 net/unix/af_unix.h                            |  2 +-
 net/x25/Makefile                              |  2 +-
 net/xfrm/xfrm_sysctl.c                        |  2 +-
 security/apparmor/lsm.c                       |  4 ++--
 security/keys/Makefile                        |  2 +-
 security/loadpin/loadpin.c                    |  4 ++--
 security/yama/yama_lsm.c                      |  4 ++--
 170 files changed, 333 insertions(+), 337 deletions(-)

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index b3afe0688919..9b40c604fd17 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -1825,7 +1825,7 @@ config COMPAT_ALIGNMENT_FIXUPS
 
 menuconfig ARMV8_DEPRECATED
 	bool "Emulate deprecated/obsolete ARMv8 instructions"
-	depends on SYSCTL
+	depends on PROC_SYSCTL
 	help
 	  Legacy software support may require certain instructions
 	  that have been deprecated or obsoleted in the architecture.
diff --git a/arch/arm64/kernel/fpsimd.c b/arch/arm64/kernel/fpsimd.c
index e7f1682a3059..cfd1b13a3d21 100644
--- a/arch/arm64/kernel/fpsimd.c
+++ b/arch/arm64/kernel/fpsimd.c
@@ -544,7 +544,7 @@ static unsigned int find_supported_vector_length(enum vec_type type,
 	return sve_vl_from_vq(__bit_to_vq(bit));
 }
 
-#if defined(CONFIG_ARM64_SVE) && defined(CONFIG_SYSCTL)
+#if defined(CONFIG_ARM64_SVE) && defined(CONFIG_PROC_SYSCTL)
 
 static int vec_proc_do_default_vl(const struct ctl_table *table, int write,
 				  void *buffer, size_t *lenp, loff_t *ppos)
@@ -591,11 +591,11 @@ static int __init sve_sysctl_init(void)
 	return 0;
 }
 
-#else /* ! (CONFIG_ARM64_SVE && CONFIG_SYSCTL) */
+#else /* ! (CONFIG_ARM64_SVE && CONFIG_PROC_SYSCTL) */
 static int __init sve_sysctl_init(void) { return 0; }
-#endif /* ! (CONFIG_ARM64_SVE && CONFIG_SYSCTL) */
+#endif /* ! (CONFIG_ARM64_SVE && CONFIG_PROC_SYSCTL) */
 
-#if defined(CONFIG_ARM64_SME) && defined(CONFIG_SYSCTL)
+#if defined(CONFIG_ARM64_SME) && defined(CONFIG_PROC_SYSCTL)
 static const struct ctl_table sme_default_vl_table[] = {
 	{
 		.procname	= "sme_default_vector_length",
@@ -614,9 +614,9 @@ static int __init sme_sysctl_init(void)
 	return 0;
 }
 
-#else /* ! (CONFIG_ARM64_SME && CONFIG_SYSCTL) */
+#else /* ! (CONFIG_ARM64_SME && CONFIG_PROC_SYSCTL) */
 static int __init sme_sysctl_init(void) { return 0; }
-#endif /* ! (CONFIG_ARM64_SME && CONFIG_SYSCTL) */
+#endif /* ! (CONFIG_ARM64_SME && CONFIG_PROC_SYSCTL) */
 
 #define ZREG(sve_state, vq, n) ((char *)(sve_state) +		\
 	(SVE_SIG_ZREG_OFFSET(vq, n) - SVE_SIG_REGS_OFFSET))
diff --git a/arch/powerpc/kernel/idle.c b/arch/powerpc/kernel/idle.c
index e527cd3ef128..22c7c0d6e430 100644
--- a/arch/powerpc/kernel/idle.c
+++ b/arch/powerpc/kernel/idle.c
@@ -93,7 +93,7 @@ void power4_idle(void)
 }
 #endif
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 /*
  * Register the sysctl to set/clear powersave_nap.
  */
diff --git a/arch/powerpc/platforms/pseries/mobility.c b/arch/powerpc/platforms/pseries/mobility.c
index b5c2abd12432..5e5362d8882f 100644
--- a/arch/powerpc/platforms/pseries/mobility.c
+++ b/arch/powerpc/platforms/pseries/mobility.c
@@ -53,7 +53,7 @@ struct update_props_workarea {
 #ifdef CONFIG_PPC_WATCHDOG
 static unsigned int nmi_wd_lpm_factor = 200;
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 static const struct ctl_table nmi_wd_lpm_factor_ctl_table[] = {
 	{
 		.procname	= "nmi_wd_lpm_factor",
@@ -71,7 +71,7 @@ static int __init register_nmi_wd_lpm_factor_sysctl(void)
 	return 0;
 }
 device_initcall(register_nmi_wd_lpm_factor_sysctl);
-#endif /* CONFIG_SYSCTL */
+#endif /* CONFIG_PROC_SYSCTL */
 #endif /* CONFIG_PPC_WATCHDOG */
 
 static int mobility_rtas_call(int token, char *buf, s32 scope)
diff --git a/arch/riscv/kernel/vector.c b/arch/riscv/kernel/vector.c
index b112166d51e9..2b5dcff5f01f 100644
--- a/arch/riscv/kernel/vector.c
+++ b/arch/riscv/kernel/vector.c
@@ -301,7 +301,7 @@ long riscv_v_vstate_ctrl_set_current(unsigned long arg)
 	return -EINVAL;
 }
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 
 static const struct ctl_table riscv_v_default_vstate_table[] = {
 	{
@@ -321,9 +321,9 @@ static int __init riscv_v_sysctl_init(void)
 	return 0;
 }
 
-#else /* ! CONFIG_SYSCTL */
+#else /* ! CONFIG_PROC_SYSCTL */
 static int __init riscv_v_sysctl_init(void) { return 0; }
-#endif /* ! CONFIG_SYSCTL */
+#endif /* ! CONFIG_PROC_SYSCTL */
 
 static int __init riscv_v_init(void)
 {
diff --git a/arch/x86/entry/vdso/vdso32-setup.c b/arch/x86/entry/vdso/vdso32-setup.c
index 8894013eea1d..7b5d678164b5 100644
--- a/arch/x86/entry/vdso/vdso32-setup.c
+++ b/arch/x86/entry/vdso/vdso32-setup.c
@@ -52,7 +52,7 @@ __setup_param("vdso=", vdso_setup, vdso32_setup, 0);
 #endif
 
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 #include <linux/sysctl.h>
 
 static const struct ctl_table vdso_table[] = {
@@ -82,5 +82,5 @@ static __init int ia32_binfmt_init(void)
 	return 0;
 }
 __initcall(ia32_binfmt_init);
-#endif /* CONFIG_SYSCTL */
+#endif /* CONFIG_PROC_SYSCTL */
 
diff --git a/arch/x86/kernel/cpu/transmeta.c b/arch/x86/kernel/cpu/transmeta.c
index 1fdcd69c625c..cfeb92b6db28 100644
--- a/arch/x86/kernel/cpu/transmeta.c
+++ b/arch/x86/kernel/cpu/transmeta.c
@@ -94,7 +94,7 @@ static void init_transmeta(struct cpuinfo_x86 *c)
 	/* All Transmeta CPUs have a constant TSC */
 	set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC);
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 	/*
 	 * randomize_va_space slows us down enormously;
 	 * it probably triggers retranslation of x86->native bytecode
diff --git a/drivers/base/firmware_loader/fallback_table.c b/drivers/base/firmware_loader/fallback_table.c
index c8afc501a8a4..b38345b04843 100644
--- a/drivers/base/firmware_loader/fallback_table.c
+++ b/drivers/base/firmware_loader/fallback_table.c
@@ -24,7 +24,7 @@ struct firmware_fallback_config fw_fallback_config = {
 };
 EXPORT_SYMBOL_NS_GPL(fw_fallback_config, "FIRMWARE_LOADER_PRIVATE");
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 static const struct ctl_table firmware_config_table[] = {
 	{
 		.procname	= "force_sysfs_fallback",
@@ -65,4 +65,4 @@ void unregister_firmware_config_sysctl(void)
 }
 EXPORT_SYMBOL_NS_GPL(unregister_firmware_config_sysctl, "FIRMWARE_LOADER_PRIVATE");
 
-#endif /* CONFIG_SYSCTL */
+#endif /* CONFIG_PROC_SYSCTL */
diff --git a/drivers/base/firmware_loader/sysfs.h b/drivers/base/firmware_loader/sysfs.h
index 1cabea544a40..ef4088bd7e6e 100644
--- a/drivers/base/firmware_loader/sysfs.h
+++ b/drivers/base/firmware_loader/sysfs.h
@@ -51,7 +51,7 @@ static inline void __fw_fallback_set_timeout(int timeout)
 #ifdef CONFIG_FW_LOADER_SYSFS
 int register_sysfs_loader(void);
 void unregister_sysfs_loader(void);
-#if defined(CONFIG_FW_LOADER_USER_HELPER) && defined(CONFIG_SYSCTL)
+#if defined(CONFIG_FW_LOADER_USER_HELPER) && defined(CONFIG_PROC_SYSCTL)
 int register_firmware_config_sysctl(void);
 void unregister_firmware_config_sysctl(void);
 #else
@@ -61,7 +61,7 @@ static inline int register_firmware_config_sysctl(void)
 }
 
 static inline void unregister_firmware_config_sysctl(void) { }
-#endif /* CONFIG_FW_LOADER_USER_HELPER && CONFIG_SYSCTL */
+#endif /* CONFIG_FW_LOADER_USER_HELPER && CONFIG_PROC_SYSCTL */
 #else /* CONFIG_FW_LOADER_SYSFS */
 static inline int register_sysfs_loader(void)
 {
diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c
index 62934cf4b10d..af6f11b87475 100644
--- a/drivers/cdrom/cdrom.c
+++ b/drivers/cdrom/cdrom.c
@@ -3429,7 +3429,7 @@ int cdrom_ioctl(struct cdrom_device_info *cdi, struct block_device *bdev,
 }
 EXPORT_SYMBOL(cdrom_ioctl);
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 
 #define CDROM_STR_SIZE 1000
 
@@ -3699,7 +3699,7 @@ static void cdrom_sysctl_unregister(void)
 	unregister_sysctl_table(cdrom_sysctl_header);
 }
 
-#else /* CONFIG_SYSCTL */
+#else /* CONFIG_PROC_SYSCTL */
 
 static void cdrom_sysctl_register(void)
 {
@@ -3709,7 +3709,7 @@ static void cdrom_sysctl_unregister(void)
 {
 }
 
-#endif /* CONFIG_SYSCTL */
+#endif /* CONFIG_PROC_SYSCTL */
 
 static int __init cdrom_init(void)
 {
diff --git a/drivers/char/random.c b/drivers/char/random.c
index b4da1fb976c1..45f07c69fb79 100644
--- a/drivers/char/random.c
+++ b/drivers/char/random.c
@@ -1606,7 +1606,7 @@ const struct file_operations urandom_fops = {
  *
  ********************************************************************/
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 
 #include <linux/sysctl.h>
 
diff --git a/drivers/macintosh/Kconfig b/drivers/macintosh/Kconfig
index d00e713c1092..71a3c553827f 100644
--- a/drivers/macintosh/Kconfig
+++ b/drivers/macintosh/Kconfig
@@ -159,7 +159,7 @@ config INPUT_ADBHID
 
 config MAC_EMUMOUSEBTN
 	tristate "Support for mouse button 2+3 emulation"
-	depends on SYSCTL && INPUT
+	depends on PROC_SYSCTL && INPUT
 	help
 	  This provides generic support for emulating the 2nd and 3rd mouse
 	  button with keypresses.  If you say Y here, the emulation is still
diff --git a/drivers/net/vrf.c b/drivers/net/vrf.c
index 46209917ae4d..8a9da5b85e2b 100644
--- a/drivers/net/vrf.c
+++ b/drivers/net/vrf.c
@@ -1778,7 +1778,7 @@ static int vrf_map_init(struct vrf_map *vmap)
 	return 0;
 }
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 static bool vrf_strict_mode(struct vrf_map *vmap)
 {
 	bool strict_mode;
diff --git a/drivers/parport/procfs.c b/drivers/parport/procfs.c
index 3880460e67f2..045e7ceed379 100644
--- a/drivers/parport/procfs.c
+++ b/drivers/parport/procfs.c
@@ -26,7 +26,7 @@
 
 #include <linux/uaccess.h>
 
-#if defined(CONFIG_SYSCTL) && defined(CONFIG_PROC_FS)
+#if defined(CONFIG_PROC_SYSCTL) && defined(CONFIG_PROC_FS)
 
 #define PARPORT_MIN_TIMESLICE_VALUE 1ul 
 #define PARPORT_MAX_TIMESLICE_VALUE ((unsigned long) HZ)
diff --git a/drivers/scsi/Makefile b/drivers/scsi/Makefile
index 842c254bb226..d6c5a92a2bc3 100644
--- a/drivers/scsi/Makefile
+++ b/drivers/scsi/Makefile
@@ -161,7 +161,7 @@ scsi_mod-$(CONFIG_SCSI_CONSTANTS) += constants.o
 scsi_mod-$(CONFIG_SCSI_DMA)	+= scsi_lib_dma.o
 scsi_mod-y			+= scsi_scan.o scsi_sysfs.o scsi_devinfo.o
 scsi_mod-$(CONFIG_SCSI_NETLINK)	+= scsi_netlink.o
-scsi_mod-$(CONFIG_SYSCTL)	+= scsi_sysctl.o
+scsi_mod-$(CONFIG_PROC_SYSCTL)	+= scsi_sysctl.o
 scsi_mod-$(CONFIG_SCSI_PROC_FS)	+= scsi_proc.o
 scsi_mod-$(CONFIG_BLK_DEBUG_FS)	+= scsi_debugfs.o
 scsi_mod-y			+= scsi_trace.o scsi_logging.o
diff --git a/drivers/scsi/scsi_priv.h b/drivers/scsi/scsi_priv.h
index 3dbf2ca59536..6f278477df0c 100644
--- a/drivers/scsi/scsi_priv.h
+++ b/drivers/scsi/scsi_priv.h
@@ -141,13 +141,13 @@ extern void scsi_forget_host(struct Scsi_Host *);
 struct scsi_device *scsi_get_pseudo_sdev(struct Scsi_Host *);
 
 /* scsi_sysctl.c */
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 extern int scsi_init_sysctl(void);
 extern void scsi_exit_sysctl(void);
 #else
 # define scsi_init_sysctl()		(0)
 # define scsi_exit_sysctl()		do { } while (0)
-#endif /* CONFIG_SYSCTL */
+#endif /* CONFIG_PROC_SYSCTL */
 
 /* scsi_sysfs.c */
 extern int scsi_sysfs_add_sdev(struct scsi_device *);
diff --git a/fs/Makefile b/fs/Makefile
index 89a8a9d207d1..833e8c51df24 100644
--- a/fs/Makefile
+++ b/fs/Makefile
@@ -44,7 +44,7 @@ obj-$(CONFIG_FS_MBCACHE)	+= mbcache.o
 obj-$(CONFIG_FS_POSIX_ACL)	+= posix_acl.o
 obj-$(CONFIG_NFS_COMMON)	+= nfs_common/
 obj-$(CONFIG_COREDUMP)		+= coredump.o
-obj-$(CONFIG_SYSCTL)		+= drop_caches.o sysctls.o
+obj-$(CONFIG_PROC_SYSCTL)	+= drop_caches.o sysctls.o
 
 obj-$(CONFIG_FHANDLE)		+= fhandle.o
 obj-y				+= iomap/
diff --git a/fs/aio.c b/fs/aio.c
index f57fa21a2503..de54dbdf4562 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -234,7 +234,7 @@ static DEFINE_SPINLOCK(aio_nr_lock);
 static unsigned long aio_nr;		/* current system wide number of aio requests */
 static unsigned long aio_max_nr = 0x10000; /* system wide maximum number of aio requests */
 /*----end sysctl variables---*/
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 static const struct ctl_table aio_sysctls[] = {
 	{
 		.procname	= "aio-nr",
diff --git a/fs/cachefiles/Kconfig b/fs/cachefiles/Kconfig
index c5a070550ee3..14b24c72df78 100644
--- a/fs/cachefiles/Kconfig
+++ b/fs/cachefiles/Kconfig
@@ -22,7 +22,7 @@ config CACHEFILES_DEBUG
 
 config CACHEFILES_ERROR_INJECTION
 	bool "Provide error injection for cachefiles"
-	depends on CACHEFILES && SYSCTL
+	depends on CACHEFILES && PROC_SYSCTL
 	help
 	  This permits error injection to be enabled in cachefiles whilst a
 	  cache is in service.
diff --git a/fs/coda/Makefile b/fs/coda/Makefile
index 78befb8369c9..f6e6f2c151cb 100644
--- a/fs/coda/Makefile
+++ b/fs/coda/Makefile
@@ -7,7 +7,7 @@ obj-$(CONFIG_CODA_FS) += coda.o
 
 coda-objs := psdev.o cache.o cnode.o inode.o dir.o file.o upcall.o \
 	     coda_linux.o symlink.o pioctl.o
-coda-$(CONFIG_SYSCTL) += sysctl.o
+coda-$(CONFIG_PROC_SYSCTL) += sysctl.o
 
 # If you want debugging output, please uncomment the following line.
 
diff --git a/fs/coda/coda_int.h b/fs/coda/coda_int.h
index f82b59c9dd28..f9a7cca7bf4a 100644
--- a/fs/coda/coda_int.h
+++ b/fs/coda/coda_int.h
@@ -14,7 +14,7 @@ void coda_destroy_inodecache(void);
 int __init coda_init_inodecache(void);
 int coda_fsync(struct file *coda_file, loff_t start, loff_t end, int datasync);
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 void coda_sysctl_init(void);
 void coda_sysctl_clean(void);
 #else
diff --git a/fs/coredump.c b/fs/coredump.c
index e68a76ff92a3..fc37db4ef408 100644
--- a/fs/coredump.c
+++ b/fs/coredump.c
@@ -1409,7 +1409,7 @@ int dump_align(struct coredump_params *cprm, int align)
 }
 EXPORT_SYMBOL(dump_align);
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 
 void validate_coredump_safety(void)
 {
@@ -1553,7 +1553,7 @@ static int __init init_fs_coredump_sysctls(void)
 	return 0;
 }
 fs_initcall(init_fs_coredump_sysctls);
-#endif /* CONFIG_SYSCTL */
+#endif /* CONFIG_PROC_SYSCTL */
 
 /*
  * The purpose of always_dump_vma() is to make sure that special kernel mappings
diff --git a/fs/dcache.c b/fs/dcache.c
index 3e9af9de7074..ca1bd17b397d 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -144,7 +144,7 @@ static DEFINE_PER_CPU(long, nr_dentry_unused);
 static DEFINE_PER_CPU(long, nr_dentry_negative);
 static int dentry_negative_policy;
 
-#if defined(CONFIG_SYSCTL) && defined(CONFIG_PROC_FS)
+#if defined(CONFIG_PROC_SYSCTL) && defined(CONFIG_PROC_FS)
 /* Statistics gathering. */
 static struct dentry_stat_t dentry_stat = {
 	.age_limit = 45,
diff --git a/fs/eventpoll.c b/fs/eventpoll.c
index 0e65c7431dfc..ed6774225c48 100644
--- a/fs/eventpoll.c
+++ b/fs/eventpoll.c
@@ -500,7 +500,7 @@ static void unlist_file(struct epitems_head *head)
 	free_ephead(to_free);
 }
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 
 #include <linux/sysctl.h>
 
@@ -525,7 +525,7 @@ static void __init epoll_sysctls_init(void)
 }
 #else
 #define epoll_sysctls_init() do { } while (0)
-#endif /* CONFIG_SYSCTL */
+#endif /* CONFIG_PROC_SYSCTL */
 
 static const struct file_operations eventpoll_fops;
 
diff --git a/fs/exec.c b/fs/exec.c
index d5993cedc829..01773c7ec79f 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1989,7 +1989,7 @@ COMPAT_SYSCALL_DEFINE5(execveat, int, fd,
 }
 #endif
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 
 static int proc_dointvec_minmax_coredump(const struct ctl_table *table, int write,
 		void *buffer, size_t *lenp, loff_t *ppos)
@@ -2022,7 +2022,7 @@ static int __init init_fs_exec_sysctls(void)
 }
 
 fs_initcall(init_fs_exec_sysctls);
-#endif /* CONFIG_SYSCTL */
+#endif /* CONFIG_PROC_SYSCTL */
 
 #ifdef CONFIG_EXEC_KUNIT_TEST
 #include "tests/exec_kunit.c"
diff --git a/fs/file_table.c b/fs/file_table.c
index c68b8c0a4097..ff644f378d2b 100644
--- a/fs/file_table.c
+++ b/fs/file_table.c
@@ -122,7 +122,7 @@ unsigned long get_max_files(void)
 }
 EXPORT_SYMBOL_GPL(get_max_files);
 
-#if defined(CONFIG_SYSCTL) && defined(CONFIG_PROC_FS)
+#if defined(CONFIG_PROC_SYSCTL) && defined(CONFIG_PROC_FS)
 
 /*
  * Handle nr_files sysctl
diff --git a/fs/fuse/Makefile b/fs/fuse/Makefile
index 245e67852b03..30ace163ba9b 100644
--- a/fs/fuse/Makefile
+++ b/fs/fuse/Makefile
@@ -16,7 +16,7 @@ fuse-y += poll.o notify.o
 fuse-y += iomode.o
 fuse-$(CONFIG_FUSE_DAX) += dax.o
 fuse-$(CONFIG_FUSE_PASSTHROUGH) += passthrough.o backing.o
-fuse-$(CONFIG_SYSCTL) += sysctl.o
+fuse-$(CONFIG_PROC_SYSCTL) += sysctl.o
 fuse-$(CONFIG_FUSE_IO_URING) += dev_uring.o
 
 virtiofs-y := virtio_fs.o
diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h
index 85f738c53122..6e8ec8e37f7e 100644
--- a/fs/fuse/fuse_i.h
+++ b/fs/fuse/fuse_i.h
@@ -1321,12 +1321,12 @@ ssize_t fuse_passthrough_splice_write(struct pipe_inode_info *pipe,
 				      size_t len, unsigned int flags);
 ssize_t fuse_passthrough_mmap(struct file *file, struct vm_area_struct *vma);
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 extern int fuse_sysctl_register(void);
 extern void fuse_sysctl_unregister(void);
 #else
 #define fuse_sysctl_register()		(0)
 #define fuse_sysctl_unregister()	do { } while (0)
-#endif /* CONFIG_SYSCTL */
+#endif /* CONFIG_PROC_SYSCTL */
 
 #endif /* _FS_FUSE_I_H */
diff --git a/fs/inode.c b/fs/inode.c
index 31c5b9ee3a81..512d5373b9a5 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -166,7 +166,7 @@ late_initcall(mg_debugfs_init);
 /*
  * Handle nr_inode sysctl
  */
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 /*
  * Statistics gathering..
  */
diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c
index 490551369ef2..ca7102fd6682 100644
--- a/fs/lockd/svc.c
+++ b/fs/lockd/svc.c
@@ -78,7 +78,7 @@ static const unsigned long	nlm_grace_period_max = 240;
 static const unsigned long	nlm_timeout_min = 3;
 static const unsigned long	nlm_timeout_max = 20;
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 static const int		nlm_port_min = 0, nlm_port_max = 65535;
 static struct ctl_table_header * nlm_sysctl_table;
 #endif
@@ -420,7 +420,7 @@ lockd_down(struct net *net)
 }
 EXPORT_SYMBOL_GPL(lockd_down);
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 
 /*
  * Sysctl parameters (same as module parameters, different interface).
@@ -480,7 +480,7 @@ static const struct ctl_table nlm_sysctls[] = {
 	},
 };
 
-#endif	/* CONFIG_SYSCTL */
+#endif	/* CONFIG_PROC_SYSCTL */
 
 /*
  * Module (and sysfs) parameters.
@@ -593,7 +593,7 @@ static int __init init_nlm(void)
 {
 	int err;
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 	err = -ENOMEM;
 	nlm_sysctl_table = register_sysctl("fs/nfs", nlm_sysctls);
 	if (nlm_sysctl_table == NULL)
@@ -618,7 +618,7 @@ static int __init init_nlm(void)
 err_netlink:
 	unregister_pernet_subsys(&lockd_net_ops);
 err_pernet:
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 	unregister_sysctl_table(nlm_sysctl_table);
 err_sysctl:
 #endif
@@ -632,7 +632,7 @@ static void __exit exit_nlm(void)
 	genl_unregister_family(&lockd_nl_family);
 	lockd_remove_procfs();
 	unregister_pernet_subsys(&lockd_net_ops);
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 	unregister_sysctl_table(nlm_sysctl_table);
 #endif
 }
diff --git a/fs/locks.c b/fs/locks.c
index 6e4ff7fcec05..a93696da7810 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -96,7 +96,7 @@ static int target_leasetype(struct file_lease *fl)
 static int leases_enable = 1;
 static int lease_break_time = 45;
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 static const struct ctl_table locks_sysctls[] = {
 	{
 		.procname	= "leases-enable",
@@ -122,7 +122,7 @@ static int __init init_fs_locks_sysctls(void)
 	return 0;
 }
 early_initcall(init_fs_locks_sysctls);
-#endif /* CONFIG_SYSCTL */
+#endif /* CONFIG_PROC_SYSCTL */
 
 /*
  * The global file_lock_list is only used for displaying /proc/locks, so we
diff --git a/fs/namei.c b/fs/namei.c
index 19ce43c9a6e6..37b863c15b14 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1206,7 +1206,7 @@ static int sysctl_protected_hardlinks __read_mostly;
 static int sysctl_protected_fifos __read_mostly;
 static int sysctl_protected_regular __read_mostly;
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 static const struct ctl_table namei_sysctls[] = {
 	{
 		.procname	= "protected_symlinks",
@@ -1253,7 +1253,7 @@ static int __init init_fs_namei_sysctls(void)
 }
 fs_initcall(init_fs_namei_sysctls);
 
-#endif /* CONFIG_SYSCTL */
+#endif /* CONFIG_PROC_SYSCTL */
 
 /**
  * may_follow_link - Check symlink following for unsafe situations
diff --git a/fs/namespace.c b/fs/namespace.c
index 3d5cd5bf3b05..20dec14b9890 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -6533,7 +6533,7 @@ const struct proc_ns_operations mntns_operations = {
 	.owner		= mntns_owner,
 };
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 static const struct ctl_table fs_namespace_sysctls[] = {
 	{
 		.procname	= "mount-max",
@@ -6552,4 +6552,4 @@ static int __init init_fs_namespace_sysctls(void)
 }
 fs_initcall(init_fs_namespace_sysctls);
 
-#endif /* CONFIG_SYSCTL */
+#endif /* CONFIG_PROC_SYSCTL */
diff --git a/fs/nfs/Makefile b/fs/nfs/Makefile
index c895521f27f3..aabef479b4d6 100644
--- a/fs/nfs/Makefile
+++ b/fs/nfs/Makefile
@@ -10,8 +10,8 @@ nfs-y 			:= client.o dir.o file.o getroot.o inode.o super.o \
 			   io.o direct.o pagelist.o read.o symlink.o unlink.o \
 			   write.o namespace.o mount_clnt.o nfstrace.o \
 			   export.o sysfs.o fs_context.o
-nfs-$(CONFIG_ROOT_NFS)	+= nfsroot.o
-nfs-$(CONFIG_SYSCTL)	+= sysctl.o
+nfs-$(CONFIG_ROOT_NFS)	  += nfsroot.o
+nfs-$(CONFIG_PROC_SYSCTL) += sysctl.o
 nfs-$(CONFIG_NFS_FSCACHE) += fscache.o
 nfs-$(CONFIG_NFS_LOCALIO) += localio.o
 
@@ -29,7 +29,7 @@ nfsv4-y := nfs4proc.o nfs4xdr.o nfs4state.o nfs4renewd.o nfs4super.o nfs4file.o
 	  nfs4namespace.o nfs4getroot.o nfs4client.o nfs4session.o \
 	  dns_resolve.o nfs4trace.o pnfs.o pnfs_dev.o pnfs_nfs.o
 nfsv4-$(CONFIG_NFS_USE_LEGACY_DNS) += cache_lib.o
-nfsv4-$(CONFIG_SYSCTL)	+= nfs4sysctl.o
+nfsv4-$(CONFIG_PROC_SYSCTL)	+= nfs4sysctl.o
 nfsv4-$(CONFIG_NFS_V4_0)	+= nfs40client.o nfs40proc.o
 nfsv4-$(CONFIG_NFS_V4_2)	+= nfs42proc.o nfs42xattr.o
 
diff --git a/fs/nfs/nfs4_fs.h b/fs/nfs/nfs4_fs.h
index b48e5b87cb2a..abc1878572df 100644
--- a/fs/nfs/nfs4_fs.h
+++ b/fs/nfs/nfs4_fs.h
@@ -562,7 +562,7 @@ extern int nfs4_try_get_tree(struct fs_context *);
 extern int nfs4_get_referral_tree(struct fs_context *);
 
 /* nfs4sysctl.c */
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 int nfs4_register_sysctl(void);
 void nfs4_unregister_sysctl(void);
 #else
diff --git a/fs/notify/dnotify/dnotify.c b/fs/notify/dnotify/dnotify.c
index 9fb73bafd41d..0b2b8c406d75 100644
--- a/fs/notify/dnotify/dnotify.c
+++ b/fs/notify/dnotify/dnotify.c
@@ -19,7 +19,7 @@
 #include <linux/fsnotify_backend.h>
 
 static int dir_notify_enable __read_mostly = 1;
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 static const struct ctl_table dnotify_sysctls[] = {
 	{
 		.procname	= "dir-notify-enable",
diff --git a/fs/notify/fanotify/fanotify_user.c b/fs/notify/fanotify/fanotify_user.c
index b604e3da58ad..d8c0e1560358 100644
--- a/fs/notify/fanotify/fanotify_user.c
+++ b/fs/notify/fanotify/fanotify_user.c
@@ -53,7 +53,7 @@
 static int fanotify_max_queued_events __read_mostly;
 static int perm_group_timeout __read_mostly;
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 
 #include <linux/sysctl.h>
 
@@ -103,7 +103,7 @@ static void __init fanotify_sysctls_init(void)
 }
 #else
 #define fanotify_sysctls_init() do { } while (0)
-#endif /* CONFIG_SYSCTL */
+#endif /* CONFIG_PROC_SYSCTL */
 
 static LIST_HEAD(perm_group_list);
 static DEFINE_SPINLOCK(perm_group_lock);
diff --git a/fs/notify/inotify/inotify_user.c b/fs/notify/inotify/inotify_user.c
index ed37491c1618..e084d5c01823 100644
--- a/fs/notify/inotify/inotify_user.c
+++ b/fs/notify/inotify/inotify_user.c
@@ -51,7 +51,7 @@ static int inotify_max_queued_events __read_mostly;
 
 struct kmem_cache *inotify_inode_mark_cachep __ro_after_init;
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 
 #include <linux/sysctl.h>
 
@@ -94,7 +94,7 @@ static void __init inotify_sysctls_init(void)
 
 #else
 #define inotify_sysctls_init() do { } while (0)
-#endif /* CONFIG_SYSCTL */
+#endif /* CONFIG_PROC_SYSCTL */
 
 static inline __u32 inotify_arg_to_mask(struct inode *inode, u32 arg)
 {
diff --git a/fs/ntfs/sysctl.c b/fs/ntfs/sysctl.c
index 8c5c1b7cd483..e5d65d9a87ae 100644
--- a/fs/ntfs/sysctl.c
+++ b/fs/ntfs/sysctl.c
@@ -10,7 +10,7 @@
 
 #include <linux/module.h>
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 
 #include <linux/proc_fs.h>
 #include <linux/sysctl.h>
@@ -50,5 +50,5 @@ int ntfs_sysctl(int add)
 	}
 	return 0;
 }
-#endif /* CONFIG_SYSCTL */
+#endif /* CONFIG_PROC_SYSCTL */
 #endif /* DEBUG */
diff --git a/fs/ntfs/sysctl.h b/fs/ntfs/sysctl.h
index 037127c994bf..80df61ff542a 100644
--- a/fs/ntfs/sysctl.h
+++ b/fs/ntfs/sysctl.h
@@ -10,7 +10,7 @@
 #define _LINUX_NTFS_SYSCTL_H
 
 
-#if defined(DEBUG) && defined(CONFIG_SYSCTL)
+#if defined(DEBUG) && defined(CONFIG_PROC_SYSCTL)
 
 int ntfs_sysctl(int add);
 
@@ -22,5 +22,5 @@ static inline int ntfs_sysctl(int add)
 	return 0;
 }
 
-#endif /* DEBUG && CONFIG_SYSCTL */
+#endif /* DEBUG && CONFIG_PROC_SYSCTL */
 #endif /* _LINUX_NTFS_SYSCTL_H */
diff --git a/fs/pipe.c b/fs/pipe.c
index 429b0714ec57..32140cb00d7e 100644
--- a/fs/pipe.c
+++ b/fs/pipe.c
@@ -1577,7 +1577,7 @@ static struct file_system_type pipe_fs_type = {
 	.kill_sb	= kill_anon_super,
 };
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 
 static ulong round_pipe_size_ul(ulong size)
 {
@@ -1641,7 +1641,7 @@ static int __init init_pipe_fs(void)
 			unregister_filesystem(&pipe_fs_type);
 		}
 	}
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 	register_sysctl_init("fs", fs_pipe_sysctls);
 #endif
 	return err;
diff --git a/fs/proc/Kconfig b/fs/proc/Kconfig
index 6ae966c561e7..855323dd1999 100644
--- a/fs/proc/Kconfig
+++ b/fs/proc/Kconfig
@@ -83,7 +83,6 @@ config PROC_VMCORE_DEVICE_RAM
 config PROC_SYSCTL
 	bool "Sysctl support (/proc/sys)" if EXPERT
 	depends on PROC_FS
-	select SYSCTL
 	default y
 	help
 	  The sysctl interface provides a means of dynamically changing
diff --git a/fs/verity/init.c b/fs/verity/init.c
index 3aa55dec88fc..3320046d1435 100644
--- a/fs/verity/init.c
+++ b/fs/verity/init.c
@@ -10,7 +10,7 @@
 
 #include <linux/ratelimit.h>
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 static const struct ctl_table fsverity_sysctl_table[] = {
 #ifdef CONFIG_FS_VERITY_BUILTIN_SIGNATURES
 	{
@@ -29,11 +29,11 @@ static void __init fsverity_init_sysctl(void)
 {
 	register_sysctl_init("fs/verity", fsverity_sysctl_table);
 }
-#else /* CONFIG_SYSCTL */
+#else /* CONFIG_PROC_SYSCTL */
 static inline void fsverity_init_sysctl(void)
 {
 }
-#endif /* !CONFIG_SYSCTL */
+#endif /* !CONFIG_PROC_SYSCTL */
 
 void fsverity_msg(const struct inode *inode, const char *level,
 		  const char *fmt, ...)
diff --git a/fs/xfs/Makefile b/fs/xfs/Makefile
index 9f7133e02576..47900d8342d4 100644
--- a/fs/xfs/Makefile
+++ b/fs/xfs/Makefile
@@ -146,7 +146,7 @@ xfs-$(CONFIG_XFS_RT)		+= xfs_rtalloc.o \
 				   xfs_zone_space_resv.o
 
 xfs-$(CONFIG_XFS_POSIX_ACL)	+= xfs_acl.o
-xfs-$(CONFIG_SYSCTL)		+= xfs_sysctl.o
+xfs-$(CONFIG_PROC_SYSCTL)	+= xfs_sysctl.o
 xfs-$(CONFIG_COMPAT)		+= xfs_ioctl32.o
 xfs-$(CONFIG_EXPORTFS_BLOCK_OPS)	+= xfs_pnfs.o
 
diff --git a/fs/xfs/xfs_globals.c b/fs/xfs/xfs_globals.c
index 60efe8246304..d781adf5d1e5 100644
--- a/fs/xfs/xfs_globals.c
+++ b/fs/xfs/xfs_globals.c
@@ -7,7 +7,7 @@
 #include "xfs_error.h"
 
 /*
- * Tunable XFS parameters.  xfs_params is required even when CONFIG_SYSCTL=n,
+ * Tunable XFS parameters.  xfs_params is required even when CONFIG_PROC_SYSCTL=n,
  * other XFS code uses these values.  Times are measured in centisecs (i.e.
  * 100ths of a second) with the exception of blockgc_timer, which is measured
  * in seconds.
diff --git a/fs/xfs/xfs_sysctl.h b/fs/xfs/xfs_sysctl.h
index ed9d896079c1..27b97257d438 100644
--- a/fs/xfs/xfs_sysctl.h
+++ b/fs/xfs/xfs_sysctl.h
@@ -89,12 +89,12 @@ struct xfs_globals {
 };
 extern struct xfs_globals	xfs_globals;
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 extern int xfs_sysctl_register(void);
 extern void xfs_sysctl_unregister(void);
 #else
 # define xfs_sysctl_register()		(0)
 # define xfs_sysctl_unregister()	do { } while (0)
-#endif /* CONFIG_SYSCTL */
+#endif /* CONFIG_PROC_SYSCTL */
 
 #endif /* __XFS_SYSCTL_H__ */
diff --git a/include/linux/coredump.h b/include/linux/coredump.h
index 7b38ee2e7913..5805fb2705de 100644
--- a/include/linux/coredump.h
+++ b/include/linux/coredump.h
@@ -74,7 +74,7 @@ static inline void vfs_coredump(const kernel_siginfo_t *siginfo) {}
 
 #endif
 
-#if defined(CONFIG_COREDUMP) && defined(CONFIG_SYSCTL)
+#if defined(CONFIG_COREDUMP) && defined(CONFIG_PROC_SYSCTL)
 extern void validate_coredump_safety(void);
 #else
 static inline void validate_coredump_safety(void) {}
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 485df9c2dbdd..9494a57b90d3 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -82,7 +82,7 @@ extern void * high_memory;
 #define PAGES_TO_MB(pages) ((pages) >> (20 - PAGE_SHIFT))
 #define MB_TO_PAGES(mb)    ((mb) << (20 - PAGE_SHIFT))
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 extern int sysctl_legacy_va_layout;
 #else
 #define sysctl_legacy_va_layout 0
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 9981d637f8b5..e4be533d26cc 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -738,7 +738,7 @@ extern int sysctl_devconf_inherit_init_net;
  */
 static inline bool net_has_fallback_tunnels(const struct net *net)
 {
-#if IS_ENABLED(CONFIG_SYSCTL)
+#if IS_ENABLED(CONFIG_PROC_SYSCTL)
 	int fb_tunnels_only_for_init_net = READ_ONCE(sysctl_fb_tunnels_only_for_init_net);
 
 	return !fb_tunnels_only_for_init_net ||
@@ -750,7 +750,7 @@ static inline bool net_has_fallback_tunnels(const struct net *net)
 
 static inline int net_inherit_devconf(void)
 {
-#if IS_ENABLED(CONFIG_SYSCTL)
+#if IS_ENABLED(CONFIG_PROC_SYSCTL)
 	return READ_ONCE(sysctl_devconf_inherit_init_net);
 #else
 	return 0;
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index ec17e602c979..9a076d63418f 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -585,7 +585,7 @@ extern const struct inode_operations nfs_symlink_inode_operations;
 /*
  * linux/fs/nfs/sysctl.c
  */
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 extern int nfs_register_sysctl(void);
 extern void nfs_unregister_sysctl(void);
 #else
diff --git a/include/linux/pid_namespace.h b/include/linux/pid_namespace.h
index b20baaa7e62b..6538acb86c7b 100644
--- a/include/linux/pid_namespace.h
+++ b/include/linux/pid_namespace.h
@@ -16,7 +16,7 @@
 
 struct fs_pin;
 
-#if defined(CONFIG_SYSCTL) && defined(CONFIG_MEMFD_CREATE)
+#if defined(CONFIG_PROC_SYSCTL) && defined(CONFIG_MEMFD_CREATE)
 /* modes for vm.memfd_noexec sysctl */
 #define MEMFD_NOEXEC_SCOPE_EXEC			0 /* MFD_EXEC implied if unset */
 #define MEMFD_NOEXEC_SCOPE_NOEXEC_SEAL		1 /* MFD_NOEXEC_SEAL implied if unset */
@@ -27,7 +27,7 @@ struct pid_namespace {
 	struct idr idr;
 	struct rcu_head rcu;
 	unsigned int pid_allocated;
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 #if defined(CONFIG_MEMFD_CREATE)
 	int memfd_noexec_scope;
 #endif
@@ -65,7 +65,7 @@ static inline struct pid_namespace *get_pid_ns(struct pid_namespace *ns)
 	return ns;
 }
 
-#if defined(CONFIG_SYSCTL) && defined(CONFIG_MEMFD_CREATE)
+#if defined(CONFIG_PROC_SYSCTL) && defined(CONFIG_MEMFD_CREATE)
 static inline int pidns_memfd_noexec_scope(struct pid_namespace *ns)
 {
 	int scope = MEMFD_NOEXEC_SCOPE_EXEC;
diff --git a/include/linux/sys_info.h b/include/linux/sys_info.h
index a5bc3ea3d44b..8d0f4369d265 100644
--- a/include/linux/sys_info.h
+++ b/include/linux/sys_info.h
@@ -20,7 +20,7 @@
 void sys_info(unsigned long si_mask);
 unsigned long sys_info_parse_param(char *str);
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 int sysctl_sys_info_handler(const struct ctl_table *ro_table, int write,
 					  void *buffer, size_t *lenp,
 					  loff_t *ppos);
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index 2886fbceb5d6..76ff4305a295 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -241,7 +241,7 @@ struct ctl_table_root {
 #define register_sysctl(path, table)	\
 	register_sysctl_sz(path, table, ARRAY_SIZE(table))
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 
 void proc_sys_poll_notify(struct ctl_table_poll *poll);
 
@@ -270,7 +270,7 @@ bool sysctl_is_alias(char *param);
 extern int unaligned_enabled;
 extern int no_unaligned_warning;
 
-#else /* CONFIG_SYSCTL */
+#else /* CONFIG_PROC_SYSCTL */
 
 static inline void register_sysctl_init(const char *path, const struct ctl_table *table)
 {
@@ -306,6 +306,6 @@ static inline bool sysctl_is_alias(char *param)
 {
 	return false;
 }
-#endif /* CONFIG_SYSCTL */
+#endif /* CONFIG_PROC_SYSCTL */
 
 #endif /* _LINUX_SYSCTL_H */
diff --git a/include/linux/user_namespace.h b/include/linux/user_namespace.h
index 9c3be157397e..09b61f531220 100644
--- a/include/linux/user_namespace.h
+++ b/include/linux/user_namespace.h
@@ -103,7 +103,7 @@ struct user_namespace {
 	struct key		*persistent_keyring_register;
 #endif
 	struct work_struct	work;
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 	struct ctl_table_set	set;
 	struct ctl_table_header *sysctls;
 #endif
diff --git a/include/net/ip.h b/include/net/ip.h
index 7f2fe1a8401b..b8041872534d 100644
--- a/include/net/ip.h
+++ b/include/net/ip.h
@@ -359,7 +359,7 @@ static inline void inet_get_local_port_range(const struct net *net, int *low, in
 }
 bool inet_sk_get_local_port_range(const struct sock *sk, int *low, int *high);
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 static inline bool inet_is_local_reserved_port(const struct net *net, unsigned short port)
 {
 	if (!net->ipv4.sysctl_local_reserved_ports)
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h
index 417ff51f62fc..5a83c8dc88e2 100644
--- a/include/net/ip_vs.h
+++ b/include/net/ip_vs.h
@@ -1206,7 +1206,7 @@ struct netns_ipvs {
 	atomic_t		nullsvc_counter[IP_VS_AF_MAX];/* Zero port */
 	atomic_t		conn_out_counter[IP_VS_AF_MAX];/* out conn */
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 	/* delayed work for expiring no dest connections */
 	struct delayed_work	expire_nodest_conn_work;
 	/* 1/rate drop and drop-entry variables */
@@ -1229,7 +1229,7 @@ struct netns_ipvs {
 	/* sysctl variables */
 	int			sysctl_amemthresh;
 	int			sysctl_am_droprate;
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 	int			sysctl_conn_max;/* soft limit for conns */
 	int			conn_max_limit;	/* hard limit for conn_max */
 #endif
@@ -1260,7 +1260,7 @@ struct netns_ipvs {
 	int			sysctl_schedule_icmp;
 	int			sysctl_ignore_tunneled;
 	int			sysctl_run_estimation;
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 	cpumask_var_t		sysctl_est_cpulist;	/* kthread cpumask */
 	int			est_cpulist_valid;	/* cpulist set */
 	int			sysctl_est_nice;	/* kthread nice */
@@ -1328,7 +1328,7 @@ struct netns_ipvs {
 #define IPVS_SYNC_FLUSH_TIME	(HZ * 2)
 #define IPVS_SYNC_PORTS_MAX	(1 << 6)
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 
 static inline int sysctl_conn_max(struct netns_ipvs *ipvs)
 {
@@ -1927,7 +1927,7 @@ void ip_vs_est_kthread_stop(struct ip_vs_est_kt_data *kd);
 
 static inline void ip_vs_stop_estimator_tot_stats(struct netns_ipvs *ipvs)
 {
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 	ip_vs_stop_estimator(ipvs, &ipvs->tot_stats->s);
 	ipvs->tot_stats->s.est.ktid = -2;
 #endif
@@ -1935,7 +1935,7 @@ static inline void ip_vs_stop_estimator_tot_stats(struct netns_ipvs *ipvs)
 
 static inline void ip_vs_est_stopped_recalc(struct netns_ipvs *ipvs)
 {
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 	/* Stop tasks while cpulist is empty or if disabled with flag */
 	ipvs->est_stopped = !sysctl_run_estimation(ipvs) ||
 			    (ipvs->est_cpulist_valid &&
@@ -1945,7 +1945,7 @@ static inline void ip_vs_est_stopped_recalc(struct netns_ipvs *ipvs)
 
 static inline bool ip_vs_est_stopped(struct netns_ipvs *ipvs)
 {
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 	return ipvs->est_stopped;
 #else
 	return false;
@@ -1990,7 +1990,7 @@ int ip_vs_icmp_xmit_v6(struct sk_buff *skb, struct ip_vs_conn *cp,
 		       unsigned int hooknum, struct ip_vs_iphdr *iph);
 #endif
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 /* This is a simple mechanism to ignore packets when
  * we are loaded. Just set ip_vs_drop_rate to 'n' and
  * we start to drop 1/rate of the packets
@@ -2008,7 +2008,7 @@ static inline int ip_vs_todrop(struct netns_ipvs *ipvs)
 static inline int ip_vs_todrop(struct netns_ipvs *ipvs) { return 0; }
 #endif
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 /* Enqueue delayed work for expiring no dest connections
  * Only run when sysctl_expire_nodest=1
  */
@@ -2113,7 +2113,7 @@ static inline void ip_vs_notrack(struct sk_buff *skb)
  */
 static inline int ip_vs_conntrack_enabled(struct netns_ipvs *ipvs)
 {
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 	return ipvs->sysctl_conntrack;
 #else
 	return 0;
diff --git a/include/net/ipv6.h b/include/net/ipv6.h
index 3de07e738538..14d219d52958 100644
--- a/include/net/ipv6.h
+++ b/include/net/ipv6.h
@@ -1218,7 +1218,7 @@ static inline int snmp6_register_dev(struct inet6_dev *idev) { return 0; }
 static inline int snmp6_unregister_dev(struct inet6_dev *idev) { return 0; }
 #endif
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 struct ctl_table *ipv6_icmp_sysctl_init(struct net *net);
 size_t ipv6_icmp_sysctl_table_size(void);
 struct ctl_table *ipv6_route_sysctl_init(struct net *net);
diff --git a/include/net/llc.h b/include/net/llc.h
index 029ba8a22319..d37ca84c2d0c 100644
--- a/include/net/llc.h
+++ b/include/net/llc.h
@@ -144,7 +144,7 @@ void llc_proc_exit(void);
 #define llc_proc_init()	(0)
 #define llc_proc_exit()	do { } while(0)
 #endif /* CONFIG_PROC_FS */
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 int llc_sysctl_init(void);
 void llc_sysctl_exit(void);
 
@@ -155,5 +155,5 @@ extern int sysctl_llc2_rej_timeout;
 #else
 #define llc_sysctl_init() (0)
 #define llc_sysctl_exit() do { } while(0)
-#endif /* CONFIG_SYSCTL */
+#endif /* CONFIG_PROC_SYSCTL */
 #endif /* LLC_H */
diff --git a/include/net/ndisc.h b/include/net/ndisc.h
index 3da1a6f8d3f9..58207cf37171 100644
--- a/include/net/ndisc.h
+++ b/include/net/ndisc.h
@@ -444,7 +444,7 @@ void igmp6_event_query(struct sk_buff *skb);
 void igmp6_event_report(struct sk_buff *skb);
 
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 int ndisc_ifinfo_sysctl_change(const struct ctl_table *ctl, int write,
 			       void *buffer, size_t *lenp, loff_t *ppos);
 #endif
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
index 80de5e98a66d..e4d7180165ae 100644
--- a/include/net/net_namespace.h
+++ b/include/net/net_namespace.h
@@ -103,7 +103,7 @@ struct net {
 	struct proc_dir_entry 	*proc_net;
 	struct proc_dir_entry 	*proc_net_stat;
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 	struct ctl_table_set	sysctls;
 #endif
 
@@ -256,7 +256,7 @@ extern struct list_head net_namespace_list;
 
 struct net *get_net_ns_by_pid(pid_t pid);
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 void ipx_register_sysctl(void);
 void ipx_unregister_sysctl(void);
 #else
@@ -519,7 +519,7 @@ struct ctl_table;
 
 #define register_net_sysctl(net, path, table)	\
 	register_net_sysctl_sz(net, path, table, ARRAY_SIZE(table))
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 int net_sysctl_init(void);
 struct ctl_table_header *register_net_sysctl_sz(struct net *net, const char *path,
 					     struct ctl_table *table, size_t table_size);
diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h
index bc42dd0e10e6..d5a8a9aaa39a 100644
--- a/include/net/netfilter/nf_conntrack.h
+++ b/include/net/netfilter/nf_conntrack.h
@@ -57,7 +57,7 @@ struct nf_conntrack_net {
 	unsigned int users4;
 	unsigned int users6;
 	unsigned int users_bridge;
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 	struct ctl_table_header	*sysctl_header;
 #endif
 #ifdef CONFIG_NF_CONNTRACK_EVENTS
diff --git a/include/net/netfilter/nf_conntrack_l4proto.h b/include/net/netfilter/nf_conntrack_l4proto.h
index fde2427ceb8f..04993626e45b 100644
--- a/include/net/netfilter/nf_conntrack_l4proto.h
+++ b/include/net/netfilter/nf_conntrack_l4proto.h
@@ -145,7 +145,7 @@ int nf_ct_port_nlattr_to_tuple(struct nlattr *tb[],
 unsigned int nf_ct_port_nlattr_tuple_size(void);
 extern const struct nla_policy nf_ct_port_nla_policy[];
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 __printf(4, 5) __cold
 void nf_ct_l4proto_log_invalid(const struct sk_buff *skb,
 			       const struct nf_conn *ct,
@@ -167,7 +167,7 @@ void nf_ct_l4proto_log_invalid(const struct sk_buff *skb,
 			       const struct nf_conn *ct,
 			       const struct nf_hook_state *state,
 			       const char *fmt, ...) { }
-#endif /* CONFIG_SYSCTL */
+#endif /* CONFIG_PROC_SYSCTL */
 
 #if IS_ENABLED(CONFIG_NF_CONNTRACK)
 static inline struct nf_generic_net *nf_generic_pernet(struct net *net)
diff --git a/include/net/netfilter/nf_hooks_lwtunnel.h b/include/net/netfilter/nf_hooks_lwtunnel.h
index cef7a4eb8f97..2fa9586ac932 100644
--- a/include/net/netfilter/nf_hooks_lwtunnel.h
+++ b/include/net/netfilter/nf_hooks_lwtunnel.h
@@ -1,7 +1,7 @@
 #include <linux/sysctl.h>
 #include <linux/types.h>
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 int nf_hooks_lwtunnel_sysctl_handler(const struct ctl_table *table, int write,
 				     void *buffer, size_t *lenp, loff_t *ppos);
 #endif
diff --git a/include/net/netns/core.h b/include/net/netns/core.h
index 9ef3d70e5e9c..58918939593c 100644
--- a/include/net/netns/core.h
+++ b/include/net/netns/core.h
@@ -23,7 +23,7 @@ struct netns_core {
 	struct prot_inuse __percpu *prot_inuse;
 #endif
 
-#if IS_ENABLED(CONFIG_RPS) && IS_ENABLED(CONFIG_SYSCTL)
+#if IS_ENABLED(CONFIG_RPS) && IS_ENABLED(CONFIG_PROC_SYSCTL)
 	struct cpumask *rps_default_mask;
 #endif
 };
diff --git a/include/net/netns/ieee802154_6lowpan.h b/include/net/netns/ieee802154_6lowpan.h
index 95406e1342cb..1686f58386ed 100644
--- a/include/net/netns/ieee802154_6lowpan.h
+++ b/include/net/netns/ieee802154_6lowpan.h
@@ -9,7 +9,7 @@
 #define __NETNS_IEEE802154_6LOWPAN_H__
 
 struct netns_sysctl_lowpan {
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 	struct ctl_table_header *frags_hdr;
 #endif
 };
diff --git a/include/net/netns/ipv4.h b/include/net/netns/ipv4.h
index 6e27c56514df..e6043de7d983 100644
--- a/include/net/netns/ipv4.h
+++ b/include/net/netns/ipv4.h
@@ -103,7 +103,7 @@ struct netns_ipv4 {
 	struct udp_tunnel_gro udp_tunnel_gro[2];
 #endif
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 	struct ctl_table_header	*forw_hdr;
 	struct ctl_table_header	*frags_hdr;
 	struct ctl_table_header	*ipv4_hdr;
@@ -268,7 +268,7 @@ struct netns_ipv4 {
 
 	unsigned int sysctl_udp_child_hash_entries;
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 	unsigned long *sysctl_local_reserved_ports;
 	int sysctl_ip_prot_sock;
 #endif
diff --git a/include/net/netns/ipv6.h b/include/net/netns/ipv6.h
index ffda15318be5..229cff5765c2 100644
--- a/include/net/netns/ipv6.h
+++ b/include/net/netns/ipv6.h
@@ -13,7 +13,7 @@
 struct ctl_table_header;
 
 struct netns_sysctl_ipv6 {
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 	struct ctl_table_header *hdr;
 	struct ctl_table_header *route_hdr;
 	struct ctl_table_header *icmp_hdr;
diff --git a/include/net/netns/netfilter.h b/include/net/netns/netfilter.h
index a6a0bf4a247e..6646516d5abb 100644
--- a/include/net/netns/netfilter.h
+++ b/include/net/netns/netfilter.h
@@ -13,7 +13,7 @@ struct netns_nf {
 	struct proc_dir_entry *proc_netfilter;
 #endif
 	const struct nf_logger __rcu *nf_loggers[NFPROTO_NUMPROTO];
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 	struct ctl_table_header *nf_log_dir_header;
 #ifdef CONFIG_LWTUNNEL
 	struct ctl_table_header *nf_lwtnl_dir_header;
diff --git a/include/net/netns/sctp.h b/include/net/netns/sctp.h
index c0f97f36389e..ef6d6c361e4b 100644
--- a/include/net/netns/sctp.h
+++ b/include/net/netns/sctp.h
@@ -16,7 +16,7 @@ struct netns_sctp {
 #ifdef CONFIG_PROC_FS
 	struct proc_dir_entry *proc_net_sctp;
 #endif
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 	struct ctl_table_header *sysctl_header;
 #endif
 	/* This is the global socket data structure used for responding to
diff --git a/include/net/netns/smc.h b/include/net/netns/smc.h
index ed24c9f638ee..7e15f8b41df6 100644
--- a/include/net/netns/smc.h
+++ b/include/net/netns/smc.h
@@ -14,7 +14,7 @@ struct netns_smc {
 	struct smc_stats_rsn		*fback_rsn;
 
 	bool				limit_smc_hs;	/* constraint on handshake */
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 	struct ctl_table_header		*smc_hdr;
 #endif
 #if IS_ENABLED(CONFIG_SMC_HS_CTRL_BPF)
diff --git a/include/net/netns/xfrm.h b/include/net/netns/xfrm.h
index b73983a17e08..cd0616d18ba7 100644
--- a/include/net/netns/xfrm.h
+++ b/include/net/netns/xfrm.h
@@ -69,7 +69,7 @@ struct netns_xfrm {
 
 	u8			policy_default[XFRM_POLICY_MAX];
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 	struct ctl_table_header	*sysctl_hdr;
 #endif
 
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
index d50c27812504..21eaa3c7953a 100644
--- a/include/net/sctp/sctp.h
+++ b/include/net/sctp/sctp.h
@@ -306,7 +306,7 @@ static inline void sctp_dbg_objcnt_init(struct net *net) { return; }
 
 #endif /* CONFIG_SCTP_DBG_OBJCNT */
 
-#if defined CONFIG_SYSCTL
+#if defined CONFIG_PROC_SYSCTL
 void sctp_sysctl_register(void);
 void sctp_sysctl_unregister(void);
 int sctp_sysctl_net_register(struct net *net);
diff --git a/include/net/x25.h b/include/net/x25.h
index 414f3fd99345..0269d09904c8 100644
--- a/include/net/x25.h
+++ b/include/net/x25.h
@@ -296,13 +296,13 @@ unsigned long x25_display_timer(struct sock *);
 void x25_check_rbuf(struct sock *);
 
 /* sysctl_net_x25.c */
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 int x25_register_sysctl(void);
 void x25_unregister_sysctl(void);
 #else
 static inline int x25_register_sysctl(void) { return 0; };
 static inline void x25_unregister_sysctl(void) {};
-#endif /* CONFIG_SYSCTL */
+#endif /* CONFIG_PROC_SYSCTL */
 
 struct x25_skb_cb {
 	unsigned int flags;
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index a6d69aaa6cd2..1056b9a0e7b3 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -1689,7 +1689,7 @@ void xfrm_proc_fini(struct net *net);
 #endif
 
 int xfrm_sysctl_init(struct net *net);
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 void xfrm_sysctl_fini(struct net *net);
 #else
 static inline void xfrm_sysctl_fini(struct net *net)
diff --git a/init/Kconfig b/init/Kconfig
index 5230d4879b1c..086b06aecb08 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -482,7 +482,7 @@ config SYSVIPC
 config SYSVIPC_SYSCTL
 	bool
 	depends on SYSVIPC
-	depends on SYSCTL
+	depends on PROC_SYSCTL
 	default y
 
 config SYSVIPC_COMPAT
@@ -508,7 +508,7 @@ config POSIX_MQUEUE
 config POSIX_MQUEUE_SYSCTL
 	bool
 	depends on POSIX_MQUEUE
-	depends on SYSCTL
+	depends on PROC_SYSCTL
 	default y
 
 config WATCH_QUEUE
@@ -1661,9 +1661,6 @@ config LD_ORPHAN_WARN_LEVEL
 	default "error" if WERROR
 	default "warn"
 
-config SYSCTL
-	bool
-
 config HAVE_UID16
 	bool
 
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c
index 1ea2fca34a36..565fed51fffb 100644
--- a/io_uring/io_uring.c
+++ b/io_uring/io_uring.c
@@ -129,7 +129,7 @@ static struct workqueue_struct *iou_wq __ro_after_init;
 static int __read_mostly sysctl_io_uring_disabled;
 static int __read_mostly sysctl_io_uring_group = -1;
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 static const struct ctl_table kernel_io_uring_disabled_table[] = {
 	{
 		.procname	= "io_uring_disabled",
@@ -3261,7 +3261,7 @@ static int __init io_uring_init(void)
 	iou_wq = alloc_workqueue("iou_exit", WQ_UNBOUND, 64);
 	BUG_ON(!iou_wq);
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 	register_sysctl_init("kernel", kernel_io_uring_disabled_table);
 #endif
 
diff --git a/kernel/Makefile b/kernel/Makefile
index 1e1a31673577..682ac2fc7bc1 100644
--- a/kernel/Makefile
+++ b/kernel/Makefile
@@ -107,7 +107,7 @@ obj-$(CONFIG_HARDLOCKUP_DETECTOR_BUDDY) += watchdog_buddy.o
 obj-$(CONFIG_HARDLOCKUP_DETECTOR_PERF) += watchdog_perf.o
 obj-$(CONFIG_SECCOMP) += seccomp.o
 obj-$(CONFIG_RELAY) += relay.o
-obj-$(CONFIG_SYSCTL) += utsname_sysctl.o
+obj-$(CONFIG_PROC_SYSCTL) += utsname_sysctl.o
 obj-$(CONFIG_TASK_DELAY_ACCT) += delayacct.o
 obj-$(CONFIG_TASKSTATS) += taskstats.o tsacct.o
 obj-$(CONFIG_TRACEPOINTS) += tracepoint.o
diff --git a/kernel/acct.c b/kernel/acct.c
index c440d43479ca..6f4ba55936c7 100644
--- a/kernel/acct.c
+++ b/kernel/acct.c
@@ -70,7 +70,7 @@ static int acct_parm[3] = {4, 2, 30};
 #define SUSPEND		(acct_parm[1])	/* <foo% free space - suspend */
 #define ACCT_TIMEOUT	(acct_parm[2])	/* foo second timeout between checks */
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 static const struct ctl_table kern_acct_table[] = {
 	{
 		.procname       = "acct",
@@ -87,7 +87,7 @@ static __init int kernel_acct_sysctls_init(void)
 	return 0;
 }
 late_initcall(kernel_acct_sysctls_init);
-#endif /* CONFIG_SYSCTL */
+#endif /* CONFIG_PROC_SYSCTL */
 
 /*
  * External references and all of the globals.
diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c
index 6db306d23b47..3958436dbfdc 100644
--- a/kernel/bpf/syscall.c
+++ b/kernel/bpf/syscall.c
@@ -6703,7 +6703,7 @@ const struct bpf_prog_ops bpf_syscall_prog_ops = {
 	.test_run = bpf_prog_test_run_syscall,
 };
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 static int bpf_stats_handler(const struct ctl_table *table, int write,
 			     void *buffer, size_t *lenp, loff_t *ppos)
 {
@@ -6787,4 +6787,4 @@ static int __init bpf_syscall_sysctl_init(void)
 	return 0;
 }
 late_initcall(bpf_syscall_sysctl_init);
-#endif /* CONFIG_SYSCTL */
+#endif /* CONFIG_PROC_SYSCTL */
diff --git a/kernel/exit.c b/kernel/exit.c
index 2c0b1c02920f..5a3d362c74bb 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -86,7 +86,7 @@
  */
 static unsigned int oops_limit = 10000;
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 static const struct ctl_table kern_exit_table[] = {
 	{
 		.procname       = "oops_limit",
diff --git a/kernel/hung_task.c b/kernel/hung_task.c
index 6fcc94ce4ca9..11e58d3fa5c9 100644
--- a/kernel/hung_task.c
+++ b/kernel/hung_task.c
@@ -364,7 +364,7 @@ static long hung_timeout_jiffies(unsigned long last_checked,
 		MAX_SCHEDULE_TIMEOUT;
 }
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 
 /**
  * proc_dohung_task_detect_count - proc handler for hung_task_detect_count
@@ -504,7 +504,7 @@ static void __init hung_task_sysctl_init(void)
 }
 #else
 #define hung_task_sysctl_init() do { } while (0)
-#endif /* CONFIG_SYSCTL */
+#endif /* CONFIG_PROC_SYSCTL */
 
 
 static atomic_t reset_hung_task = ATOMIC_INIT(0);
diff --git a/kernel/kexec_core.c b/kernel/kexec_core.c
index dc770b9a6d05..0536abb54746 100644
--- a/kernel/kexec_core.c
+++ b/kernel/kexec_core.c
@@ -1034,7 +1034,7 @@ struct kimage *kexec_image;
 struct kimage *kexec_crash_image;
 static int kexec_load_disabled;
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 static int kexec_limit_handler(const struct ctl_table *table, int write,
 			       void *buffer, size_t *lenp, loff_t *ppos)
 {
diff --git a/kernel/kprobes.c b/kernel/kprobes.c
index bfc89083daa9..d9e3c6eba6bc 100644
--- a/kernel/kprobes.c
+++ b/kernel/kprobes.c
@@ -51,7 +51,7 @@
 #define KPROBE_HASH_BITS 6
 #define KPROBE_TABLE_SIZE (1 << KPROBE_HASH_BITS)
 
-#if !defined(CONFIG_OPTPROBES) || !defined(CONFIG_SYSCTL)
+#if !defined(CONFIG_OPTPROBES) || !defined(CONFIG_PROC_SYSCTL)
 #define kprobe_sysctls_init() do { } while (0)
 #endif
 
@@ -970,7 +970,7 @@ static void optimize_all_kprobes(void)
 	pr_info("kprobe jump-optimization is enabled. All kprobes are optimized if possible.\n");
 }
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 static void unoptimize_all_kprobes(void)
 {
 	struct hlist_head *head;
@@ -1033,7 +1033,7 @@ static void __init kprobe_sysctls_init(void)
 {
 	register_sysctl_init("debug", kprobe_sysctls);
 }
-#endif /* CONFIG_SYSCTL */
+#endif /* CONFIG_PROC_SYSCTL */
 
 /* Put a breakpoint for a probe. */
 static void __arm_kprobe(struct kprobe *p)
diff --git a/kernel/kstack_erase.c b/kernel/kstack_erase.c
index d4449884084c..23b46aaa4c4e 100644
--- a/kernel/kstack_erase.c
+++ b/kernel/kstack_erase.c
@@ -21,7 +21,7 @@
 
 static DEFINE_STATIC_KEY_FALSE(stack_erasing_bypass);
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 static int stack_erasing_sysctl(const struct ctl_table *table, int write,
 			void *buffer, size_t *lenp, loff_t *ppos)
 {
@@ -63,7 +63,7 @@ static int __init stackleak_sysctls_init(void)
 	return 0;
 }
 late_initcall(stackleak_sysctls_init);
-#endif /* CONFIG_SYSCTL */
+#endif /* CONFIG_PROC_SYSCTL */
 
 #define skip_erasing()	static_branch_unlikely(&stack_erasing_bypass)
 #else
diff --git a/kernel/latencytop.c b/kernel/latencytop.c
index d4281d1e13a6..f15638517d96 100644
--- a/kernel/latencytop.c
+++ b/kernel/latencytop.c
@@ -64,7 +64,7 @@ static struct latency_record latency_record[MAXLR];
 
 int latencytop_enabled;
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 static int sysctl_latencytop(const struct ctl_table *table, int write, void *buffer,
 		size_t *lenp, loff_t *ppos)
 {
@@ -291,7 +291,7 @@ static const struct proc_ops lstats_proc_ops = {
 static int __init init_lstats_procfs(void)
 {
 	proc_create("latency_stats", 0644, NULL, &lstats_proc_ops);
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 	register_sysctl_init("kernel", latencytop_sysctl);
 #endif
 	return 0;
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
index 2d4c5bab5af8..f3e50fef0c15 100644
--- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
@@ -80,7 +80,7 @@ module_param(lock_stat, int, 0644);
 #define lock_stat 0
 #endif
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 static const struct ctl_table kern_lockdep_table[] = {
 #ifdef CONFIG_PROVE_LOCKING
 	{
@@ -108,7 +108,7 @@ static __init int kernel_lockdep_sysctls_init(void)
 	return 0;
 }
 late_initcall(kernel_lockdep_sysctls_init);
-#endif /* CONFIG_SYSCTL */
+#endif /* CONFIG_PROC_SYSCTL */
 
 DEFINE_PER_CPU(unsigned int, lockdep_recursion);
 EXPORT_PER_CPU_SYMBOL_GPL(lockdep_recursion);
diff --git a/kernel/panic.c b/kernel/panic.c
index 213725b612aa..6a42aa0f7821 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -87,7 +87,7 @@ static void panic_print_deprecated(void)
 	pr_info_once("Kernel: The 'panic_print' parameter is now deprecated. Please use 'panic_sys_info' and 'panic_console_replay' instead.\n");
 }
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 
 /*
  * Taint values can only be increased
diff --git a/kernel/pid.c b/kernel/pid.c
index 1c27e63fa0ad..a79d18357002 100644
--- a/kernel/pid.c
+++ b/kernel/pid.c
@@ -77,7 +77,7 @@ struct pid_namespace init_pid_ns = {
 	.child_reaper = &init_task,
 	.user_ns = &init_user_ns,
 	.pid_max = PID_MAX_DEFAULT,
-#if defined(CONFIG_SYSCTL) && defined(CONFIG_MEMFD_CREATE)
+#if defined(CONFIG_PROC_SYSCTL) && defined(CONFIG_MEMFD_CREATE)
 	.memfd_noexec_scope = MEMFD_NOEXEC_SCOPE_EXEC,
 #endif
 };
@@ -713,7 +713,7 @@ SYSCALL_DEFINE2(pidfd_open, pid_t, pid, unsigned int, flags)
 	return fd;
 }
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 static struct ctl_table_set *pid_table_root_lookup(struct ctl_table_root *root)
 {
 	return &task_active_pid_ns(current)->set;
@@ -779,7 +779,7 @@ static const struct ctl_table pid_table[] = {
 
 int register_pidns_sysctls(struct pid_namespace *pidns)
 {
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 	struct ctl_table *tbl;
 
 	setup_sysctl_set(&pidns->set, &pid_table_root, set_is_seen);
@@ -804,7 +804,7 @@ int register_pidns_sysctls(struct pid_namespace *pidns)
 
 void unregister_pidns_sysctls(struct pid_namespace *pidns)
 {
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 	const struct ctl_table *tbl;
 
 	tbl = pidns->sysctls->ctl_table_arg;
@@ -837,7 +837,7 @@ void __init pid_idr_init(void)
 
 static __init int pid_namespace_sysctl_init(void)
 {
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 	/* "kernel" directory will have already been initialized. */
 	BUG_ON(register_pidns_sysctls(&init_pid_ns));
 #endif
diff --git a/kernel/pid_namespace.c b/kernel/pid_namespace.c
index d36afc58ee1d..80b69c5021c0 100644
--- a/kernel/pid_namespace.c
+++ b/kernel/pid_namespace.c
@@ -119,7 +119,7 @@ static struct pid_namespace *create_pid_namespace(struct user_namespace *user_ns
 	ns->pid_allocated = PIDNS_ADDING;
 	INIT_WORK(&ns->work, destroy_pid_namespace_work);
 
-#if defined(CONFIG_SYSCTL) && defined(CONFIG_MEMFD_CREATE)
+#if defined(CONFIG_PROC_SYSCTL) && defined(CONFIG_MEMFD_CREATE)
 	ns->memfd_noexec_scope = pidns_memfd_noexec_scope(parent_pid_ns);
 #endif
 
diff --git a/kernel/pid_sysctl.h b/kernel/pid_sysctl.h
index 5d8f981de7c5..600fe1a14db0 100644
--- a/kernel/pid_sysctl.h
+++ b/kernel/pid_sysctl.h
@@ -4,7 +4,7 @@
 
 #include <linux/pid_namespace.h>
 
-#if defined(CONFIG_SYSCTL) && defined(CONFIG_MEMFD_CREATE)
+#if defined(CONFIG_PROC_SYSCTL) && defined(CONFIG_MEMFD_CREATE)
 static int pid_mfd_noexec_dointvec_minmax(const struct ctl_table *table,
 	int write, void *buf, size_t *lenp, loff_t *ppos)
 {
diff --git a/kernel/printk/Makefile b/kernel/printk/Makefile
index f8004ac3983d..1c86cf12fae5 100644
--- a/kernel/printk/Makefile
+++ b/kernel/printk/Makefile
@@ -6,6 +6,6 @@ obj-$(CONFIG_PRINTK_INDEX)	+= index.o
 
 obj-$(CONFIG_PRINTK)                 += printk_support.o
 printk_support-y	             := printk_ringbuffer.o
-printk_support-$(CONFIG_SYSCTL)	     += sysctl.o
+printk_support-$(CONFIG_PROC_SYSCTL) += sysctl.o
 
 obj-$(CONFIG_PRINTK_RINGBUFFER_KUNIT_TEST) += printk_ringbuffer_kunit_test.o
diff --git a/kernel/printk/internal.h b/kernel/printk/internal.h
index 85fbf1801cbe..18e4198c342e 100644
--- a/kernel/printk/internal.h
+++ b/kernel/printk/internal.h
@@ -6,7 +6,7 @@
 #include <linux/types.h>
 #include <linux/sysctl.h>
 
-#if defined(CONFIG_PRINTK) && defined(CONFIG_SYSCTL)
+#if defined(CONFIG_PRINTK) && defined(CONFIG_PROC_SYSCTL)
 void __init printk_sysctl_init(void);
 int devkmsg_sysctl_set_loglvl(const struct ctl_table *table, int write,
 			      void *buffer, size_t *lenp, loff_t *ppos);
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index 2fe9a963c823..a9cb1cf00925 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -198,7 +198,7 @@ static int __init control_devkmsg(char *str)
 __setup("printk.devkmsg=", control_devkmsg);
 
 char devkmsg_log_str[DEVKMSG_STR_MAX_SIZE] = "ratelimit";
-#if defined(CONFIG_PRINTK) && defined(CONFIG_SYSCTL)
+#if defined(CONFIG_PRINTK) && defined(CONFIG_PROC_SYSCTL)
 int devkmsg_sysctl_set_loglvl(const struct ctl_table *table, int write,
 			      void *buffer, size_t *lenp, loff_t *ppos)
 {
@@ -237,7 +237,7 @@ int devkmsg_sysctl_set_loglvl(const struct ctl_table *table, int write,
 
 	return 0;
 }
-#endif /* CONFIG_PRINTK && CONFIG_SYSCTL */
+#endif /* CONFIG_PRINTK && CONFIG_PROC_SYSCTL */
 
 /**
  * console_list_lock - Lock the console list
diff --git a/kernel/reboot.c b/kernel/reboot.c
index f070c5c1103a..204f85eb67db 100644
--- a/kernel/reboot.c
+++ b/kernel/reboot.c
@@ -1365,7 +1365,7 @@ static struct attribute *reboot_attrs[] = {
 	NULL,
 };
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 static int proc_do_cad_pid(const struct ctl_table *table, int write, void *buffer,
 			   size_t *lenp, loff_t *ppos)
 {
@@ -1418,7 +1418,7 @@ static void __init kernel_reboot_sysctls_init(void)
 }
 #else
 #define kernel_reboot_sysctls_init() do { } while (0)
-#endif /* CONFIG_SYSCTL */
+#endif /* CONFIG_PROC_SYSCTL */
 
 static const struct attribute_group reboot_attr_group = {
 	.attrs = reboot_attrs,
diff --git a/kernel/sched/autogroup.c b/kernel/sched/autogroup.c
index e380cf9372bb..70abe9035243 100644
--- a/kernel/sched/autogroup.c
+++ b/kernel/sched/autogroup.c
@@ -11,7 +11,7 @@ unsigned int __read_mostly sysctl_sched_autogroup_enabled = 1;
 static struct autogroup autogroup_default;
 static atomic_t autogroup_seq_nr;
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 static const struct ctl_table sched_autogroup_sysctls[] = {
 	{
 		.procname       = "sched_autogroup_enabled",
@@ -28,9 +28,9 @@ static void __init sched_autogroup_sysctl_init(void)
 {
 	register_sysctl_init("kernel", sched_autogroup_sysctls);
 }
-#else /* !CONFIG_SYSCTL: */
+#else /* !CONFIG_PROC_SYSCTL: */
 #define sched_autogroup_sysctl_init() do { } while (0)
-#endif /* !CONFIG_SYSCTL */
+#endif /* !CONFIG_PROC_SYSCTL */
 
 void __init autogroup_init(struct task_struct *init_task)
 {
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 96226707c2f6..ed8b8a014bf0 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -1966,7 +1966,7 @@ uclamp_update_active_tasks(struct cgroup_subsys_state *css)
 static void cpu_util_update_eff(struct cgroup_subsys_state *css);
 #endif
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 #ifdef CONFIG_UCLAMP_TASK_GROUP
 static void uclamp_update_root_tg(void)
 {
@@ -2071,7 +2071,7 @@ static int sysctl_sched_uclamp_handler(const struct ctl_table *table, int write,
 	sysctl_sched_uclamp_util_min_rt_default = old_min_rt;
 	return result;
 }
-#endif /* CONFIG_SYSCTL */
+#endif /* CONFIG_PROC_SYSCTL */
 
 static void uclamp_fork(struct task_struct *p)
 {
@@ -4741,7 +4741,7 @@ static int sysctl_schedstats(const struct ctl_table *table, int write, void *buf
 #endif /* CONFIG_PROC_SYSCTL */
 #endif /* CONFIG_SCHEDSTATS */
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 static const struct ctl_table sched_core_sysctls[] = {
 #ifdef CONFIG_SCHEDSTATS
 	{
@@ -4795,7 +4795,7 @@ static int __init sched_core_sysctl_init(void)
 	return 0;
 }
 late_initcall(sched_core_sysctl_init);
-#endif /* CONFIG_SYSCTL */
+#endif /* CONFIG_PROC_SYSCTL */
 
 /*
  * fork()/clone()-time setup:
diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c
index 0f858b98c9aa..59d666da15f7 100644
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@ -30,7 +30,7 @@
  */
 static unsigned int sysctl_sched_dl_period_max = 1 << 22; /* ~4 seconds */
 static unsigned int sysctl_sched_dl_period_min = 100;     /* 100 us */
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 static const struct ctl_table sched_dl_sysctls[] = {
 	{
 		.procname       = "sched_deadline_period_max_us",
@@ -56,7 +56,7 @@ static int __init sched_dl_sysctl_init(void)
 	return 0;
 }
 late_initcall(sched_dl_sysctl_init);
-#endif /* CONFIG_SYSCTL */
+#endif /* CONFIG_PROC_SYSCTL */
 
 static inline struct rq *rq_of_dl_rq(struct dl_rq *dl_rq)
 {
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index d78467ec6ee1..68acdbd6c30b 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -130,7 +130,7 @@ static unsigned int sysctl_sched_cfs_bandwidth_slice		= 5000UL;
 static unsigned int sysctl_numa_balancing_promote_rate_limit = 65536;
 #endif
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 static const struct ctl_table sched_fair_sysctls[] = {
 #ifdef CONFIG_CFS_BANDWIDTH
 	{
@@ -160,7 +160,7 @@ static int __init sched_fair_sysctl_init(void)
 	return 0;
 }
 late_initcall(sched_fair_sysctl_init);
-#endif /* CONFIG_SYSCTL */
+#endif /* CONFIG_PROC_SYSCTL */
 
 static inline void update_load_add(struct load_weight *lw, unsigned long inc)
 {
diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index e474c31d8fe6..0703e44a7e11 100644
--- a/kernel/sched/rt.c
+++ b/kernel/sched/rt.c
@@ -23,7 +23,7 @@ int sysctl_sched_rt_period = 1000000;
  */
 int sysctl_sched_rt_runtime = 1000000;
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 static int sysctl_sched_rr_timeslice = (MSEC_PER_SEC * RR_TIMESLICE) / HZ;
 static int sched_rt_handler(const struct ctl_table *table, int write, void *buffer,
 		size_t *lenp, loff_t *ppos);
@@ -63,7 +63,7 @@ static int __init sched_rt_sysctl_init(void)
 	return 0;
 }
 late_initcall(sched_rt_sysctl_init);
-#endif /* CONFIG_SYSCTL */
+#endif /* CONFIG_PROC_SYSCTL */
 
 void init_rt_rq(struct rt_rq *rt_rq)
 {
@@ -2846,7 +2846,7 @@ int sched_rt_can_attach(struct task_group *tg, struct task_struct *tsk)
 
 #endif /* !CONFIG_RT_GROUP_SCHED */
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 static int sched_rt_global_validate(void)
 {
 	if ((sysctl_sched_rt_runtime != RUNTIME_INF) &&
@@ -2931,7 +2931,7 @@ static int sched_rr_handler(const struct ctl_table *table, int write, void *buff
 
 	return ret;
 }
-#endif /* CONFIG_SYSCTL */
+#endif /* CONFIG_PROC_SYSCTL */
 
 void print_rt_stats(struct seq_file *m, int cpu)
 {
diff --git a/kernel/seccomp.c b/kernel/seccomp.c
index 066909393c38..48aef9c2247e 100644
--- a/kernel/seccomp.c
+++ b/kernel/seccomp.c
@@ -2284,7 +2284,7 @@ long seccomp_get_metadata(struct task_struct *task,
 }
 #endif
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 
 /* Human readable action names for friendly sysctl interaction */
 #define SECCOMP_RET_KILL_PROCESS_NAME	"kill_process"
@@ -2510,7 +2510,7 @@ static int __init seccomp_sysctl_init(void)
 
 device_initcall(seccomp_sysctl_init)
 
-#endif /* CONFIG_SYSCTL */
+#endif /* CONFIG_PROC_SYSCTL */
 
 #ifdef CONFIG_SECCOMP_CACHE_DEBUG
 /* Currently CONFIG_SECCOMP_CACHE_DEBUG implies SECCOMP_ARCH_NATIVE */
diff --git a/kernel/signal.c b/kernel/signal.c
index bbc0fd4cc4d7..5948dc28f475 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -4982,7 +4982,7 @@ static inline void siginfo_buildtime_checks(void)
 #endif
 }
 
-#if defined(CONFIG_SYSCTL)
+#if defined(CONFIG_PROC_SYSCTL)
 static const struct ctl_table signal_debug_table[] = {
 #ifdef CONFIG_SYSCTL_EXCEPTION_TRACE
 	{
@@ -5012,7 +5012,7 @@ static int __init init_signal_sysctls(void)
 	return 0;
 }
 early_initcall(init_signal_sysctls);
-#endif /* CONFIG_SYSCTL */
+#endif /* CONFIG_PROC_SYSCTL */
 
 void __init signals_init(void)
 {
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index c9efb17cc255..904eb2acc838 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -29,7 +29,7 @@ EXPORT_SYMBOL(sysctl_vals);
 const unsigned long sysctl_long_vals[] = { 0, 1, LONG_MAX };
 EXPORT_SYMBOL_GPL(sysctl_long_vals);
 
-#if defined(CONFIG_SYSCTL)
+#if defined(CONFIG_PROC_SYSCTL)
 
 /* Constants used for minimum and maximum */
 static const int ngroups_max = NGROUPS_MAX;
@@ -65,7 +65,7 @@ enum sysctl_writes_mode {
 
 static enum sysctl_writes_mode sysctl_writes_strict = SYSCTL_WRITES_STRICT;
 #endif /* CONFIG_PROC_SYSCTL */
-#endif /* CONFIG_SYSCTL */
+#endif /* CONFIG_PROC_SYSCTL */
 
 /*
  * /proc/sys support
@@ -1340,7 +1340,7 @@ int proc_do_large_bitmap(const struct ctl_table *table, int dir,
 
 #endif /* CONFIG_PROC_SYSCTL */
 
-#if defined(CONFIG_SYSCTL)
+#if defined(CONFIG_PROC_SYSCTL)
 int proc_do_static_key(const struct ctl_table *table, int dir,
 		       void *buffer, size_t *lenp, loff_t *ppos)
 {
@@ -1423,7 +1423,7 @@ int __init sysctl_init_bases(void)
 
 	return 0;
 }
-#endif /* CONFIG_SYSCTL */
+#endif /* CONFIG_PROC_SYSCTL */
 /*
  * No sense putting this after each symbol definition, twice,
  * exception granted :-)
diff --git a/kernel/time/timer.c b/kernel/time/timer.c
index 655a8c6cd84d..e0dbc1000e0b 100644
--- a/kernel/time/timer.c
+++ b/kernel/time/timer.c
@@ -287,7 +287,7 @@ static void timers_update_migration(void)
 		static_branch_disable(&timers_migration_enabled);
 }
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 static int timer_migration_handler(const struct ctl_table *table, int write,
 			    void *buffer, size_t *lenp, loff_t *ppos)
 {
@@ -319,7 +319,7 @@ static int __init timer_sysctl_init(void)
 	return 0;
 }
 device_initcall(timer_sysctl_init);
-#endif /* CONFIG_SYSCTL */
+#endif /* CONFIG_PROC_SYSCTL */
 #else /* CONFIG_SMP */
 static inline void timers_update_migration(void) { }
 #endif /* !CONFIG_SMP */
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index f93e34dd2328..27085b524bd2 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -9336,7 +9336,7 @@ int ftrace_lookup_symbols(const char **sorted_syms, size_t cnt, unsigned long *a
 	return found_all ? 0 : -ESRCH;
 }
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 
 #ifdef CONFIG_DYNAMIC_FTRACE
 static void ftrace_startup_sysctl(void)
diff --git a/kernel/ucount.c b/kernel/ucount.c
index d6dc3e859f12..5ea05d77fcdd 100644
--- a/kernel/ucount.c
+++ b/kernel/ucount.c
@@ -27,7 +27,7 @@ static DEFINE_SPINLOCK(ucounts_lock);
 #define ucounts_hashentry(ns, uid)	\
 	(ucounts_hashtable + ucounts_hashfn(ns, uid))
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 static struct ctl_table_set *
 set_lookup(struct ctl_table_root *root)
 {
@@ -90,11 +90,11 @@ static const struct ctl_table user_table[] = {
 	UCOUNT_ENTRY("max_fanotify_marks"),
 #endif
 };
-#endif /* CONFIG_SYSCTL */
+#endif /* CONFIG_PROC_SYSCTL */
 
 bool setup_userns_sysctls(struct user_namespace *ns)
 {
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 	struct ctl_table *tbl;
 
 	BUILD_BUG_ON(ARRAY_SIZE(user_table) != UCOUNT_COUNTS);
@@ -119,7 +119,7 @@ bool setup_userns_sysctls(struct user_namespace *ns)
 
 void retire_userns_sysctls(struct user_namespace *ns)
 {
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 	const struct ctl_table *tbl;
 
 	tbl = ns->sysctls->ctl_table_arg;
@@ -342,7 +342,7 @@ bool is_rlimit_overlimit(struct ucounts *ucounts, enum rlimit_type type, unsigne
 
 static __init int user_namespace_sysctl_init(void)
 {
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 	static struct ctl_table_header *user_header;
 	static struct ctl_table empty[1];
 	/*
diff --git a/kernel/umh.c b/kernel/umh.c
index 48117c569e1a..e03ff5f20531 100644
--- a/kernel/umh.c
+++ b/kernel/umh.c
@@ -493,7 +493,7 @@ int call_usermodehelper(const char *path, char **argv, char **envp, int wait)
 }
 EXPORT_SYMBOL(call_usermodehelper);
 
-#if defined(CONFIG_SYSCTL)
+#if defined(CONFIG_PROC_SYSCTL)
 static int proc_cap_handler(const struct ctl_table *table, int write,
 			 void *buffer, size_t *lenp, loff_t *ppos)
 {
@@ -567,4 +567,4 @@ static int __init init_umh_sysctls(void)
 	return 0;
 }
 early_initcall(init_umh_sysctls);
-#endif /* CONFIG_SYSCTL */
+#endif /* CONFIG_PROC_SYSCTL */
diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index 87dd5e0f6968..1efd97c78ee9 100644
--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
@@ -1040,7 +1040,7 @@ static __init void lockup_detector_setup(void)
 	 */
 	lockup_detector_update_enable();
 
-	if (!IS_ENABLED(CONFIG_SYSCTL) &&
+	if (!IS_ENABLED(CONFIG_PROC_SYSCTL) &&
 	    !(watchdog_enabled && watchdog_thresh))
 		return;
 
@@ -1082,7 +1082,7 @@ void lockup_detector_soft_poweroff(void)
 	watchdog_enabled = 0;
 }
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 
 /* Propagate any changes to the watchdog infrastructure */
 static void proc_watchdog_update(bool thresh_changed)
@@ -1320,7 +1320,7 @@ static void __init watchdog_sysctl_init(void)
 
 #else
 #define watchdog_sysctl_init() do { } while (0)
-#endif /* CONFIG_SYSCTL */
+#endif /* CONFIG_PROC_SYSCTL */
 
 static void __init lockup_detector_delay_init(struct work_struct *work);
 static bool allow_lockup_detector_init_retry __initdata;
diff --git a/lib/alloc_tag.c b/lib/alloc_tag.c
index d9be1cf5187d..0c378f0d061c 100644
--- a/lib/alloc_tag.c
+++ b/lib/alloc_tag.c
@@ -925,7 +925,7 @@ struct page_ext_operations page_alloc_tagging_ops = {
 };
 EXPORT_SYMBOL(page_alloc_tagging_ops);
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 /*
  * Not using proc_do_static_key() directly to prevent enabling profiling
  * after it was shut down.
@@ -967,9 +967,9 @@ static void __init sysctl_init(void)
 {
 	register_sysctl_init("vm", memory_allocation_profiling_sysctls);
 }
-#else /* CONFIG_SYSCTL */
+#else /* CONFIG_PROC_SYSCTL */
 static inline void sysctl_init(void) {}
-#endif /* CONFIG_SYSCTL */
+#endif /* CONFIG_PROC_SYSCTL */
 
 static int __init alloc_tag_init(void)
 {
diff --git a/lib/sys_info.c b/lib/sys_info.c
index f32a06ec9ed4..063dd0d80c42 100644
--- a/lib/sys_info.c
+++ b/lib/sys_info.c
@@ -48,7 +48,7 @@ unsigned long sys_info_parse_param(char *str)
 	return si_bits;
 }
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 
 static int sys_info_write_handler(const struct ctl_table *table,
 				  void *buffer, size_t *lenp, loff_t *ppos,
diff --git a/mm/hugetlb_internal.h b/mm/hugetlb_internal.h
index 1d2f870deccf..b26517d3a72a 100644
--- a/mm/hugetlb_internal.h
+++ b/mm/hugetlb_internal.h
@@ -108,7 +108,7 @@ extern ssize_t __nr_hugepages_store_common(bool obey_mempolicy,
 
 extern void hugetlb_sysfs_init(void) __init;
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 extern void hugetlb_sysctl_init(void);
 #else
 static inline void hugetlb_sysctl_init(void) { }
diff --git a/mm/hugetlb_sysctl.c b/mm/hugetlb_sysctl.c
index e74cf18ad431..8ebf349dcf40 100644
--- a/mm/hugetlb_sysctl.c
+++ b/mm/hugetlb_sysctl.c
@@ -10,7 +10,7 @@
 
 int movable_gigantic_pages;
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 static int proc_hugetlb_doulongvec_minmax(const struct ctl_table *table, int write,
 					  void *buffer, size_t *length,
 					  loff_t *ppos, unsigned long *out)
@@ -142,4 +142,4 @@ void __init hugetlb_sysctl_init(void)
 {
 	register_sysctl_init("vm", hugetlb_table);
 }
-#endif /* CONFIG_SYSCTL */
+#endif /* CONFIG_PROC_SYSCTL */
diff --git a/mm/memfd.c b/mm/memfd.c
index abe13b291ddc..de007c5066e3 100644
--- a/mm/memfd.c
+++ b/mm/memfd.c
@@ -343,7 +343,7 @@ long memfd_fcntl(struct file *file, unsigned int cmd, unsigned int arg)
 
 static int check_sysctl_memfd_noexec(unsigned int *flags)
 {
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 	struct pid_namespace *ns = task_active_pid_ns(current);
 	int sysctl = pidns_memfd_noexec_scope(ns);
 
diff --git a/mm/mmap.c b/mm/mmap.c
index 2311ae7c2ff4..c06acb37cc1d 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -1510,7 +1510,7 @@ struct vm_area_struct *_install_special_mapping(
 					&special_mapping_vmops);
 }
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 #if defined(HAVE_ARCH_PICK_MMAP_LAYOUT) || \
 		defined(CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT)
 int sysctl_legacy_va_layout;
@@ -1559,7 +1559,7 @@ static const struct ctl_table mmap_table[] = {
 		},
 #endif
 };
-#endif /* CONFIG_SYSCTL */
+#endif /* CONFIG_PROC_SYSCTL */
 
 /*
  * initialise the percpu counter for VM, initialise VMA state.
@@ -1570,7 +1570,7 @@ void __init mmap_init(void)
 
 	ret = percpu_counter_init(&vm_committed_as, 0, GFP_KERNEL);
 	VM_BUG_ON(ret);
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 	register_sysctl_init("vm", mmap_table);
 #endif
 	vma_state_init();
diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index 5f372f6e26fa..7d1643e09813 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -695,7 +695,7 @@ static void queue_oom_reaper(struct task_struct *tsk)
 	add_timer(&tsk->oom_reaper_timer);
 }
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 static const struct ctl_table vm_oom_kill_table[] = {
 	{
 		.procname	= "panic_on_oom",
@@ -726,7 +726,7 @@ static const struct ctl_table vm_oom_kill_table[] = {
 static int __init oom_init(void)
 {
 	oom_reaper_th = kthread_run(oom_reaper, NULL, "oom_reaper");
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 	register_sysctl_init("vm", vm_oom_kill_table);
 #endif
 	return 0;
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index e98748112d1e..936895e1579e 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -475,7 +475,7 @@ bool node_dirty_ok(struct pglist_data *pgdat)
 	return nr_pages <= limit;
 }
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 static int dirty_background_ratio_handler(const struct ctl_table *table, int write,
 		void *buffer, size_t *lenp, loff_t *ppos)
 {
@@ -2166,7 +2166,7 @@ bool wb_over_bg_thresh(struct bdi_writeback *wb)
 	return false;
 }
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 /*
  * sysctl handler for /proc/sys/vm/dirty_writeback_centisecs
  */
@@ -2221,7 +2221,7 @@ static int page_writeback_cpu_online(unsigned int cpu)
 	return 0;
 }
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 
 static int laptop_mode;
 static int laptop_mode_handler(const struct ctl_table *table, int write,
@@ -2334,7 +2334,7 @@ void __init page_writeback_init(void)
 			  page_writeback_cpu_online, NULL);
 	cpuhp_setup_state(CPUHP_MM_WRITEBACK_DEAD, "mm/writeback:dead", NULL,
 			  page_writeback_cpu_online);
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 	register_sysctl_init("vm", vm_page_writeback_sysctls);
 #endif
 }
diff --git a/mm/userfaultfd.c b/mm/userfaultfd.c
index 246af12bf801..e9a4a6d9c0be 100644
--- a/mm/userfaultfd.c
+++ b/mm/userfaultfd.c
@@ -2324,7 +2324,7 @@ static void userfaultfd_release_all(struct mm_struct *mm,
 
 static int sysctl_unprivileged_userfaultfd __read_mostly;
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 static const struct ctl_table vm_userfaultfd_table[] = {
 	{
 		.procname	= "unprivileged_userfaultfd",
@@ -4534,7 +4534,7 @@ static int __init userfaultfd_init(void)
 						0,
 						SLAB_HWCACHE_ALIGN|SLAB_PANIC,
 						init_once_userfaultfd_ctx);
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 	register_sysctl_init("vm", vm_userfaultfd_table);
 #endif
 	return 0;
diff --git a/mm/util.c b/mm/util.c
index af2c2103f0d9..445fe086c16e 100644
--- a/mm/util.c
+++ b/mm/util.c
@@ -785,7 +785,7 @@ int sysctl_max_map_count __read_mostly = DEFAULT_MAX_MAP_COUNT;
 unsigned long sysctl_user_reserve_kbytes __read_mostly = 1UL << 17; /* 128MB */
 unsigned long sysctl_admin_reserve_kbytes __read_mostly = 1UL << 13; /* 8MB */
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 
 static int overcommit_ratio_handler(const struct ctl_table *table, int write,
 				void *buffer, size_t *lenp, loff_t *ppos)
@@ -896,7 +896,7 @@ static int __init init_vm_util_sysctls(void)
 	return 0;
 }
 subsys_initcall(init_vm_util_sysctls);
-#endif /* CONFIG_SYSCTL */
+#endif /* CONFIG_PROC_SYSCTL */
 
 /*
  * Committed memory limit enforced when OVERCOMMIT_NEVER policy is used
diff --git a/net/Makefile b/net/Makefile
index 5b2dd7f07a85..b3f8082d49d0 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -54,7 +54,7 @@ obj-$(CONFIG_6LOWPAN)		+= 6lowpan/
 obj-$(CONFIG_IEEE802154)	+= ieee802154/
 obj-$(CONFIG_MAC802154)		+= mac802154/
 
-obj-$(CONFIG_SYSCTL)		+= sysctl_net.o
+obj-$(CONFIG_PROC_SYSCTL)	+= sysctl_net.o
 obj-$(CONFIG_DNS_RESOLVER)	+= dns_resolver/
 obj-$(CONFIG_CEPH_LIB)		+= ceph/
 obj-$(CONFIG_BATMAN_ADV)	+= batman-adv/
diff --git a/net/bridge/br_netfilter_hooks.c b/net/bridge/br_netfilter_hooks.c
index 0a394e5f4391..53bb30e9eb22 100644
--- a/net/bridge/br_netfilter_hooks.c
+++ b/net/bridge/br_netfilter_hooks.c
@@ -42,7 +42,7 @@
 
 #include <linux/uaccess.h>
 #include "br_private.h"
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 #include <linux/sysctl.h>
 #endif
 
@@ -55,7 +55,7 @@ static unsigned int brnf_net_id __read_mostly;
 struct brnf_net {
 	bool enabled;
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 	struct ctl_table_header *ctl_hdr;
 #endif
 
@@ -1167,7 +1167,7 @@ int br_nf_hook_thresh(unsigned int hook, struct net *net,
 	return ret;
 }
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 static
 int brnf_sysctl_call_tables(const struct ctl_table *ctl, int write,
 			    void *buffer, size_t *lenp, loff_t *ppos)
@@ -1289,13 +1289,13 @@ static void __net_exit brnf_exit_net(struct net *net)
 		brnet->enabled = false;
 	}
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 	br_netfilter_sysctl_exit_net(net, brnet);
 #endif
 }
 
 static struct pernet_operations brnf_net_ops __read_mostly = {
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 	.init = brnf_init_net,
 #endif
 	.exit = brnf_exit_net,
diff --git a/net/bridge/br_netfilter_ipv6.c b/net/bridge/br_netfilter_ipv6.c
index d8548428929e..71fa87a65e02 100644
--- a/net/bridge/br_netfilter_ipv6.c
+++ b/net/bridge/br_netfilter_ipv6.c
@@ -37,7 +37,7 @@
 
 #include <linux/uaccess.h>
 #include "br_private.h"
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 #include <linux/sysctl.h>
 #endif
 
diff --git a/net/bridge/br_nf_core.c b/net/bridge/br_nf_core.c
index a8c67035e23c..099c65bdae3f 100644
--- a/net/bridge/br_nf_core.c
+++ b/net/bridge/br_nf_core.c
@@ -17,7 +17,7 @@
 #include <net/route.h>
 
 #include "br_private.h"
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 #include <linux/sysctl.h>
 #endif
 
diff --git a/net/core/Makefile b/net/core/Makefile
index b3fdcb4e355f..c249e3481b8a 100644
--- a/net/core/Makefile
+++ b/net/core/Makefile
@@ -7,7 +7,7 @@ obj-y := sock.o skbuff.o datagram.o stream.o scm.o \
 	 gen_stats.o gen_estimator.o net_namespace.o secure_seq.o \
 	 flow_dissector.o
 
-obj-$(CONFIG_SYSCTL) += sysctl_net_core.o
+obj-$(CONFIG_PROC_SYSCTL) += sysctl_net_core.o
 
 obj-y		     += dev.o dev_api.o dev_addr_lists.o dst.o netevent.o \
 			neighbour.o rtnetlink.o utils.o link_watch.o filter.o \
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 1349c0eedb64..a9d879e1dc39 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -20,7 +20,7 @@
 #include <linux/socket.h>
 #include <linux/netdevice.h>
 #include <linux/proc_fs.h>
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 #include <linux/sysctl.h>
 #endif
 #include <linux/times.h>
@@ -3595,7 +3595,7 @@ void neigh_app_ns(struct neighbour *n)
 }
 EXPORT_SYMBOL(neigh_app_ns);
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 static int unres_qlen_max = INT_MAX / SKB_TRUESIZE(ETH_FRAME_LEN);
 
 static int proc_unres_qlen(const struct ctl_table *ctl, int write,
@@ -3939,7 +3939,7 @@ void neigh_sysctl_unregister(struct neigh_parms *p)
 }
 EXPORT_SYMBOL(neigh_sysctl_unregister);
 
-#endif	/* CONFIG_SYSCTL */
+#endif	/* CONFIG_PROC_SYSCTL */
 
 static const struct rtnl_msg_handler neigh_rtnl_msg_handlers[] __initconst = {
 	{.msgtype = RTM_NEWNEIGH, .doit = neigh_add},
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
index 0e71c9ed41e8..20952eaac422 100644
--- a/net/core/net-sysfs.c
+++ b/net/core/net-sysfs.c
@@ -1190,7 +1190,7 @@ static const struct kobj_type rx_queue_ktype = {
 static int rx_queue_default_mask(struct net_device *dev,
 				 struct netdev_rx_queue *queue)
 {
-#if IS_ENABLED(CONFIG_RPS) && IS_ENABLED(CONFIG_SYSCTL)
+#if IS_ENABLED(CONFIG_RPS) && IS_ENABLED(CONFIG_PROC_SYSCTL)
 	struct cpumask *rps_default_mask;
 	int res = 0;
 
diff --git a/net/ieee802154/6lowpan/reassembly.c b/net/ieee802154/6lowpan/reassembly.c
index ddb6a5817d09..0c2d990cee19 100644
--- a/net/ieee802154/6lowpan/reassembly.c
+++ b/net/ieee802154/6lowpan/reassembly.c
@@ -324,7 +324,7 @@ int lowpan_frag_rcv(struct sk_buff *skb, u8 frag_type)
 	return -1;
 }
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 
 static struct ctl_table lowpan_frags_ns_ctl_table[] = {
 	{
diff --git a/net/ipv4/Makefile b/net/ipv4/Makefile
index 06e21c26b76f..650311c8cd8f 100644
--- a/net/ipv4/Makefile
+++ b/net/ipv4/Makefile
@@ -17,7 +17,7 @@ obj-y     := route.o inetpeer.o protocol.o \
 	     metrics.o netlink.o nexthop.o udp_tunnel_stub.o
 
 obj-$(CONFIG_NET_IP_TUNNEL) += ip_tunnel.o
-obj-$(CONFIG_SYSCTL) += sysctl_net_ipv4.o
+obj-$(CONFIG_PROC_SYSCTL) += sysctl_net_ipv4.o
 obj-$(CONFIG_PROC_FS) += proc.o
 obj-$(CONFIG_IP_MULTIPLE_TABLES) += fib_rules.o
 obj-$(CONFIG_IP_MROUTE) += ipmr.o
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
index 32d006c1a8ee..13309f28e1fc 100644
--- a/net/ipv4/af_inet.c
+++ b/net/ipv4/af_inet.c
@@ -1802,7 +1802,7 @@ static __net_init int inet_init_net(struct net *net)
 	net->ipv4.sysctl_udp_early_demux = 1;
 	net->ipv4.sysctl_tcp_early_demux = 1;
 	net->ipv4.sysctl_nexthop_compat_mode = 1;
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 	net->ipv4.sysctl_ip_prot_sock = PROT_SOCK;
 #endif
 
@@ -1911,7 +1911,7 @@ static int __init inet_init(void)
 
 	(void)sock_register(&inet_family_ops);
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 	ip_static_sysctl_init();
 #endif
 
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c
index d409f606aec0..e72afe6b9259 100644
--- a/net/ipv4/arp.c
+++ b/net/ipv4/arp.c
@@ -96,7 +96,7 @@
 #include <linux/net.h>
 #include <linux/rcupdate.h>
 #include <linux/slab.h>
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 #include <linux/sysctl.h>
 #endif
 
@@ -1517,7 +1517,7 @@ void __init arp_init(void)
 
 	dev_add_pack(&arp_packet_type);
 	register_pernet_subsys(&arp_net_ops);
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 	neigh_sysctl_register(NULL, &arp_tbl.parms, NULL);
 #endif
 	register_netdevice_notifier(&arp_netdev_notifier);
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index a35b72662e43..21e12e2469ce 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -49,7 +49,7 @@
 #include "igmp_internal.h"
 #include <linux/slab.h>
 #include <linux/hash.h>
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 #include <linux/sysctl.h>
 #endif
 #include <linux/kmod.h>
@@ -190,7 +190,7 @@ static BLOCKING_NOTIFIER_HEAD(inetaddr_validator_chain);
 static void inet_del_ifa(struct in_device *in_dev,
 			 struct in_ifaddr __rcu **ifap,
 			 int destroy);
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 static int devinet_sysctl_register(struct in_device *idev);
 static void devinet_sysctl_unregister(struct in_device *idev);
 #else
@@ -2502,7 +2502,7 @@ static int inet_netconf_dump_devconf(struct sk_buff *skb,
 	return err;
 }
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 
 static void devinet_copy_dflt_conf(struct net *net, int i)
 {
@@ -2814,7 +2814,7 @@ static struct ctl_table ctl_forward_entry[] = {
 
 static __net_init int devinet_init_net(struct net *net)
 {
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 	struct ctl_table_header *forw_hdr;
 	struct ctl_table *tbl;
 #endif
@@ -2836,7 +2836,7 @@ static __net_init int devinet_init_net(struct net *net)
 	if (!dflt)
 		goto err_alloc_dflt;
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 	tbl = kmemdup(ctl_forward_entry, sizeof(ctl_forward_entry), GFP_KERNEL);
 	if (!tbl)
 		goto err_alloc_ctl;
@@ -2870,7 +2870,7 @@ static __net_init int devinet_init_net(struct net *net)
 		}
 	}
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 	err = __devinet_sysctl_register(net, "all", NETCONFA_IFINDEX_ALL, all);
 	if (err < 0)
 		goto err_reg_all;
@@ -2897,7 +2897,7 @@ static __net_init int devinet_init_net(struct net *net)
 	net->ipv4.devconf_dflt = dflt;
 	return 0;
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 err_reg_ctl:
 	__devinet_sysctl_unregister(net, dflt, NETCONFA_IFINDEX_DEFAULT);
 err_reg_dflt:
@@ -2917,13 +2917,13 @@ static __net_init int devinet_init_net(struct net *net)
 
 static __net_exit void devinet_exit_net(struct net *net)
 {
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 	const struct ctl_table *tbl;
 #endif
 
 	cancel_delayed_work_sync(&net->ipv4.addr_chk_work);
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 	tbl = net->ipv4.forw_hdr->ctl_table_arg;
 	unregister_net_sysctl_table(net->ipv4.forw_hdr);
 	__devinet_sysctl_unregister(net, net->ipv4.devconf_dflt,
diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c
index c790d2f49487..5cd7c9e3fb7c 100644
--- a/net/ipv4/ip_fragment.c
+++ b/net/ipv4/ip_fragment.c
@@ -542,7 +542,7 @@ struct sk_buff *ip_check_defrag(struct net *net, struct sk_buff *skb, u32 user)
 }
 EXPORT_SYMBOL(ip_check_defrag);
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 static int dist_min;
 
 static struct ctl_table ip4_frags_ns_ctl_table[] = {
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 3f3de5164d6e..b19f428a03d8 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -99,7 +99,7 @@
 #include <net/lwtunnel.h>
 #include <net/netevent.h>
 #include <net/rtnetlink.h>
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 #include <linux/sysctl.h>
 #endif
 #include <net/secure_seq.h>
@@ -3459,7 +3459,7 @@ void ip_rt_multicast_event(struct in_device *in_dev)
 	rt_cache_flush(dev_net(in_dev->dev));
 }
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 static int ip_rt_gc_interval __read_mostly  = 60 * HZ;
 static int ip_rt_gc_min_interval __read_mostly	= HZ / 2;
 static int ip_rt_gc_elasticity __read_mostly	= 8;
@@ -3775,7 +3775,7 @@ int __init ip_rt_init(void)
 #endif
 	rtnl_register_many(ip_rt_rtnl_msg_handlers);
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 	register_pernet_subsys(&sysctl_route_ops);
 #endif
 	register_pernet_subsys(&ip_rt_ops);
@@ -3784,7 +3784,7 @@ int __init ip_rt_init(void)
 	return 0;
 }
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 /*
  * We really need to sanitize the damn ipv4 init order, then all
  * this nonsense will go away.
diff --git a/net/ipv4/xfrm4_policy.c b/net/ipv4/xfrm4_policy.c
index 58faf1ddd2b1..7d7b3ae439a3 100644
--- a/net/ipv4/xfrm4_policy.c
+++ b/net/ipv4/xfrm4_policy.c
@@ -140,7 +140,7 @@ static const struct xfrm_policy_afinfo xfrm4_policy_afinfo = {
 	.blackhole_route =	ipv4_blackhole_route,
 };
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 static struct ctl_table xfrm4_policy_table[] = {
 	{
 		.procname       = "xfrm4_gc_thresh",
@@ -192,7 +192,7 @@ static __net_exit void xfrm4_net_sysctl_exit(struct net *net)
 	if (!net_eq(net, &init_net))
 		kfree(table);
 }
-#else /* CONFIG_SYSCTL */
+#else /* CONFIG_PROC_SYSCTL */
 static inline int xfrm4_net_sysctl_init(struct net *net)
 {
 	return 0;
diff --git a/net/ipv6/Makefile b/net/ipv6/Makefile
index 5b0cd6488021..1ca7d9b8caab 100644
--- a/net/ipv6/Makefile
+++ b/net/ipv6/Makefile
@@ -12,7 +12,7 @@ ipv6-y :=	af_inet6.o anycast.o ip6_output.o ip6_input.o addrconf.o \
 		exthdrs.o datagram.o ip6_flowlabel.o inet6_connection_sock.o \
 		udp_offload.o seg6.o fib6_notifier.o rpl.o ioam6.o
 
-ipv6-$(CONFIG_SYSCTL) += sysctl_net_ipv6.o
+ipv6-$(CONFIG_PROC_SYSCTL) += sysctl_net_ipv6.o
 ipv6-$(CONFIG_IPV6_MROUTE) += ip6mr.o
 
 ipv6-$(CONFIG_XFRM) += xfrm6_policy.o xfrm6_state.o xfrm6_input.o \
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index cbe681de3818..713b07becbe1 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -55,7 +55,7 @@
 #include <linux/inetdevice.h>
 #include <linux/init.h>
 #include <linux/slab.h>
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 #include <linux/sysctl.h>
 #endif
 #include <linux/capability.h>
@@ -123,7 +123,7 @@ static inline s32 rfc3315_s14_backoff_update(s32 rt, s32 mrt)
 	return (s32)tmp;
 }
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 static int addrconf_sysctl_register(struct inet6_dev *idev);
 static void addrconf_sysctl_unregister(struct inet6_dev *idev);
 #else
@@ -802,7 +802,7 @@ static int inet6_netconf_dump_devconf(struct sk_buff *skb,
 	return err;
 }
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 static void dev_forward_change(struct inet6_dev *idev)
 {
 	struct net_device *dev;
@@ -6357,7 +6357,7 @@ static void ipv6_ifa_notify(int event, struct inet6_ifaddr *ifp)
 		__ipv6_ifa_notify(event, ifp);
 }
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 
 static int addrconf_sysctl_forward(const struct ctl_table *ctl, int write,
 		void *buffer, size_t *lenp, loff_t *ppos)
@@ -7481,7 +7481,7 @@ static int __net_init addrconf_init_net(struct net *net)
 	net->ipv6.devconf_all = all;
 	net->ipv6.devconf_dflt = dflt;
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 	err = __addrconf_sysctl_register(net, "all", NULL, all);
 	if (err < 0)
 		goto err_reg_all;
@@ -7492,7 +7492,7 @@ static int __net_init addrconf_init_net(struct net *net)
 #endif
 	return 0;
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 err_reg_dflt:
 	__addrconf_sysctl_unregister(net, all, NETCONFA_IFINDEX_ALL);
 err_reg_all:
@@ -7512,7 +7512,7 @@ static void __net_exit addrconf_exit_net(struct net *net)
 {
 	int i;
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 	__addrconf_sysctl_unregister(net, net->ipv6.devconf_dflt,
 				     NETCONFA_IFINDEX_DEFAULT);
 	__addrconf_sysctl_unregister(net, net->ipv6.devconf_all,
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c
index 282912a11999..3ab0c62c2c70 100644
--- a/net/ipv6/af_inet6.c
+++ b/net/ipv6/af_inet6.c
@@ -1143,7 +1143,7 @@ static int __init inet6_init(void)
 	if (err)
 		goto igmp6_late_err;
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 	err = ipv6_sysctl_register();
 	if (err)
 		goto sysctl_fail;
@@ -1152,7 +1152,7 @@ static int __init inet6_init(void)
 out:
 	return err;
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 sysctl_fail:
 	igmp6_late_cleanup();
 #endif
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c
index efb23807a026..67f656d5dcd7 100644
--- a/net/ipv6/icmp.c
+++ b/net/ipv6/icmp.c
@@ -40,7 +40,7 @@
 #include <linux/netfilter.h>
 #include <linux/slab.h>
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 #include <linux/sysctl.h>
 #endif
 
@@ -1369,7 +1369,7 @@ int icmpv6_err_convert(u8 type, u8 code, int *err)
 }
 EXPORT_SYMBOL(icmpv6_err_convert);
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 
 static u32 icmpv6_errors_extension_mask_all =
 	GENMASK_U8(ICMP_ERR_EXT_COUNT - 1, 0);
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
index f867ec8d3d90..1f03e214a269 100644
--- a/net/ipv6/ndisc.c
+++ b/net/ipv6/ndisc.c
@@ -37,7 +37,7 @@
 #include <linux/init.h>
 #include <linux/rcupdate.h>
 #include <linux/slab.h>
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 #include <linux/sysctl.h>
 #endif
 
@@ -1908,7 +1908,7 @@ static struct notifier_block ndisc_netdev_notifier = {
 	.priority = ADDRCONF_NOTIFY_PRIORITY - 5,
 };
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 static void ndisc_warn_deprecated_sysctl(const struct ctl_table *ctl,
 					 const char *func, const char *dev_name)
 {
@@ -2009,7 +2009,7 @@ int __init ndisc_init(void)
 	 */
 	neigh_table_init(NEIGH_ND_TABLE, &nd_tbl);
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 	err = neigh_sysctl_register(NULL, &nd_tbl.parms,
 				    ndisc_ifinfo_sysctl_change);
 	if (err)
@@ -2018,7 +2018,7 @@ int __init ndisc_init(void)
 #endif
 	return err;
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 out_unregister_pernet:
 	unregister_pernet_subsys(&ndisc_net_ops);
 	goto out;
@@ -2037,7 +2037,7 @@ void ndisc_late_cleanup(void)
 
 void ndisc_cleanup(void)
 {
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 	neigh_sysctl_unregister(&nd_tbl.parms);
 #endif
 	neigh_table_clear(NEIGH_ND_TABLE, &nd_tbl);
diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c b/net/ipv6/netfilter/nf_conntrack_reasm.c
index 599c49bf0a0a..228005d6905f 100644
--- a/net/ipv6/netfilter/nf_conntrack_reasm.c
+++ b/net/ipv6/netfilter/nf_conntrack_reasm.c
@@ -41,7 +41,7 @@ static struct nft_ct_frag6_pernet *nf_frag_pernet(struct net *net)
 	return net_generic(net, nf_frag_pernet_id);
 }
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 
 static struct ctl_table nf_ct_frag6_sysctl_table[] = {
 	{
diff --git a/net/ipv6/reassembly.c b/net/ipv6/reassembly.c
index 05c51f669754..42ac44af4632 100644
--- a/net/ipv6/reassembly.c
+++ b/net/ipv6/reassembly.c
@@ -418,7 +418,7 @@ static const struct inet6_protocol frag_protocol = {
 	.flags		=	INET6_PROTO_NOPOLICY,
 };
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 
 static struct ctl_table ip6_frags_ns_ctl_table[] = {
 	{
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index a1301334da48..6c7fbceec477 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -64,7 +64,7 @@
 #include <linux/uaccess.h>
 #include <linux/btf_ids.h>
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 #include <linux/sysctl.h>
 #endif
 
@@ -6534,7 +6534,7 @@ static int rt6_stats_seq_show(struct seq_file *seq, void *v)
 }
 #endif	/* CONFIG_PROC_FS */
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 
 static int ipv6_sysctl_rtcache_flush(const struct ctl_table *ctl, int write,
 			      void *buffer, size_t *lenp, loff_t *ppos)
diff --git a/net/ipv6/xfrm6_policy.c b/net/ipv6/xfrm6_policy.c
index 3b749475f6ed..faa614b69cfb 100644
--- a/net/ipv6/xfrm6_policy.c
+++ b/net/ipv6/xfrm6_policy.c
@@ -186,7 +186,7 @@ static void xfrm6_policy_fini(void)
 	xfrm_policy_unregister_afinfo(&xfrm6_policy_afinfo);
 }
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 static struct ctl_table xfrm6_policy_table[] = {
 	{
 		.procname       = "xfrm6_gc_thresh",
@@ -238,7 +238,7 @@ static void __net_exit xfrm6_net_sysctl_exit(struct net *net)
 	if (!net_eq(net, &init_net))
 		kfree(table);
 }
-#else /* CONFIG_SYSCTL */
+#else /* CONFIG_PROC_SYSCTL */
 static inline int xfrm6_net_sysctl_init(struct net *net)
 {
 	return 0;
diff --git a/net/llc/Makefile b/net/llc/Makefile
index 46b1cd905ffd..4aaa9b9c7bb3 100644
--- a/net/llc/Makefile
+++ b/net/llc/Makefile
@@ -16,4 +16,4 @@ llc2-y := llc_if.o llc_c_ev.o llc_c_ac.o llc_conn.o llc_c_st.o llc_pdu.o \
 	  llc_sap.o llc_s_ac.o llc_s_ev.o llc_s_st.o af_llc.o llc_station.o
 
 llc2-$(CONFIG_PROC_FS) += llc_proc.o
-llc2-$(CONFIG_SYSCTL)  += sysctl_net_llc.o
+llc2-$(CONFIG_PROC_SYSCTL)  += sysctl_net_llc.o
diff --git a/net/mptcp/ctrl.c b/net/mptcp/ctrl.c
index 63c5747f0f63..06258a9497ca 100644
--- a/net/mptcp/ctrl.c
+++ b/net/mptcp/ctrl.c
@@ -4,7 +4,7 @@
  * Copyright (c) 2019, Tessares SA.
  */
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 #include <linux/sysctl.h>
 #endif
 
@@ -18,12 +18,12 @@
 
 static int mptcp_pernet_id;
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 static int mptcp_pm_type_max = __MPTCP_PM_TYPE_MAX;
 #endif
 
 struct mptcp_pernet {
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 	struct ctl_table_header *ctl_table_hdr;
 #endif
 
@@ -117,7 +117,7 @@ static void mptcp_pernet_set_defaults(struct mptcp_pernet *pernet)
 	pernet->add_addr_v6_port_drop_ts = 1;
 }
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 static int mptcp_set_scheduler(char *scheduler, const char *name)
 {
 	struct mptcp_sched_ops *sched;
@@ -440,7 +440,7 @@ static int mptcp_pernet_new_table(struct net *net, struct mptcp_pernet *pernet)
 
 static void mptcp_pernet_del_table(struct mptcp_pernet *pernet) {}
 
-#endif /* CONFIG_SYSCTL */
+#endif /* CONFIG_PROC_SYSCTL */
 
 /* The following code block is to deal with middle box issues with MPTCP,
  * similar to what is done with TFO.
diff --git a/net/netfilter/ipvs/ip_vs_conn.c b/net/netfilter/ipvs/ip_vs_conn.c
index 6ed2622363f0..76e633bcf299 100644
--- a/net/netfilter/ipvs/ip_vs_conn.c
+++ b/net/netfilter/ipvs/ip_vs_conn.c
@@ -1166,7 +1166,7 @@ static inline void ip_vs_unbind_dest(struct ip_vs_conn *cp)
 static int expire_quiescent_template(struct netns_ipvs *ipvs,
 				     struct ip_vs_dest *dest)
 {
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 	return ipvs->sysctl_expire_quiescent_template &&
 		(atomic_read(&dest->weight) == 0);
 #else
@@ -1710,7 +1710,7 @@ static const struct seq_operations ip_vs_conn_sync_seq_ops = {
 };
 #endif
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 
 /* Randomly drop connection entries before running out of memory
  * Can be used for DATA and CTL conns. For TPL conns there are exceptions:
@@ -1903,7 +1903,7 @@ static void ip_vs_conn_flush(struct netns_ipvs *ipvs)
 	}
 }
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 void ip_vs_expire_nodest_conn_flush(struct netns_ipvs *ipvs)
 {
 	DECLARE_IP_VS_RHT_WALK_BUCKETS_RCU();
diff --git a/net/netfilter/ipvs/ip_vs_core.c b/net/netfilter/ipvs/ip_vs_core.c
index bafab93451d0..cfe5c7d92a8b 100644
--- a/net/netfilter/ipvs/ip_vs_core.c
+++ b/net/netfilter/ipvs/ip_vs_core.c
@@ -848,7 +848,7 @@ int ip_vs_leave(struct ip_vs_service *svc, struct sk_buff *skb,
 	return NF_DROP;
 }
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 
 static int sysctl_snat_reroute(struct netns_ipvs *ipvs)
 {
diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c
index bcf40b8c41cf..0c8663f4d581 100644
--- a/net/netfilter/ipvs/ip_vs_ctl.c
+++ b/net/netfilter/ipvs/ip_vs_ctl.c
@@ -85,7 +85,7 @@ static bool __ip_vs_addr_is_local_v6(struct net *net,
 }
 #endif
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 /*
  *	update_defense_level is called from keventd and from sysctl,
  *	so it needs to protect itself from softirqs
@@ -1599,7 +1599,7 @@ static void __ip_vs_del_dest(struct netns_ipvs *ipvs, struct ip_vs_dest *dest,
 	ip_vs_trash_put_dest(ipvs, dest, 0, cleanup);
 
 	/* Queue up delayed work to expire all no destination connections.
-	 * No-op when CONFIG_SYSCTL is disabled.
+	 * No-op when CONFIG_PROC_SYSCTL is disabled.
 	 */
 	if (!cleanup)
 		ip_vs_enqueue_expire_nodest_conns(ipvs);
@@ -2320,7 +2320,7 @@ static int ip_vs_zero_all(struct netns_ipvs *ipvs)
 	return 0;
 }
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 
 static int
 proc_do_conn_max(const struct ctl_table *table, int write,
@@ -4991,7 +4991,7 @@ static void ip_vs_genl_unregister(void)
 /*
  * per netns intit/exit func.
  */
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 static int __net_init ip_vs_control_net_init_sysctl(struct netns_ipvs *ipvs)
 {
 	struct net *net = ipvs->net;
diff --git a/net/netfilter/ipvs/ip_vs_lblc.c b/net/netfilter/ipvs/ip_vs_lblc.c
index 15ccb2b2fa1f..703eaab8d1ca 100644
--- a/net/netfilter/ipvs/ip_vs_lblc.c
+++ b/net/netfilter/ipvs/ip_vs_lblc.c
@@ -113,7 +113,7 @@ struct ip_vs_lblc_table {
 /*
  *      IPVS LBLC sysctl table
  */
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 static struct ctl_table vs_vars_table[] = {
 	{
 		.procname	= "lblc_expiration",
@@ -244,7 +244,7 @@ static void ip_vs_lblc_flush(struct ip_vs_service *svc)
 
 static int sysctl_lblc_expiration(struct ip_vs_service *svc)
 {
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 	return svc->ipvs->sysctl_lblc_expiration;
 #else
 	return DEFAULT_EXPIRATION;
@@ -545,7 +545,7 @@ static struct ip_vs_scheduler ip_vs_lblc_scheduler = {
 /*
  *  per netns init.
  */
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 static int __net_init __ip_vs_lblc_init(struct net *net)
 {
 	struct netns_ipvs *ipvs = net_ipvs(net);
diff --git a/net/netfilter/ipvs/ip_vs_lblcr.c b/net/netfilter/ipvs/ip_vs_lblcr.c
index c90ea897c3f7..a849a6d973ee 100644
--- a/net/netfilter/ipvs/ip_vs_lblcr.c
+++ b/net/netfilter/ipvs/ip_vs_lblcr.c
@@ -280,7 +280,7 @@ struct ip_vs_lblcr_table {
 };
 
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 /*
  *      IPVS LBLCR sysctl table
  */
@@ -409,7 +409,7 @@ static void ip_vs_lblcr_flush(struct ip_vs_service *svc)
 
 static int sysctl_lblcr_expiration(struct ip_vs_service *svc)
 {
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 	return svc->ipvs->sysctl_lblcr_expiration;
 #else
 	return DEFAULT_EXPIRATION;
@@ -731,7 +731,7 @@ static struct ip_vs_scheduler ip_vs_lblcr_scheduler =
 /*
  *  per netns init.
  */
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 static int __net_init __ip_vs_lblcr_init(struct net *net)
 {
 	struct netns_ipvs *ipvs = net_ipvs(net);
diff --git a/net/netfilter/nf_conntrack_proto.c b/net/netfilter/nf_conntrack_proto.c
index ad96896516b6..940e6fba2ef8 100644
--- a/net/netfilter/nf_conntrack_proto.c
+++ b/net/netfilter/nf_conntrack_proto.c
@@ -44,7 +44,7 @@
 
 static DEFINE_MUTEX(nf_ct_proto_mutex);
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 __printf(4, 5)
 void nf_l4proto_log_invalid(const struct sk_buff *skb,
 			    const struct nf_hook_state *state,
diff --git a/net/netfilter/nf_conntrack_standalone.c b/net/netfilter/nf_conntrack_standalone.c
index be2953c7d702..40bac73373b2 100644
--- a/net/netfilter/nf_conntrack_standalone.c
+++ b/net/netfilter/nf_conntrack_standalone.c
@@ -10,7 +10,7 @@
 #include <linux/netdevice.h>
 #include <linux/security.h>
 #include <net/net_namespace.h>
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 #include <linux/sysctl.h>
 #endif
 
@@ -532,7 +532,7 @@ EXPORT_SYMBOL_GPL(nf_conntrack_count);
 
 /* Sysctl support */
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 /* size the user *wants to set */
 static unsigned int nf_conntrack_htable_size_user __read_mostly;
 
@@ -1074,7 +1074,7 @@ static int nf_conntrack_standalone_init_sysctl(struct net *net)
 static void nf_conntrack_standalone_fini_sysctl(struct net *net)
 {
 }
-#endif /* CONFIG_SYSCTL */
+#endif /* CONFIG_PROC_SYSCTL */
 
 static void nf_conntrack_fini_net(struct net *net)
 {
@@ -1145,7 +1145,7 @@ static int __init nf_conntrack_standalone_init(void)
 
 	BUILD_BUG_ON(NFCT_INFOMASK <= IP_CT_NUMBER);
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 	nf_ct_netfilter_header =
 		register_net_sysctl(&init_net, "net", nf_ct_netfilter_table);
 	if (!nf_ct_netfilter_header) {
@@ -1166,7 +1166,7 @@ static int __init nf_conntrack_standalone_init(void)
 	return 0;
 
 out_pernet:
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 	unregister_net_sysctl_table(nf_ct_netfilter_header);
 out_sysctl:
 #endif
@@ -1179,7 +1179,7 @@ static void __exit nf_conntrack_standalone_fini(void)
 {
 	nf_conntrack_cleanup_start();
 	unregister_pernet_subsys(&nf_conntrack_net_ops);
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 	unregister_net_sysctl_table(nf_ct_netfilter_header);
 #endif
 	nf_conntrack_cleanup_end();
diff --git a/net/netfilter/nf_hooks_lwtunnel.c b/net/netfilter/nf_hooks_lwtunnel.c
index 2d890dd04ff8..71e38eb1f3f0 100644
--- a/net/netfilter/nf_hooks_lwtunnel.c
+++ b/net/netfilter/nf_hooks_lwtunnel.c
@@ -27,7 +27,7 @@ static inline int nf_hooks_lwtunnel_set(int enable)
 	return 0;
 }
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 int nf_hooks_lwtunnel_sysctl_handler(const struct ctl_table *table, int write,
 				     void *buffer, size_t *lenp, loff_t *ppos)
 {
@@ -120,4 +120,4 @@ void netfilter_lwtunnel_fini(void)
 #else
 int __init netfilter_lwtunnel_init(void) { return 0; }
 void netfilter_lwtunnel_fini(void) {}
-#endif /* CONFIG_SYSCTL */
+#endif /* CONFIG_PROC_SYSCTL */
diff --git a/net/netfilter/nf_log.c b/net/netfilter/nf_log.c
index f4d80654dfe6..34451f818b37 100644
--- a/net/netfilter/nf_log.c
+++ b/net/netfilter/nf_log.c
@@ -419,7 +419,7 @@ static const struct seq_operations nflog_seq_ops = {
 };
 #endif /* PROC_FS */
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 static char nf_log_sysctl_fnames[NFPROTO_NUMPROTO-NFPROTO_UNSPEC][3];
 static struct ctl_table nf_log_sysctl_table[NFPROTO_NUMPROTO];
 static struct ctl_table_header *nf_log_sysctl_fhdr;
@@ -557,7 +557,7 @@ static int netfilter_log_sysctl_init(struct net *net)
 static void netfilter_log_sysctl_exit(struct net *net)
 {
 }
-#endif /* CONFIG_SYSCTL */
+#endif /* CONFIG_PROC_SYSCTL */
 
 static int __net_init nf_log_net_init(struct net *net)
 {
diff --git a/net/rxrpc/Kconfig b/net/rxrpc/Kconfig
index 2cebb666dc07..c765bb8bdd55 100644
--- a/net/rxrpc/Kconfig
+++ b/net/rxrpc/Kconfig
@@ -39,7 +39,7 @@ config AF_RXRPC_INJECT_LOSS
 
 config AF_RXRPC_INJECT_RX_DELAY
 	bool "Inject delay into packet reception"
-	depends on SYSCTL
+	depends on PROC_SYSCTL
 	help
 	  Say Y here to inject a delay into packet reception, allowing an
 	  extended RTT time to be modelled.  The delay can be configured using
diff --git a/net/rxrpc/Makefile b/net/rxrpc/Makefile
index f994f9f30a29..04c4cc281a97 100644
--- a/net/rxrpc/Makefile
+++ b/net/rxrpc/Makefile
@@ -39,7 +39,7 @@ rxrpc-y := \
 
 rxrpc-$(CONFIG_PROC_FS) += proc.o
 rxrpc-$(CONFIG_RXKAD) += rxkad.o fcrypt.o
-rxrpc-$(CONFIG_SYSCTL) += sysctl.o
+rxrpc-$(CONFIG_PROC_SYSCTL) += sysctl.o
 rxrpc-$(CONFIG_RXGK) += \
 	rxgk.o \
 	rxgk_app.o \
diff --git a/net/rxrpc/ar-internal.h b/net/rxrpc/ar-internal.h
index ce946b0a03e2..1efff44412d4 100644
--- a/net/rxrpc/ar-internal.h
+++ b/net/rxrpc/ar-internal.h
@@ -1527,7 +1527,7 @@ int rxrpc_stats_clear(struct file *file, char *buf, size_t size);
 /*
  * sysctl.c
  */
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 extern int __init rxrpc_sysctl_init(void);
 extern void rxrpc_sysctl_exit(void);
 #else
diff --git a/net/sctp/Makefile b/net/sctp/Makefile
index 0448398408d8..c36c7a832fdb 100644
--- a/net/sctp/Makefile
+++ b/net/sctp/Makefile
@@ -20,6 +20,6 @@ sctp_diag-y := diag.o
 
 sctp-$(CONFIG_SCTP_DBG_OBJCNT) += objcnt.o
 sctp-$(CONFIG_PROC_FS) += proc.o
-sctp-$(CONFIG_SYSCTL) += sysctl.o
+sctp-$(CONFIG_PROC_SYSCTL) += sysctl.o
 
 sctp-$(subst m,y,$(CONFIG_IPV6))	+= ipv6.o
diff --git a/net/smc/Makefile b/net/smc/Makefile
index 5368634c5dd6..e9fa9fcd16ab 100644
--- a/net/smc/Makefile
+++ b/net/smc/Makefile
@@ -5,5 +5,5 @@ obj-$(CONFIG_SMC_DIAG)	+= smc_diag.o
 smc-y := af_smc.o smc_pnet.o smc_ib.o smc_clc.o smc_core.o smc_wr.o smc_llc.o
 smc-y += smc_cdc.o smc_tx.o smc_rx.o smc_close.o smc_ism.o smc_netlink.o smc_stats.o
 smc-y += smc_tracepoint.o smc_inet.o
-smc-$(CONFIG_SYSCTL) += smc_sysctl.o
+smc-$(CONFIG_PROC_SYSCTL) += smc_sysctl.o
 smc-$(CONFIG_SMC_HS_CTRL_BPF) += smc_hs_bpf.o
diff --git a/net/smc/smc_sysctl.h b/net/smc/smc_sysctl.h
index 8538915af7af..fdfc2ec6a3b7 100644
--- a/net/smc/smc_sysctl.h
+++ b/net/smc/smc_sysctl.h
@@ -13,7 +13,7 @@
 #ifndef _SMC_SYSCTL_H
 #define _SMC_SYSCTL_H
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 
 int __net_init smc_sysctl_net_init(struct net *net);
 void __net_exit smc_sysctl_net_exit(struct net *net);
@@ -32,6 +32,6 @@ static inline int smc_sysctl_net_init(struct net *net)
 
 static inline void smc_sysctl_net_exit(struct net *net) { }
 
-#endif /* CONFIG_SYSCTL */
+#endif /* CONFIG_PROC_SYSCTL */
 
 #endif /* _SMC_SYSCTL_H */
diff --git a/net/sunrpc/Kconfig b/net/sunrpc/Kconfig
index e7808e5714dc..5cc57cf37c06 100644
--- a/net/sunrpc/Kconfig
+++ b/net/sunrpc/Kconfig
@@ -35,7 +35,7 @@ config RPCSEC_GSS_KRB5
 
 config SUNRPC_DEBUG
 	bool "RPC: Enable dprintk debugging"
-	depends on SUNRPC && SYSCTL
+	depends on SUNRPC && PROC_SYSCTL
 	select DEBUG_FS
 	help
 	  This option enables a sysctl-based debugging interface
diff --git a/net/sunrpc/Makefile b/net/sunrpc/Makefile
index 96727df3aa85..c6462bd6350f 100644
--- a/net/sunrpc/Makefile
+++ b/net/sunrpc/Makefile
@@ -18,4 +18,4 @@ sunrpc-y := clnt.o xprt.o socklib.o xprtsock.o sched.o \
 sunrpc-$(CONFIG_SUNRPC_DEBUG) += debugfs.o
 sunrpc-$(CONFIG_SUNRPC_BACKCHANNEL) += backchannel_rqst.o
 sunrpc-$(CONFIG_PROC_FS) += stats.o
-sunrpc-$(CONFIG_SYSCTL) += sysctl.o
+sunrpc-$(CONFIG_PROC_SYSCTL) += sysctl.o
diff --git a/net/tipc/Makefile b/net/tipc/Makefile
index 18e1636aa036..b2cf0cdabc55 100644
--- a/net/tipc/Makefile
+++ b/net/tipc/Makefile
@@ -15,7 +15,7 @@ CFLAGS_trace.o += -I$(src)
 
 tipc-$(CONFIG_TIPC_MEDIA_UDP)	+= udp_media.o
 tipc-$(CONFIG_TIPC_MEDIA_IB)	+= ib_media.o
-tipc-$(CONFIG_SYSCTL)		+= sysctl.o
+tipc-$(CONFIG_PROC_SYSCTL)	+= sysctl.o
 tipc-$(CONFIG_TIPC_CRYPTO)	+= crypto.o
 
 obj-$(CONFIG_TIPC_DIAG)	+= tipc_diag.o
diff --git a/net/tipc/core.h b/net/tipc/core.h
index 9ce5f9ff6cc0..f7904d4debc5 100644
--- a/net/tipc/core.h
+++ b/net/tipc/core.h
@@ -218,7 +218,7 @@ static inline u32 hash128to32(char *bytes)
 	return  ntohl(tmp[0] | tmp[1] | tmp[2] | tmp[3]);
 }
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 int tipc_register_sysctl(void);
 void tipc_unregister_sysctl(void);
 #else
diff --git a/net/unix/Makefile b/net/unix/Makefile
index 4ddd125c4642..954949cc5a88 100644
--- a/net/unix/Makefile
+++ b/net/unix/Makefile
@@ -6,7 +6,7 @@
 obj-$(CONFIG_UNIX)	+= unix.o
 
 unix-y			:= af_unix.o garbage.o
-unix-$(CONFIG_SYSCTL)	+= sysctl_net_unix.o
+unix-$(CONFIG_PROC_SYSCTL)	+= sysctl_net_unix.o
 unix-$(CONFIG_BPF_SYSCALL) += unix_bpf.o
 
 obj-$(CONFIG_UNIX_DIAG)	+= unix_diag.o
diff --git a/net/unix/af_unix.h b/net/unix/af_unix.h
index 8119dbeef3a3..6f103d9b1eff 100644
--- a/net/unix/af_unix.h
+++ b/net/unix/af_unix.h
@@ -37,7 +37,7 @@ long unix_inq_len(struct sock *sk);
 long unix_outq_len(struct sock *sk);
 
 /* sysctl */
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 int unix_sysctl_register(struct net *net);
 void unix_sysctl_unregister(struct net *net);
 #else
diff --git a/net/x25/Makefile b/net/x25/Makefile
index 5dd544a231f2..198a1b2f1561 100644
--- a/net/x25/Makefile
+++ b/net/x25/Makefile
@@ -8,4 +8,4 @@ obj-$(CONFIG_X25) += x25.o
 x25-y			:= af_x25.o x25_dev.o x25_facilities.o x25_in.o \
 			   x25_link.o x25_out.o x25_route.o x25_subr.o \
 			   x25_timer.o x25_proc.o x25_forward.o
-x25-$(CONFIG_SYSCTL)	+= sysctl_net_x25.o
+x25-$(CONFIG_PROC_SYSCTL)	+= sysctl_net_x25.o
diff --git a/net/xfrm/xfrm_sysctl.c b/net/xfrm/xfrm_sysctl.c
index ca003e8a0376..b714bb9b408a 100644
--- a/net/xfrm/xfrm_sysctl.c
+++ b/net/xfrm/xfrm_sysctl.c
@@ -12,7 +12,7 @@ static void __net_init __xfrm_sysctl_init(struct net *net)
 	net->xfrm.sysctl_acq_expires = 30;
 }
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 static struct ctl_table xfrm_table[] = {
 	{
 		.procname	= "xfrm_aevent_etime",
diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c
index 88d12e89d115..ba5851454749 100644
--- a/security/apparmor/lsm.c
+++ b/security/apparmor/lsm.c
@@ -2320,7 +2320,7 @@ static int __init alloc_buffers(void)
 	return 0;
 }
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 static int apparmor_dointvec(const struct ctl_table *table, int write,
 			     void *buffer, size_t *lenp, loff_t *ppos)
 {
@@ -2367,7 +2367,7 @@ static inline int apparmor_init_sysctl(void)
 {
 	return 0;
 }
-#endif /* CONFIG_SYSCTL */
+#endif /* CONFIG_PROC_SYSCTL */
 
 #if defined(CONFIG_NETFILTER) && defined(CONFIG_NETWORK_SECMARK)
 static unsigned int apparmor_ip_postroute(void *priv,
diff --git a/security/keys/Makefile b/security/keys/Makefile
index 5f40807f05b3..032d3e467553 100644
--- a/security/keys/Makefile
+++ b/security/keys/Makefile
@@ -19,7 +19,7 @@ obj-y := \
 compat-obj-$(CONFIG_KEY_DH_OPERATIONS) += compat_dh.o
 obj-$(CONFIG_COMPAT) += compat.o $(compat-obj-y)
 obj-$(CONFIG_PROC_FS) += proc.o
-obj-$(CONFIG_SYSCTL) += sysctl.o
+obj-$(CONFIG_PROC_SYSCTL) += sysctl.o
 obj-$(CONFIG_PERSISTENT_KEYRINGS) += persistent.o
 obj-$(CONFIG_KEY_DH_OPERATIONS) += dh.o
 obj-$(CONFIG_ASYMMETRIC_KEY_TYPE) += keyctl_pkey.o
diff --git a/security/loadpin/loadpin.c b/security/loadpin/loadpin.c
index f71861f98e1a..92e7014a6cda 100644
--- a/security/loadpin/loadpin.c
+++ b/security/loadpin/loadpin.c
@@ -55,7 +55,7 @@ static bool deny_reading_verity_digests;
 
 // initialized to false
 static bool loadpin_root_writable;
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 
 static int proc_handler_loadpin(const struct ctl_table *table, int dir,
 				void *buffer, size_t *lenp, loff_t *ppos)
@@ -256,7 +256,7 @@ static int __init loadpin_init(void)
 	pr_info("ready to pin (currently %senforcing)\n",
 		enforce ? "" : "not ");
 	parse_exclude();
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 	if (!register_sysctl("kernel/loadpin", loadpin_sysctl_table))
 		pr_notice("sysctl registration failed!\n");
 #endif
diff --git a/security/yama/yama_lsm.c b/security/yama/yama_lsm.c
index cef3776cf3b2..c5f65b44acaf 100644
--- a/security/yama/yama_lsm.c
+++ b/security/yama/yama_lsm.c
@@ -428,7 +428,7 @@ static struct security_hook_list yama_hooks[] __ro_after_init = {
 	LSM_HOOK_INIT(task_free, yama_task_free),
 };
 
-#ifdef CONFIG_SYSCTL
+#ifdef CONFIG_PROC_SYSCTL
 static int yama_dointvec_minmax(const struct ctl_table *table, int write,
 				void *buffer, size_t *lenp, loff_t *ppos)
 {
@@ -465,7 +465,7 @@ static void __init yama_init_sysctl(void)
 }
 #else
 static inline void yama_init_sysctl(void) { }
-#endif /* CONFIG_SYSCTL */
+#endif /* CONFIG_PROC_SYSCTL */
 
 static int __init yama_init(void)
 {
-- 
2.52.0



  reply	other threads:[~2026-07-22 12:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-22 12:44 [RFC PATCH 0/1] sysctl: remove CONFIG_SYSCTL, it just mirrors CONFIG_PROC_SYSCTL Oleg Nesterov
2026-07-22 12:44 ` Oleg Nesterov [this message]
2026-07-22 13:07 ` Alexey Gladkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=amC7Pm5I6CMh7KpD@redhat.com \
    --to=oleg@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=ebiederm@xmission.com \
    --cc=legion@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nathan@kernel.org \
    --cc=nsc@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.