]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
mkimg: Ensure GPT Entry Array is at least 16k
authorWarner Losh <imp@FreeBSD.org>
Tue, 17 Oct 2023 17:14:14 +0000 (11:14 -0600)
committerWarner Losh <imp@FreeBSD.org>
Tue, 17 Oct 2023 17:14:23 +0000 (11:14 -0600)
commit9b42d3e12ffc6896fcb4e60c1b239ddf60705831
treebb721117eb9c90eefc1380728f2c248f8e16ffd6
parent56c44bd92efa002b2185445878fc98172ae8c66f
mkimg: Ensure GPT Entry Array is at least 16k

UEFI v2.10 Section 5.3 documentes that the minimum reserved space after
the GPT header be at least 16kB. Enforce this minimum. Before, we'd only
set the number of entries to be the unpadded size. gpart's selective
enforcement of aspects of the GPT standard meant that these images would
work, but couldn't be changed (to add a partition or grow the size of a
partition). This ensures that gpart's overly picky standards don't cause
problems for people wishing to, for example, resize release images.

MFC after: 1 day (we want this in 14.0)
PR: 274312
Sponsored by: Netflix
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D42245
sys/sys/disk/gpt.h
usr.bin/mkimg/gpt.c