From: Heinrich Schuchardt <xypron.glpk@gmx.de>
To: u-boot@lists.denx.de
Subject: [PATCH] disk: gpt: verify alternate LBA points to last usable LBA
Date: Tue, 9 Mar 2021 18:15:43 +0100 [thread overview]
Message-ID: <6bf8b5e2-d2eb-0e5d-88bf-b090eda3b63d@gmx.de> (raw)
In-Reply-To: <bac261cb-ffb7-8a61-6cd1-6f72b9241b1f@weidmueller.com>
On 09.03.21 17:24, Stefan Herbrechtsmeier wrote:
> Hi Heinrich,
>
> Am 08.03.2021 um 18:38 schrieb Heinrich Schuchardt:
>> On 08.03.21 17:07, Stefan Herbrechtsmeier wrote:
>>> From: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
>>>
>>> The gpt command require the GPT backup header at the standard location
>>> at the end of the device.Check the alternate LBA value before reading
>>> the GPT backup header from the last usable LBA of the device.
>>
>> If there is a bug in the gpt command, please, fix it instead of
>> introducing constraints that don't exist in the UEFI specification.
>>
>> The UEFI specification has:
>>
>> "The backup GPT Partition Entry Array must be located after the Last
>> Usable LBA and end before the backup GPT Header."
>
> "If the primary GPT is invalid, the backup GPT is used instead and it is
> located on the last logical block on the disk." [UEFI specification 2.8,
> S. 120]
Thank you for pointing me to this sentence which I missed.
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
>
> "Note that UEFI standard requires the backup header at the end of the
> device and partitioning tools can automatically relocate the header to
> follow the standard." [sfdisk man page, --relocate, gpt-bak-mini]
>
> What should U-Boot do? I have a patch to use the backup GPT header if
> only the header itself is valid but I don't know if this behavior is
> correct.
>
> Regards,
> ? Stefan
next prev parent reply other threads:[~2021-03-09 17:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-08 16:07 [PATCH] disk: gpt: verify alternate LBA points to last usable LBA Stefan Herbrechtsmeier
2021-03-08 17:38 ` Heinrich Schuchardt
2021-03-09 9:36 ` Stefan Herbrechtsmeier
2021-03-09 16:24 ` Stefan Herbrechtsmeier
2021-03-09 17:15 ` Heinrich Schuchardt [this message]
2021-04-13 14:28 ` Tom Rini
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=6bf8b5e2-d2eb-0e5d-88bf-b090eda3b63d@gmx.de \
--to=xypron.glpk@gmx.de \
--cc=u-boot@lists.denx.de \
/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.