From: Vincent Mailhol <mailhol@kernel.org>
To: sashiko-reviews@lists.linux.dev, 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-efi@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>
Subject: Re: [PATCH v2 2/7] init: add DPS root partition type UUID definitions
Date: Sun, 25 Oct 2026 16:45:12 +0100 [thread overview]
Message-ID: <a0306e3e-0f1d-4e11-8ca9-b2b6d5ad8854@kernel.org> (raw)
In-Reply-To: <sashiko-outbox-184220@kernel.org>
On 25/10/2026 at 14:13, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [Medium] init: DPS_ROOT_PARTITION_TYPE_UUID sets 64-bit UUID on 32-bit LOONGARCH
> --
>
> commit 109ce0d2c6fc812a6bc94f72e97807013dc5fc56
> Author: Vincent Mailhol <mailhol@kernel.org>
>
> init: add DPS root partition type UUID definitions
>
> This commit adds the hidden DPS_ROOT_PARTITION_TYPE_UUID string Kconfig
> symbol populated with the Discoverable Partitions Specification root
> partition type UUIDs for EFI-supported architectures, along with the
> derived DPS_ROOT_AUTO_DISCOVERY boolean symbol.
>
> Link: https://uapi-group.org/specifications/specs/discoverable_partitions_specification/
>
>> diff --git a/init/Kconfig b/init/Kconfig
>> index b31aa298c4fe5..133854355697b 100644
>> --- a/init/Kconfig
>> +++ b/init/Kconfig
>> @@ -2166,6 +2166,20 @@ config ARCH_HAS_PREPARE_SYNC_CORE_CMD
>> config ARCH_HAS_SYNC_CORE_BEFORE_USERMODE
>> bool
>>
>> +config DPS_ROOT_PARTITION_TYPE_UUID
>> + depends on EFI && EFI_PARTITION
>> + string
>> + default "69dad710-2ce4-4e3c-b16c-21a1d49abed3" if ARM
>> + default "b921b045-1df0-41c3-af44-4c6f280d3fae" if ARM64
>> + default "77055800-792c-4f94-b39a-98c91b762bb6" if LOONGARCH
>
> [Severity: Medium]
> Should the LOONGARCH default also depend on 64BIT, matching the RISCV &&
> 64BIT check on the next line?
>
> The UUID 77055800-792c-4f94-b39a-98c91b762bb6 is defined by the
> Discoverable Partitions Specification specifically for 64-bit LoongArch
> (SD_GPT_ROOT_LOONGARCH64), and the specification does not define a root
> partition type UUID for 32-bit LoongArch.
I see. I overlooked the 32-bit LoongArch case because DPS only defines
partition type UUIDs for LoongArch64. I will add a 64BIT guard in v3:
default "77055800-792c-4f94-b39a-98c91b762bb6" if LOONGARCH && 64BIT
I will wait for further review comments before posting v3.
> In arch/loongarch/Kconfig, config LOONGARCH unconditionally selects EFI and
> supports both 32-bit and 64-bit kernel builds (such as
> arch/loongarch/configs/loongson32_defconfig):
>
> arch/loongarch/Kconfig:
> config LOONGARCH
> ...
> select EFI
> select GENERIC_ATOMIC64 if 32BIT
> ...
> config 32BIT
> bool "32-bit kernel"
>
> config 64BIT
> bool "64-bit kernel"
>
> When building a 32-bit LoongArch kernel (CONFIG_LOONGARCH=y, CONFIG_32BIT=y,
> CONFIG_EFI=y, and CONFIG_EFI_PARTITION=y), DPS_ROOT_PARTITION_TYPE_UUID gets
> populated with the 64-bit LoongArch UUID and DPS_ROOT_AUTO_DISCOVERY is
> enabled. Because a 32-bit LoongArch kernel sets elf_check_arch to
> elf32_check_arch in arch/loongarch/include/asm/elf.h and only loads
> ELFCLASS32 binaries, wouldn't early_lookup_dps_root() auto-discover and
> mount a 64-bit LoongArch root partition when root= is omitted, and then fail
> to execute its 64-bit userspace?
Yours sincerely,
Vincent Mailhol
next prev parent reply other threads:[~2026-10-25 15:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-25 13:03 [PATCH v2 0/7] init: discoverable root partitions Vincent Mailhol
2026-10-25 13:03 ` [PATCH v2 1/7] block: store GPT partition type UUID Vincent Mailhol
2026-10-25 13:03 ` [PATCH v2 2/7] init: add DPS root partition type UUID definitions Vincent Mailhol
2026-10-25 13:13 ` sashiko-bot
2026-10-25 15:45 ` Vincent Mailhol [this message]
2026-10-25 13:03 ` [PATCH v2 3/7] init: factor out root device lookup into lookup_root_device() Vincent Mailhol
2026-10-25 13:03 ` [PATCH v2 4/7] init: discover root by DPS partition type UUID Vincent Mailhol
2026-10-25 13:03 ` [PATCH v2 5/7] block: skip partitions with DPS no-auto GPT attribute Vincent Mailhol
2026-10-25 13:03 ` [PATCH v2 6/7] init: add secondary DPS root partition type UUID Vincent Mailhol
2026-10-25 13:03 ` [PATCH v2 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=a0306e3e-0f1d-4e11-8ca9-b2b6d5ad8854@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-efi@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--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 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.