Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F142213892
D42247.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
989 B
Referenced Files
None
Subscribers
None
D42247.diff
View Options
diff --git a/sys/geom/part/g_part_gpt.c b/sys/geom/part/g_part_gpt.c
--- a/sys/geom/part/g_part_gpt.c
+++ b/sys/geom/part/g_part_gpt.c
@@ -1045,6 +1045,20 @@
g_free(sectbl);
}
+ /*
+ * The reserved area preceeds the valid area for partitions. Warn when
+ * the lba_start doesn't meet the standard's minimum size for the gpt
+ * entry array. UEFI 2.10 section 5.3 specifies that the LBA must be 32
+ * (for 512 byte sectors) or 6 (4k sectors) or larger. This is different
+ * than the number of valid entries in the GPT entry array, which can be
+ * smaller.
+ */
+ if (table->hdr->hdr_lba_start < GPT_MIN_RESERVED / pp->sectorsize + 2) {
+ printf("GEOM: warning: %s lba_start %llu < required min %d\n",
+ pp->name, (unsigned long long)table->hdr->hdr_lba_start,
+ GPT_MIN_RESERVED / pp->sectorsize + 2);
+ }
+
basetable->gpt_first = table->hdr->hdr_lba_start;
basetable->gpt_last = table->hdr->hdr_lba_end;
basetable->gpt_entries = table->hdr->hdr_entries;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jan 18, 8:20 AM (2 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27707024
Default Alt Text
D42247.diff (989 B)
Attached To
Mode
D42247: gpart: Add warning when the start sector is too low.
Attached
Detach File
Event Timeline
Log In to Comment