Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com [209.85.167.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 11E772F0C6D for ; Wed, 19 Nov 2025 22:26:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763591220; cv=none; b=JVohXSbmZAswi4djjeoOLI+djKvI+Qa4niUlvHgozxIWnna0o+HIdY1sXVR8DsfmIdEvzdZX4sIsDVFN7hDLCBNqx6oxhxnYnrTdTR4Qzq8N+iuruyRHC4p588GDyPjhLG64JxgK3WuqGYthCMLZ3WrvZtSSutgW3/XHBJtE6Wg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763591220; c=relaxed/simple; bh=qOnnawt4egcjVD3EMm4ADkZ2z7Vo9vrDOjzvgdq3kes=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=EeBurcFnV3v08ev3CAhDhWnL//5U5/Wlg3OM7upqz+9o0/+OJXfs1g0Sr1aj6O7s0CwBecTfvrziQA0zfgxQiciHtMFhnHbz41RZPXmyfXCcuCNNHUUX1f7OJW86UsWqGzfPEsoBmzcdOv4aJP6qVHwvr65y9aTrTrQ1wrpcxzU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=R8k/DZ8/; arc=none smtp.client-ip=209.85.167.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="R8k/DZ8/" Received: by mail-lf1-f50.google.com with SMTP id 2adb3069b0e04-5969c5af23bso153872e87.3 for ; Wed, 19 Nov 2025 14:26:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1763591216; x=1764196016; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=IBHV1EUw0WBXSKlFcI/NhGu5XRuHQn0XLzAOgD+DTYU=; b=R8k/DZ8/ZkWu1ODdCi03BUhd0F6wJ+SI26jz55vpEOV1pSnPERLev3IwAQeGU9Ksnb xjiOXUCNbqNR3md5yGCT9dIVKjPaIS3mpoLpkuyO+XWoQLOU2mnh+9SDElRz5SHfHh3Q B0Wp03c6n0pUeFnj//hlczVj1aLV2ivD34FgWCLm3Wp2rJmju2T6TENUxfmee1/qUvse xHh5AEGWJi1knuZfskaA8eIhL5PpmlkU5smszODFrAzYd+ZNUXTteOUwRFrOEC4wNHEL l9c+nmG/rJdGmgVVAigFNQxltkX3V8NVu3TMSbQcqLexwAuvZ+VR2gIcAI3nv0pI67PG Rfkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763591216; x=1764196016; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=IBHV1EUw0WBXSKlFcI/NhGu5XRuHQn0XLzAOgD+DTYU=; b=BHl3q6WJwVAbQzxfASTaw0aKvgnvxHhrrd4RhDUwYZYb1O5GjGv6weslgn48RrxDKs QuLm9oTrbLr2f7iREXQOCsxHcF5Z/UJo8M+NeC71C6wIYLCfPwLTWLHvSVQBGNsmAQWY 6xwGR6heertorGFD6qMxCvlforJvKx7IEfTh3lJda2l4zT9VVJxzPanfVtgQ2EUccsNa 6YH1aKid5VabhJgE56oboUTFkEXiibi1QFv8Jr7Q0t/5fWI0u+uW7w35ADOHYKHiUXRR aCBpHkQdzd4mr0ZIOwet5t08GtcTos42Fcjo3l2Ltda4ZliuNAVZKRndCH1GhKO7mjOz YglQ== X-Forwarded-Encrypted: i=1; AJvYcCXS+QgSxK4DXVMZh3ia4wNpJTAGhT0fX/9Xw2lDOd0lAAuOzVKkyjnxZxEJXXHvVOiwWUUikWGbX6s=@vger.kernel.org X-Gm-Message-State: AOJu0YwNG/97ywb3bYvViwmH3jswOtbO9HJETOjTx5ZVK6O6V0x9IdUy A5v17GFcYD1mZagDnnmJ0wJiRMI7qF9dQxNaMktNKSjAto7Fs9VAD58U X-Gm-Gg: ASbGncvvbcQqEbjL71UKlSeGoMq0CuKu4hdE77dqLbkOz/ROyYDlTAK1hPr2erL7YbP Atshbn9dBcUwBPhD5Ied6ZhLRAc/HAbe41XbTk2FLm/wDG3ukaelKhHiky8vzDTkeX8DUhtl4X7 d0DcQ3MuyUxGWmNHl/D/C/00D/ZxXGL9WB9mIJ4f2rOPHYhgOELK/6ziZuTdbVCa6EgUci6pGsZ cyeJnGYA+oMblFf5StxU3FYZcEOUlkn+B/+vyQuJVyYcjHEnCssO8HJbTNtsPZlH4RF0tTD81By qOn+RoWbbEbNENFqKPvheVLgKe99pgh+oBkkE6iX61KNk1Aa4TYG/+OLXqkDpYYqLY0OkV6JLdL /h1m1F0FM4o45PqXV9RD+clJsNWJDqYiaYGm3GPh6HaWKd8fDCzc3RaWB84R2x3M8PmeAf7SlMG u3cd1Piodg X-Google-Smtp-Source: AGHT+IFgA9RKL+uFTnctiFZKqulaPxewVQd+eAgCSkyCWbVEq5Iah76Q4RixKmx92rXz16tT6l4F2g== X-Received: by 2002:a05:6512:3d08:b0:594:25e6:8a3a with SMTP id 2adb3069b0e04-5969e2e74d7mr178185e87.20.1763591216022; Wed, 19 Nov 2025 14:26:56 -0800 (PST) Received: from localhost ([109.167.240.218]) by smtp.gmail.com with UTF8SMTPSA id 2adb3069b0e04-5969db8989csm168021e87.39.2025.11.19.14.26.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 19 Nov 2025 14:26:54 -0800 (PST) From: Askar Safin To: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Linus Torvalds , Greg Kroah-Hartman , Christian Brauner , Al Viro , Jan Kara , Christoph Hellwig , Jens Axboe , Andy Shevchenko , Aleksa Sarai , =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= , Julian Stecklina , Gao Xiang , Art Nikpal , Andrew Morton , Alexander Graf , Rob Landley , Lennart Poettering , linux-arch@vger.kernel.org, linux-block@vger.kernel.org, initramfs@vger.kernel.org, linux-api@vger.kernel.org, linux-doc@vger.kernel.org, Michal Simek , Luis Chamberlain , Kees Cook , Thorsten Blum , Heiko Carstens , Arnd Bergmann , Dave Young , Christophe Leroy , Krzysztof Kozlowski , Borislav Petkov , Jessica Clarke , Nicolas Schichan , David Disseldorp , patches@lists.linux.dev Subject: [PATCH v4 3/3] init: remove /proc/sys/kernel/real-root-dev Date: Wed, 19 Nov 2025 22:24:07 +0000 Message-ID: <20251119222407.3333257-4-safinaskar@gmail.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251119222407.3333257-1-safinaskar@gmail.com> References: <20251119222407.3333257-1-safinaskar@gmail.com> Precedence: bulk X-Mailing-List: initramfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit It is not used anymore. Signed-off-by: Askar Safin --- Documentation/admin-guide/sysctl/kernel.rst | 6 ------ include/uapi/linux/sysctl.h | 1 - init/do_mounts_initrd.c | 20 -------------------- 3 files changed, 27 deletions(-) diff --git a/Documentation/admin-guide/sysctl/kernel.rst b/Documentation/admin-guide/sysctl/kernel.rst index f3ee807b5d8b..218265babaf9 100644 --- a/Documentation/admin-guide/sysctl/kernel.rst +++ b/Documentation/admin-guide/sysctl/kernel.rst @@ -1215,12 +1215,6 @@ that support this feature. == =========================================================================== -real-root-dev -============= - -See Documentation/admin-guide/initrd.rst. - - reboot-cmd (SPARC only) ======================= diff --git a/include/uapi/linux/sysctl.h b/include/uapi/linux/sysctl.h index 63d1464cb71c..1c7fe0f4dca4 100644 --- a/include/uapi/linux/sysctl.h +++ b/include/uapi/linux/sysctl.h @@ -92,7 +92,6 @@ enum KERN_DOMAINNAME=8, /* string: domainname */ KERN_PANIC=15, /* int: panic timeout */ - KERN_REALROOTDEV=16, /* real root device to mount after initrd */ KERN_SPARC_REBOOT=21, /* reboot command on Sparc */ KERN_CTLALTDEL=22, /* int: allow ctl-alt-del to reboot */ diff --git a/init/do_mounts_initrd.c b/init/do_mounts_initrd.c index fe335dbc95e0..892e69ab41c4 100644 --- a/init/do_mounts_initrd.c +++ b/init/do_mounts_initrd.c @@ -8,31 +8,11 @@ unsigned long initrd_start, initrd_end; int initrd_below_start_ok; -static unsigned int real_root_dev; /* do_proc_dointvec cannot handle kdev_t */ static int __initdata mount_initrd = 1; phys_addr_t phys_initrd_start __initdata; unsigned long phys_initrd_size __initdata; -#ifdef CONFIG_SYSCTL -static const struct ctl_table kern_do_mounts_initrd_table[] = { - { - .procname = "real-root-dev", - .data = &real_root_dev, - .maxlen = sizeof(int), - .mode = 0644, - .proc_handler = proc_dointvec, - }, -}; - -static __init int kernel_do_mounts_initrd_sysctls_init(void) -{ - register_sysctl_init("kernel", kern_do_mounts_initrd_table); - return 0; -} -late_initcall(kernel_do_mounts_initrd_sysctls_init); -#endif /* CONFIG_SYSCTL */ - static int __init no_initrd(char *str) { pr_warn("noinitrd option is deprecated and will be removed soon\n"); -- 2.47.3