freebsd-nq/sys/geom/part
Robert Noland 1c2dee3cc9 Fix handling of GPT headers when size is > 92 bytes.
It is valid for an on-disk GPT header to report a header size which is
greater than 92 bytes.  Previously, we would read in the sector and copy
only the 92 bytes that we know how to deal with before calculating the
checksum for comparison.  This meant that when we did the checksum, we
overshot the buffer and took in random memory, so the checksum would fail.

We now determine the size of the header and allocate enough space to
preserve the entire on-disk contents.  This allows us to be correctly
calculate the checksum and be able to modify and write the header back
to the disk, while preserving data that we might not understand.

Reported by:	Kris Weston
Approved by:	marcel@
MFC after:	2 weeks
2009-11-07 17:29:03 +00:00
..
g_part_apm.c
g_part_bsd.c
g_part_ebr.c The first 96 bytes may not be zeroes. It can contain trivial boot 2009-09-28 23:52:47 +00:00
g_part_gpt.c Fix handling of GPT headers when size is > 92 bytes. 2009-11-07 17:29:03 +00:00
g_part_if.m
g_part_mbr.c
g_part_pc98.c
g_part_vtoc8.c
g_part.c If provider is open for writing when we taste it, skip it for classes that 2009-10-09 09:42:22 +00:00
g_part.h