disk: gpt: verify alternate LBA points to last usable LBA
authorStefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Mon, 8 Mar 2021 16:07:11 +0000 (16:07 +0000)
committerTom Rini <trini@konsulko.com>
Mon, 12 Apr 2021 21:17:11 +0000 (17:17 -0400)
commitd46933839f98d8cdb34fc87299b5f2a4ec4bbfec
treea5b50124886981da1c9a84b143945c0b1f4cb75e
parentb935d190662306b4174a8f7e3dbd6194c5f55ecb
disk: gpt: verify alternate LBA points to last usable LBA

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.

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
disk/part_efi.c