mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vincent Mailhol <mailhol@kernel.org>
To: Jens Axboe <axboe@kernel.dk>, Davidlohr Bueso <dave@stgolabs.net>,
	 Alexander Viro <viro@zeniv.linux.org.uk>,
	 Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>
Cc: linux-kernel@vger.kernel.org, linux-block@vger.kernel.org,
	 linux-efi@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	 Dave Hansen <dave.hansen@intel.com>,
	 James Bottomley <James.Bottomley@HansenPartnership.com>,
	 Helge Deller <deller@gmx.de>,
	Matthew Wilcox <willy@infradead.org>,
	 Vincent Mailhol <mailhol@kernel.org>
Subject: [PATCH v3 6/7] block: add secondary DPS root partition type UUID
Date: Mon, 02 Nov 2026 22:29:13 +0100	[thread overview]
Message-ID: <20261102-discoverable-root_partitions-v3-6-27f04b69b7ab@kernel.org> (raw)
In-Reply-To: <20261102-discoverable-root_partitions-v3-0-27f04b69b7ab@kernel.org>

Some 64-bit architectures can run 32-bit user space. For those
configurations, also allow DPS root discovery to use the compatible
32-bit root partition type UUID as a fallback.

Add a secondary root partition type UUID Kconfig symbol and include it
in the DPS root lookup when it is defined.

Try the secondary UUID only when the native lookup returns -ENODEV.

The fallback reflects compatibility support built into the kernel. If
32-bit execution is disabled, for example with ia32_emulation=0, the
selected root's 32-bit init will fail to execute. Do not check
ia32_enabled(): rejecting the fallback would instead leave no
discoverable root partition, resulting in a kernel panic either way.

Suggested-by: Dave Hansen <dave.hansen@intel.com>
Link: https://lore.kernel.org/r/03be57ae-0e41-4b8a-adc5-bdd85ccce951@intel.com
Signed-off-by: Vincent Mailhol <mailhol@kernel.org>
---
 block/Kconfig        | 7 +++++++
 block/early-lookup.c | 3 +++
 2 files changed, 10 insertions(+)

diff --git a/block/Kconfig b/block/Kconfig
index 3b5d3ad42dde..f3a0730ffcde 100644
--- a/block/Kconfig
+++ b/block/Kconfig
@@ -222,6 +222,13 @@ config DPS_ROOT_PARTITION_TYPE_UUID
 	default "4f68bce3-e8cd-4db1-96e7-fbcaf984b709" if X86_64
 	default "44479540-f297-41b2-9af7-d131d5f0458a" if X86
 
+config DPS_ROOT_PARTITION_TYPE_UUID_SECONDARY
+	depends on DPS_ROOT_PARTITION_TYPE_UUID != "" && COMPAT
+	string
+	default "69dad710-2ce4-4e3c-b16c-21a1d49abed3" if ARM64
+	default "60d5a7fe-8e7d-435c-b714-3dd8162144e1" if RISCV
+	default "44479540-f297-41b2-9af7-d131d5f0458a" if X86_64 && IA32_EMULATION
+
 config DPS_ROOT_AUTO_DISCOVERY
 	def_bool DPS_ROOT_PARTITION_TYPE_UUID != ""
 
diff --git a/block/early-lookup.c b/block/early-lookup.c
index c59d14889fee..2e7dace5efa3 100644
--- a/block/early-lookup.c
+++ b/block/early-lookup.c
@@ -340,6 +340,9 @@ int __init early_lookup_dps_root(dev_t *dev)
 {
 	static const char root_type_uuids[][UUID_STRING_LEN + 1] __initconst = {
 		CONFIG_DPS_ROOT_PARTITION_TYPE_UUID,
+#ifdef CONFIG_DPS_ROOT_PARTITION_TYPE_UUID_SECONDARY
+		CONFIG_DPS_ROOT_PARTITION_TYPE_UUID_SECONDARY,
+#endif
 	};
 	static char esp_partuuid[UUID_STRING_LEN + 1] __initdata;
 	int err;

-- 
2.56.0


  parent reply	other threads:[~2026-11-02 21:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-02 21:29 [PATCH v3 0/7] init: discoverable root partitions Vincent Mailhol
2026-11-02 21:29 ` [PATCH v3 1/7] block: store GPT partition type UUID Vincent Mailhol
2026-11-02 21:29 ` [PATCH v3 2/7] block: add DPS root partition type UUID definitions Vincent Mailhol
2026-11-02 21:29 ` [PATCH v3 3/7] init: factor out root device lookup into lookup_root_device() Vincent Mailhol
2026-11-02 21:29 ` [PATCH v3 4/7] block: discover root by DPS partition type UUID Vincent Mailhol
2026-11-02 21:29 ` [PATCH v3 5/7] block: skip partitions with DPS no-auto GPT attribute Vincent Mailhol
2026-11-02 21:29 ` Vincent Mailhol [this message]
2026-11-02 21:29 ` [PATCH v3 7/7] docs: document discoverable root partitions Vincent Mailhol

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=20261102-discoverable-root_partitions-v3-6-27f04b69b7ab@kernel.org \
    --to=mailhol@kernel.org \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=axboe@kernel.dk \
    --cc=brauner@kernel.org \
    --cc=dave.hansen@intel.com \
    --cc=dave@stgolabs.net \
    --cc=deller@gmx.de \
    --cc=jack@suse.cz \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    --cc=willy@infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®