From nobody Sat Feb 7 18:20:05 2026 Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) (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 DD91E30EF72 for ; Fri, 17 Oct 2025 06:10:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760681437; cv=none; b=gUhJWmfoppVcTi59q96uzd7r8p26ljpGt4kBgKRG7A8BXHAQmdRfKGWZHYMQy5jbjNpQzPFm5g7Nvv0K3s6QfXE8gUcFTp3Qvsx1xc/l/vqC8HP/ZhtYgZ7WpyMaQd3a1DAGK7gfNRhLfoPTZ2pkMXk6nTk1T4ZrndAmKTonHPU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760681437; c=relaxed/simple; bh=xFurCGxlKeC/tk9lJqwt+qhC4G1oERsMk1YgSqg0z4M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YUXb2xhV7NsQeM53WZ4hrWCrMwoXhrghMBG292xzVHI4O3RIF6BSpfonUH1w0XAMbmC1mbg/vEr7ysXjugeIje2gw0A+hTgRZGC59SeDdPtC+tSzCiIv6WT6Q95Ubh5g7QoRC0gscDIP4eDpfE/mCG9k18MHURhFdimMyLEDpR4= 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=gFcFb+BL; arc=none smtp.client-ip=209.85.128.48 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="gFcFb+BL" Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-46e542196c7so17232905e9.0 for ; Thu, 16 Oct 2025 23:10:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1760681432; x=1761286232; 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=fApFH3gxVydnn6o27DJgEciM38Nk8T7NkdtS/0xgRng=; b=gFcFb+BLxPQu3TNKE4BTIz2YCDdFdCrDvakY3QsBdxkG64g5Bp6XuX76Acly2y6AUp NFPAA5JbIki9VRjsWcKI6spOrW3iuC6l698G1yQwvPCx2YDQiY2aGRFN91jyAiYwdKMU Q9QfZvhNWC4M6vtOfcwG/oz7gFfCZbHgtdjnkF34hOKs+I6E6H/fUP2jyna2scZcYkeg c7oATP1o+5lrO5o3gl8w54ldG/MyII0+etGyZnt5ed0SXPn4CEalJ/+ivjPOpm3h161y bfebaSWOTVFMrL2GlvQYo1HN6tTYr2FuFdbpYeuCN2gro1x7QgcCTfX0kGnpU1JApVhA 039A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760681432; x=1761286232; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fApFH3gxVydnn6o27DJgEciM38Nk8T7NkdtS/0xgRng=; b=aMx8FzyioZsXmfH+2o1e1SVhbUlBZVxe2kBEfdhejy/s18MC6wSbz52QeGs/tz6jIb kosgRRbSltaL8rsE+PYTzz3PaU4nYYVQtr5k7rSAub2kjQqqJ1c8PE71OjOUcKdipng7 9oFvrpvwA78mGmH7j1YPyb/mhkq55ArD2TJulmPweCjWDyXDn0RcRHWRldIbP5o2mI/C 9LSqYodra7n7Ozbbt2q7z1i8Ca523q6maUXMRvT16TG3fo+HC49nIKwHaxZpx+Qc9GEW mW5TJxG9LZLLwFbLyWxBuC5I+AUZvfum+4BgJQ6SVI3DdQzB6k6RAXLIyJwbVyUzr64H 3cJg== X-Forwarded-Encrypted: i=1; AJvYcCW5VFudBCDrsEPVWIwm80eD+d0Y2c/qLfqA2u8RgxEuce5/6jUa5XU1EtfsR3GwoqnFfYeTTdQb/cPuSZg=@vger.kernel.org X-Gm-Message-State: AOJu0Yw2vbGtPCYLTuvUdCBp6eqmBTEHQe1u0Zj9a3qfLRpojf94P8Dj 483j/8DLkxsgua49sLEqyR1SGaVPiOmJvAEKV9+6NFbf+ojmm5RQzE0n X-Gm-Gg: ASbGncszc7lzNrXvhxTN1WQVtCYyNL5dsSW8qjqG3cO+FyVSuOC9zYVP1VXGvmNRQTY JYrDFXGpblK1CNEdI1eongc6ZXQA3m6h/3bDkvQ4py4ZHOBoWDyT0Y+/BNc/aUkDaj/1hiH3xJ1 9Xx/6YaTCr44lRiXWenL/l+WXUOPloHuYkTjqbtV/z9QYEVyd7dctmXp7lBCfUjEkKmTzZmOZaI +eRFF/+DO4I7XwVrck3vdsrzMW/Qo4w9sVI28mLZJ59Nfw0sQoMyF+Qq9l1m3z/a0E1kQSNjW3n lK0Zs9wWGU8TWJnUdrfMFkU02yVl4n/r5Tkai2YbsSYFC8pjiuuJg4mqAgFgGgNj5doINFQt5cN GKr3R1BXUhSQWLF5YrN3ODkl3KyvWz/Lbww6Cu7bm3NH6W4SDipy4yZ4PBMWcfYsaiMBFXshy1p +c X-Google-Smtp-Source: AGHT+IH347DjV12fYF0hhdy1vww1ouDPmUAfsNrazlguHL6g+y9YN/2fKxqG5dPAECrqaSU8hvDOLQ== X-Received: by 2002:a05:6000:4210:b0:426:d30a:88b0 with SMTP id ffacd0b85a97d-426fb8b7cb2mr4254322f8f.22.1760681432093; Thu, 16 Oct 2025 23:10:32 -0700 (PDT) Received: from localhost ([212.73.77.104]) by smtp.gmail.com with UTF8SMTPSA id ffacd0b85a97d-426ce57d49bsm40185002f8f.10.2025.10.16.23.10.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 16 Oct 2025 23:10:31 -0700 (PDT) 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 v3 1/3] init: remove deprecated "load_ramdisk" and "prompt_ramdisk" command line parameters Date: Fri, 17 Oct 2025 06:09:54 +0000 Message-ID: <20251017060956.1151347-2-safinaskar@gmail.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251017060956.1151347-1-safinaskar@gmail.com> References: <20251017060956.1151347-1-safinaskar@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" ...which do nothing. They were deprecated (in documentation) in 6b99e6e6aa62 ("Documentation/admin-guide: blockdev/ramdisk: remove use of "rdev"") in 2020 and in kernel messages in c8376994c86c ("initrd: remove support for multiple floppies") in 2020. Signed-off-by: Askar Safin --- Documentation/admin-guide/kernel-parameters.txt | 4 ---- arch/arm/configs/neponset_defconfig | 2 +- init/do_mounts.c | 7 ------- init/do_mounts_rd.c | 7 ------- 4 files changed, 1 insertion(+), 19 deletions(-) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentatio= n/admin-guide/kernel-parameters.txt index 6c42061ca20e..15af6933eab4 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -3319,8 +3319,6 @@ If there are multiple matching configurations changing the same attribute, the last one is used. =20 - load_ramdisk=3D [RAM] [Deprecated] - lockd.nlm_grace_period=3DP [NFS] Assign grace period. Format: =20 @@ -5284,8 +5282,6 @@ Param: - step/bucket size as a power of 2 for statistical time based profiling. =20 - prompt_ramdisk=3D [RAM] [Deprecated] - prot_virt=3D [S390] enable hosting protected virtual machines isolated from the hypervisor (if hardware supports that). If enabled, the default kernel base address diff --git a/arch/arm/configs/neponset_defconfig b/arch/arm/configs/neponse= t_defconfig index 2227f86100ad..4d720001c12e 100644 --- a/arch/arm/configs/neponset_defconfig +++ b/arch/arm/configs/neponset_defconfig @@ -9,7 +9,7 @@ CONFIG_ASSABET_NEPONSET=3Dy CONFIG_ZBOOT_ROM_TEXT=3D0x80000 CONFIG_ZBOOT_ROM_BSS=3D0xc1000000 CONFIG_ZBOOT_ROM=3Dy -CONFIG_CMDLINE=3D"console=3DttySA0,38400n8 cpufreq=3D221200 rw root=3D/dev= /mtdblock2 mtdparts=3Dsa1100:512K(boot),1M(kernel),2560K(initrd),4M(root) l= oad_ramdisk=3D1 prompt_ramdisk=3D0 mem=3D32M noinitrd initrd=3D0xc0800000,3= M" +CONFIG_CMDLINE=3D"console=3DttySA0,38400n8 cpufreq=3D221200 rw root=3D/dev= /mtdblock2 mtdparts=3Dsa1100:512K(boot),1M(kernel),2560K(initrd),4M(root) m= em=3D32M noinitrd initrd=3D0xc0800000,3M" CONFIG_FPE_NWFPE=3Dy CONFIG_PM=3Dy CONFIG_MODULES=3Dy diff --git a/init/do_mounts.c b/init/do_mounts.c index 6af29da8889e..0f2f44e6250c 100644 --- a/init/do_mounts.c +++ b/init/do_mounts.c @@ -34,13 +34,6 @@ static int root_wait; =20 dev_t ROOT_DEV; =20 -static int __init load_ramdisk(char *str) -{ - pr_warn("ignoring the deprecated load_ramdisk=3D option\n"); - return 1; -} -__setup("load_ramdisk=3D", load_ramdisk); - static int __init readonly(char *str) { if (*str) diff --git a/init/do_mounts_rd.c b/init/do_mounts_rd.c index 19d9f33dcacf..5311f2d7edc8 100644 --- a/init/do_mounts_rd.c +++ b/init/do_mounts_rd.c @@ -18,13 +18,6 @@ static struct file *in_file, *out_file; static loff_t in_pos, out_pos; =20 -static int __init prompt_ramdisk(char *str) -{ - pr_warn("ignoring the deprecated prompt_ramdisk=3D option\n"); - return 1; -} -__setup("prompt_ramdisk=3D", prompt_ramdisk); - int __initdata rd_image_start; /* starting block # of image */ =20 static int __init ramdisk_start_setup(char *str) --=20 2.47.3 From nobody Sat Feb 7 18:20:05 2026 Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) (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 EEE7931197D for ; Fri, 17 Oct 2025 06:10:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760681461; cv=none; b=b+zz6ACMVgl542/iz8/c7pjDvDee+ZEAidbbd/BCtoheLlYWfpg4N9cwx62qfpaCdCZMUGcvJma4KwZdVlq4RQmhJI2BAI8epO452d7USM08Jxr1SQYMP5n3H/KmY79eizIk9FreGpT3as6V8moA7B/SxqzClI8G25jNrs6luF0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760681461; c=relaxed/simple; bh=bATM6aac632ht2Lhs2ZNT40ldHaeWg8vP8rXRfB+eJ0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=C/dCVf/Lg56IGilZrYQSXDdOPx4PFs31M5cXxYGzrKvMR65DGBrbP7+jaV3Tj5efvDQAVgW9wApntojxE8yY3jRvrGOlVqIexLgGTK6h8DnAqJCBcIsDu3RIy1piWaEbgwMZKmoakp2ZrCiQeZWVqg6EzaXEO/2I6oUyg8/qUNQ= 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=isr4uV9K; arc=none smtp.client-ip=209.85.128.54 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="isr4uV9K" Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-47118259fd8so3167385e9.3 for ; Thu, 16 Oct 2025 23:10:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1760681456; x=1761286256; 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=eWgIwqH7RshFa7F8HHD0DZORzWSphxCks827inGRt3Y=; b=isr4uV9KDlfXmvsGGG4EvziyMwrifcB/13FNnMyckyq45XyG7sU7gfgxqVHGmvPkXr Wkgh3erzSJ8np7WYolS/l2w8FRFw+GFTGvtv2nTqcMco/ipoe3o1v/do/ucMWW8JVzi7 f343SoYSpxJLd5ZJg9Ai2i86Szc/8abqWII2crYsnuZuznkoBpq2gIUzhsG2e5lo+oDr TWOGX47nHSntZv0JnTjXwF4R6KBo/rJiSgGbFtQIUvUpIZ8GlnmkTs+m1GsQReWep7nf bLoRAYAbwSIwQFgUWsH+/OBq4zjDGQ2djRrzmxRvICFCEItlQsfJS3wMscKkf6E3AVrD uD/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760681456; x=1761286256; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=eWgIwqH7RshFa7F8HHD0DZORzWSphxCks827inGRt3Y=; b=jqnkdNQUtVkJiqvhZITYqqQ3fFzAfcL+nDY/zcNckOR0Mschap614V9QLkX7JV8Ly4 IoO+cKuG0BRlXWBaqjAEqOkax0RdeZdwUW/yvbedv3FRlSZv3Da9bFci3YMWjJbQ24di z9FT/DDzmdwvcJ7oo+KDOpvlh1T5mgM4lkV/V8Cwsv6UxZ/tP4/BRp5kWh19xf8R56po y/YiqOYrwsOHf6knGeyHmHAMwzjG0bVadZezjjcxXd68f4g+1DOf9fJV4iA5d57VyjfH pDZyXBTJYrpz0E/HsLJ2mQhbGHmsoRkNmfsQTdHjpGTkm6k+9xKVX0M2nkNeJkb6VpDT cnDA== X-Forwarded-Encrypted: i=1; AJvYcCWndr6o2hvSce+CYFYrl7jq50px/q2yqyRyRiAtVZvxWi8ODHa+ZaLbddd8xy5C5fgEBK7Uj7NZaVilDpg=@vger.kernel.org X-Gm-Message-State: AOJu0YxTmu9WskYfYkeYunNufqnwhJdxBeZYNMnusumoiEKAEnoieO06 xemgrgt69cFGTcCRJHouk0zWsRDayuYNnFxi4FNxFA4sEnVPOJ1UuZD3 X-Gm-Gg: ASbGncuv3GuHSbYKKBb2NGMx0m86nOJ5agvtwwom1L2ZpS5Cz4IRzE5gzk3EHB98KVP TAh93ZD7fxHnNOSKKQ4WnhcHK4GqGWxpXRExVcE3IqhimZQ3v+G7nPVwxRwzjQkSyCFbgoEJEFx ucZJSfLJK2q8+c8rb7w7S08zqhhO7CLOuxZjjdJrizRQNfzd3iLvt4vCxt4TwHxZnIlQ4lObZzG SjnfWwN6cgjCPdSQ1AavsNDnFrc2HBgBTCgp7PaV3yFQK0ZRB353oeVj5BmILpoeq4vdISzHxSU Pm94Oe4RM4XvhzhATLhNXGhme8TqLnYV6KwAaYFXeRRbdaGmBEdcZBvTTXnWv2d/MOzNXX1lVTF NCYZTXFitn3wFF/T1iSURE1hZA7cC/0qFD/+5u2mEczC6NbyUJTy0LjAXWrFEmWpCCRhWGb5CP5 rVPAaTxXAZ5LE= X-Google-Smtp-Source: AGHT+IE3wLtpz8O9wjyUqZlTW2xkNzi1uvDG8cS6sxWvjF5XYMStNyUzSwHm4rj6VyjXI7Ajj4a2pQ== X-Received: by 2002:a05:600c:548a:b0:471:ff3:7514 with SMTP id 5b1f17b1804b1-47117877736mr15713675e9.12.1760681456173; Thu, 16 Oct 2025 23:10:56 -0700 (PDT) Received: from localhost ([212.73.77.104]) by smtp.gmail.com with UTF8SMTPSA id 5b1f17b1804b1-4711444d919sm63388875e9.14.2025.10.16.23.10.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 16 Oct 2025 23:10:55 -0700 (PDT) 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 v3 2/3] initrd: remove deprecated code path (linuxrc) Date: Fri, 17 Oct 2025 06:09:55 +0000 Message-ID: <20251017060956.1151347-3-safinaskar@gmail.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251017060956.1151347-1-safinaskar@gmail.com> References: <20251017060956.1151347-1-safinaskar@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Remove linuxrc initrd code path, which was deprecated in 2020. Initramfs and (non-initial) RAM disks (i. e. brd) still work. Both built-in and bootloader-supplied initramfs still work. Non-linuxrc initrd code path (i. e. using /dev/ram as final root filesystem) still works, but I put deprecation message into it. Also I deprecate command line parameters "noinitrd" and "ramdisk_start=3D". Signed-off-by: Askar Safin --- .../admin-guide/kernel-parameters.txt | 8 +- fs/init.c | 14 --- include/linux/init_syscalls.h | 1 - include/linux/initrd.h | 2 - init/do_mounts.c | 4 +- init/do_mounts.h | 18 +--- init/do_mounts_initrd.c | 87 ++----------------- init/do_mounts_rd.c | 17 +--- 8 files changed, 22 insertions(+), 129 deletions(-) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentatio= n/admin-guide/kernel-parameters.txt index 15af6933eab4..df441d1a9555 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -4324,8 +4324,10 @@ Note that this argument takes precedence over the CONFIG_RCU_NOCB_CPU_DEFAULT_ALL option. =20 - noinitrd [RAM] Tells the kernel not to load any configured - initial RAM disk. + noinitrd [Deprecated,RAM] Tells the kernel not to load any configured + initial RAM disk. Currently this parameter applies to + initrd only, not to initramfs. But it applies to both + in EFI mode. =20 nointremap [X86-64,Intel-IOMMU,EARLY] Do not enable interrupt remapping. @@ -5338,7 +5340,7 @@ ramdisk_size=3D [RAM] Sizes of RAM disks in kilobytes See Documentation/admin-guide/blockdev/ramdisk.rst. =20 - ramdisk_start=3D [RAM] RAM disk image start address + ramdisk_start=3D [Deprecated,RAM] RAM disk image start address =20 random.trust_cpu=3Doff [KNL,EARLY] Disable trusting the use of the CPU's diff --git a/fs/init.c b/fs/init.c index 07f592ccdba8..60719494d9a0 100644 --- a/fs/init.c +++ b/fs/init.c @@ -27,20 +27,6 @@ int __init init_mount(const char *dev_name, const char *= dir_name, return ret; } =20 -int __init init_umount(const char *name, int flags) -{ - int lookup_flags =3D LOOKUP_MOUNTPOINT; - struct path path; - int ret; - - if (!(flags & UMOUNT_NOFOLLOW)) - lookup_flags |=3D LOOKUP_FOLLOW; - ret =3D kern_path(name, lookup_flags, &path); - if (ret) - return ret; - return path_umount(&path, flags); -} - int __init init_chdir(const char *filename) { struct path path; diff --git a/include/linux/init_syscalls.h b/include/linux/init_syscalls.h index 92045d18cbfc..0bdbc458a881 100644 --- a/include/linux/init_syscalls.h +++ b/include/linux/init_syscalls.h @@ -2,7 +2,6 @@ =20 int __init init_mount(const char *dev_name, const char *dir_name, const char *type_page, unsigned long flags, void *data_page); -int __init init_umount(const char *name, int flags); int __init init_chdir(const char *filename); int __init init_chroot(const char *filename); int __init init_chown(const char *filename, uid_t user, gid_t group, int f= lags); diff --git a/include/linux/initrd.h b/include/linux/initrd.h index f1a1f4c92ded..7e5d26c8136f 100644 --- a/include/linux/initrd.h +++ b/include/linux/initrd.h @@ -3,8 +3,6 @@ #ifndef __LINUX_INITRD_H #define __LINUX_INITRD_H =20 -#define INITRD_MINOR 250 /* shouldn't collide with /dev/ram* too soon ... = */ - /* starting block # of image */ extern int rd_image_start; =20 diff --git a/init/do_mounts.c b/init/do_mounts.c index 0f2f44e6250c..1054ad3c905a 100644 --- a/init/do_mounts.c +++ b/init/do_mounts.c @@ -476,13 +476,11 @@ void __init prepare_namespace(void) if (saved_root_name[0]) ROOT_DEV =3D parse_root_device(saved_root_name); =20 - if (initrd_load(saved_root_name)) - goto out; + initrd_load(); =20 if (root_wait) wait_for_root(saved_root_name); mount_root(saved_root_name); -out: devtmpfs_mount(); init_mount(".", "/", NULL, MS_MOVE, NULL); init_chroot("."); diff --git a/init/do_mounts.h b/init/do_mounts.h index 6069ea3eb80d..a386ee5314c9 100644 --- a/init/do_mounts.h +++ b/init/do_mounts.h @@ -23,25 +23,15 @@ static inline __init int create_dev(char *name, dev_t d= ev) } =20 #ifdef CONFIG_BLK_DEV_RAM - -int __init rd_load_disk(int n); -int __init rd_load_image(char *from); - +int __init rd_load_image(void); #else - -static inline int rd_load_disk(int n) { return 0; } -static inline int rd_load_image(char *from) { return 0; } - +static inline int rd_load_image(void) { return 0; } #endif =20 #ifdef CONFIG_BLK_DEV_INITRD -bool __init initrd_load(char *root_device_name); +void __init initrd_load(void); #else -static inline bool initrd_load(char *root_device_name) -{ - return false; - } - +static inline void initrd_load(void) { } #endif =20 /* Ensure that async file closing finished to prevent spurious errors. */ diff --git a/init/do_mounts_initrd.c b/init/do_mounts_initrd.c index f6867bad0d78..bf381aa0400f 100644 --- a/init/do_mounts_initrd.c +++ b/init/do_mounts_initrd.c @@ -2,13 +2,7 @@ #include #include #include -#include -#include #include -#include -#include -#include -#include =20 #include "do_mounts.h" =20 @@ -41,6 +35,7 @@ late_initcall(kernel_do_mounts_initrd_sysctls_init); =20 static int __init no_initrd(char *str) { + pr_warn("noinitrd option is deprecated and will be removed soon\n"); mount_initrd =3D 0; return 1; } @@ -70,85 +65,19 @@ static int __init early_initrd(char *p) } early_param("initrd", early_initrd); =20 -static int __init init_linuxrc(struct subprocess_info *info, struct cred *= new) -{ - ksys_unshare(CLONE_FS | CLONE_FILES); - console_on_rootfs(); - /* move initrd over / and chdir/chroot in initrd root */ - init_chdir("/root"); - init_mount(".", "/", NULL, MS_MOVE, NULL); - init_chroot("."); - ksys_setsid(); - return 0; -} - -static void __init handle_initrd(char *root_device_name) -{ - struct subprocess_info *info; - static char *argv[] =3D { "linuxrc", NULL, }; - extern char *envp_init[]; - int error; - - pr_warn("using deprecated initrd support, will be removed soon.\n"); - - real_root_dev =3D new_encode_dev(ROOT_DEV); - create_dev("/dev/root.old", Root_RAM0); - /* mount initrd on rootfs' /root */ - mount_root_generic("/dev/root.old", root_device_name, - root_mountflags & ~MS_RDONLY); - init_mkdir("/old", 0700); - init_chdir("/old"); - - info =3D call_usermodehelper_setup("/linuxrc", argv, envp_init, - GFP_KERNEL, init_linuxrc, NULL, NULL); - if (!info) - return; - call_usermodehelper_exec(info, UMH_WAIT_PROC|UMH_FREEZABLE); - - /* move initrd to rootfs' /old */ - init_mount("..", ".", NULL, MS_MOVE, NULL); - /* switch root and cwd back to / of rootfs */ - init_chroot(".."); - - if (new_decode_dev(real_root_dev) =3D=3D Root_RAM0) { - init_chdir("/old"); - return; - } - - init_chdir("/"); - ROOT_DEV =3D new_decode_dev(real_root_dev); - mount_root(root_device_name); - - printk(KERN_NOTICE "Trying to move old root to /initrd ... "); - error =3D init_mount("/old", "/root/initrd", NULL, MS_MOVE, NULL); - if (!error) - printk("okay\n"); - else { - if (error =3D=3D -ENOENT) - printk("/initrd does not exist. Ignored.\n"); - else - printk("failed\n"); - printk(KERN_NOTICE "Unmounting old root\n"); - init_umount("/old", MNT_DETACH); - } -} - -bool __init initrd_load(char *root_device_name) +void __init initrd_load(void) { if (mount_initrd) { create_dev("/dev/ram", Root_RAM0); /* - * Load the initrd data into /dev/ram0. Execute it as initrd - * unless /dev/ram0 is supposed to be our actual root device, - * in that case the ram disk is just set up here, and gets - * mounted in the normal path. + * Load the initrd data into /dev/ram0. */ - if (rd_load_image("/initrd.image") && ROOT_DEV !=3D Root_RAM0) { - init_unlink("/initrd.image"); - handle_initrd(root_device_name); - return true; + if (rd_load_image()) { + pr_warn("using deprecated initrd support, will be removed in September = 2026; " + "use initramfs instead or (as a last resort) /sys/firmware/initrd; " + "see section \"Workaround\" in " + "https://lore.kernel.org/lkml/20251010094047.3111495-1-safinaskar@gmai= l.com\n"); } } init_unlink("/initrd.image"); - return false; } diff --git a/init/do_mounts_rd.c b/init/do_mounts_rd.c index 5311f2d7edc8..0a021bbcd501 100644 --- a/init/do_mounts_rd.c +++ b/init/do_mounts_rd.c @@ -22,6 +22,7 @@ int __initdata rd_image_start; /* starting block # of im= age */ =20 static int __init ramdisk_start_setup(char *str) { + pr_warn("ramdisk_start=3D option is deprecated and will be removed soon\n= "); rd_image_start =3D simple_strtol(str,NULL,0); return 1; } @@ -177,7 +178,7 @@ static unsigned long nr_blocks(struct file *file) return i_size_read(inode) >> 10; } =20 -int __init rd_load_image(char *from) +int __init rd_load_image(void) { int res =3D 0; unsigned long rd_blocks, devblocks, nr_disks; @@ -191,7 +192,7 @@ int __init rd_load_image(char *from) if (IS_ERR(out_file)) goto out; =20 - in_file =3D filp_open(from, O_RDONLY, 0); + in_file =3D filp_open("/initrd.image", O_RDONLY, 0); if (IS_ERR(in_file)) goto noclose_input; =20 @@ -220,10 +221,7 @@ int __init rd_load_image(char *from) /* * OK, time to copy in the data */ - if (strcmp(from, "/initrd.image") =3D=3D 0) - devblocks =3D nblocks; - else - devblocks =3D nr_blocks(in_file); + devblocks =3D nblocks; =20 if (devblocks =3D=3D 0) { printk(KERN_ERR "RAMDISK: could not determine device size\n"); @@ -267,13 +265,6 @@ int __init rd_load_image(char *from) return res; } =20 -int __init rd_load_disk(int n) -{ - create_dev("/dev/root", ROOT_DEV); - create_dev("/dev/ram", MKDEV(RAMDISK_MAJOR, n)); - return rd_load_image("/dev/root"); -} - static int exit_code; static int decompress_error; =20 --=20 2.47.3 From nobody Sat Feb 7 18:20:05 2026 Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) (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 26D1C30FC3F for ; Fri, 17 Oct 2025 06:11:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760681485; cv=none; b=VAS+nCtbsvrJL29nrIaKXWH+AHZYtxn7S7qgV8SIEFKhtB8RP0YbW2KTMYB3wx7KNHyfVxFP0lEq4dYA9oXHIDxCT5u3wMjIv8a1H/8Qb+i29rLgEyTOYCy95fw1kc3mGVhBM0b7rE01xAa/j96dRfT/0sjQ56L9Nv/HQOBnwaQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760681485; c=relaxed/simple; bh=ulNxyjs+7P2Oi91QTv8ZCqiBF+ih61EgQsdAC1fi7Y0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=EsRL0RZomB468PvhJQnSnlh89OhU5C2p2+Os3qtxKpczF9jrMNXEe6wl3Eu9kOU5JaU+cK2rou+tPRgHG/LvQ4Y4yw+lfTL3yBF+PG8iV8kC0Sn5Sl/LLTc5ldQrCwp7d/LmXevz/kc6DYIcwLgr+y/f8B/dnttpKEP5YZJKBOA= 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=fxsUWHaQ; arc=none smtp.client-ip=209.85.221.52 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="fxsUWHaQ" Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-3ee12807d97so1430267f8f.0 for ; Thu, 16 Oct 2025 23:11:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1760681481; x=1761286281; 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=OqXHg8fIVhNftDZOE9plbEgrQCbIv7x8GRINtPvlAdM=; b=fxsUWHaQhj7CFg7lwcIffAaSGDYWnNOGnC2Wtr3PDtaEQ9OtgWAnhCZQLOr71juH5N 3E/e54f8YRt74Evm+pMY6HvoH1eAmF6GGjFao2uXEssAtfz413aAKV/SMCQpVD1yjpF5 xc+Ur35Icqe6/d4U7f4prbrV3uXc52+J4ltL6zk0jWtqUqy3Wu1QIgjoRWEs94JGfPf6 fN9loldJBtOUIUBY/zuNxxt9O41Ya+f1i0Soerajk472YDphWjYYmMdQOA3QRy7P4Tfa GFMJNBc840prEByFOpUiIYEcNOtpizvHVz2tfiQgiwYAyKEIgyRVv4/P/RFOb4FO9GG8 Ps6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760681481; x=1761286281; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OqXHg8fIVhNftDZOE9plbEgrQCbIv7x8GRINtPvlAdM=; b=rW2rkZY2AqlnuSA6C0/BHoLib/5NZGIWsZNEYqudQDrWQ3gpLEf8HxQ0WETc3yWNie jKaFBuyg6/C0OzfUa1wKI/FYet1S745a57urkAdRlktoI4lPtpz/WVDOVHPII+foPByT SCXNrxZa1IkjCUJ+mL4CtnCoPSfeUk6zE+3/svTLtbAX2r/OsmWGYPS+WDh8tSvPsbba JICmhAvQcZ1qjGl9H3wTOipF4zJTfQ6vL9VpfiwXrwat3jyhkDhY+bUNRPBFYcU5Cecu uxPJZNjAh04I/ui4micNcWHoMqCVDQacYwDnxnFaaS2eoFSKJVck70AtAh6w6uIof9Bs DPcQ== X-Forwarded-Encrypted: i=1; AJvYcCVj+t70xq28VEfCCg+90eFU8fhHPL/LbIMjjyx9hOHBwabAyLcxu7gXyxaEg4HS+/fDejdlKsRjW0z/d0M=@vger.kernel.org X-Gm-Message-State: AOJu0YzXhqFUfIoVuZ7j00sXTAoXcIJEwQkLZcVUwqFQhfP6/hh6udDg KmAl7B2W1TOE09E3flgHcRlmhLyFHPgDijLf/bJ+46924FWiOSZ6yhNk X-Gm-Gg: ASbGncvua51TabSsaIyqUSk+ZYwjwedkj4RAHM5nQWA0FEQGn3E7bDVL8F/6840iI0E Lt73idgpHFbhdI/weu+K9Fn17L1z2C8Qn41OaEW5kKxmIBoKbXmMLdg/EIoAlAA6Ix3drmuBPpV +vaL2k1wCglQy04Ow8Nopfzx6Azde3gxiwHzEa0bTrUXR0BKzqw1vBEwtYBqyGNZG76H0wkHY7u H1m0o9FRDkw1TXBlSd4U0W9lOzSjwZRRsf/7gTNZVX8d4JYoW5o+w33QWRHTgSsxckLJcTVD8Ou Emy1mf4ZfWMFr3gAjMLseS/JSpCTC60yOhZAYmJ/aYt/4G+OFtEGAnleox8P2tnCD1PleNW+0Pe o2chkKutrhvFPS1BOcnsfeTizSfSbmUo9qYKXGWBjEi5cydIB72vnhMXus5euYFH2sNW4VtcN77 xY4CvPc6B2i08= X-Google-Smtp-Source: AGHT+IG9nFyXU6/YzYNrNEKOmFbcI73aJtoTWz3HhvfOqLzAHFD1KIWSe0W31I+6MYQb5EK9zvZOHQ== X-Received: by 2002:a05:6000:2507:b0:425:737a:4804 with SMTP id ffacd0b85a97d-42704d4422dmr1625416f8f.4.1760681480389; Thu, 16 Oct 2025 23:11:20 -0700 (PDT) Received: from localhost ([212.73.77.104]) by smtp.gmail.com with UTF8SMTPSA id ffacd0b85a97d-426ff84cbb7sm7231059f8f.23.2025.10.16.23.11.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 16 Oct 2025 23:11:19 -0700 (PDT) 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 v3 3/3] init: remove /proc/sys/kernel/real-root-dev Date: Fri, 17 Oct 2025 06:09:56 +0000 Message-ID: <20251017060956.1151347-4-safinaskar@gmail.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251017060956.1151347-1-safinaskar@gmail.com> References: <20251017060956.1151347-1-safinaskar@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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/ad= min-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. =3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D =20 =20 -real-root-dev -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D - -See Documentation/admin-guide/initrd.rst. - - reboot-cmd (SPARC only) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 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=3D8, /* string: domainname */ =20 KERN_PANIC=3D15, /* int: panic timeout */ - KERN_REALROOTDEV=3D16, /* real root device to mount after initrd */ =20 KERN_SPARC_REBOOT=3D21, /* reboot command on Sparc */ KERN_CTLALTDEL=3D22, /* int: allow ctl-alt-del to reboot */ diff --git a/init/do_mounts_initrd.c b/init/do_mounts_initrd.c index bf381aa0400f..82613a3be756 100644 --- a/init/do_mounts_initrd.c +++ b/init/do_mounts_initrd.c @@ -8,31 +8,11 @@ =20 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 =3D 1; =20 phys_addr_t phys_initrd_start __initdata; unsigned long phys_initrd_size __initdata; =20 -#ifdef CONFIG_SYSCTL -static const struct ctl_table kern_do_mounts_initrd_table[] =3D { - { - .procname =3D "real-root-dev", - .data =3D &real_root_dev, - .maxlen =3D sizeof(int), - .mode =3D 0644, - .proc_handler =3D 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"); --=20 2.47.3