freebsd-dev/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 Sharpen the saw: 2009-03-27 05:35:12 +00:00
g_part_bsd.c Sharpen the saw: 2009-03-27 05:48:42 +00:00
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 Revert revisions 188839 and 188868. Use of the ioctl in geom_dev.c 2009-07-08 05:56:14 +00:00
g_part_mbr.c Sharpen the saw: 2009-03-30 00:53:46 +00:00
g_part_pc98.c Sharpen the saw: 2009-03-30 01:03:58 +00:00
g_part_vtoc8.c Fix g_part_dumpconf and g_part_name prototpyes. 2009-02-10 02:43:07 +00:00
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 Remove gpt_offset and related code. It was introduced for use 2009-02-17 04:12:10 +00:00