HomeFreeBSD

mkimg: Ensure GPT Entry Array is at least 16k

Description

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

(cherry picked from commit 9b42d3e12ffc6896fcb4e60c1b239ddf60705831)
(cherry picked from commit 5401ebd33cf5073e8c0f095527504d38f74a926b)
Approved-by: re (cperciva)

Details

Provenance
impAuthored on Oct 18 2023, 3:23 PM
Reviewer
emaste
Differential Revision
D42245: mkimg: Ensure GPT Entry Array is at least 16k
Parents
rG1016db078351: ifconfig: add static bridge addresses for vlan 0, not 1
Branches
Unknown
Tags
Unknown