1c2dee3cc9
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 |
||
---|---|---|
.. | ||
bde | ||
cache | ||
concat | ||
eli | ||
gate | ||
journal | ||
label | ||
linux_lvm | ||
mirror | ||
multipath | ||
nop | ||
part | ||
raid3 | ||
shsec | ||
stripe | ||
uzip | ||
vinum | ||
virstor | ||
zero | ||
geom_aes.c | ||
geom_bsd_enc.c | ||
geom_bsd.c | ||
geom_ccd.c | ||
geom_ctl.c | ||
geom_ctl.h | ||
geom_dev.c | ||
geom_disk.c | ||
geom_disk.h | ||
geom_dump.c | ||
geom_event.c | ||
geom_fox.c | ||
geom_int.h | ||
geom_io.c | ||
geom_kern.c | ||
geom_mbr_enc.c | ||
geom_mbr.c | ||
geom_pc98_enc.c | ||
geom_pc98.c | ||
geom_redboot.c | ||
geom_slice.c | ||
geom_slice.h | ||
geom_subr.c | ||
geom_sunlabel_enc.c | ||
geom_sunlabel.c | ||
geom_vfs.c | ||
geom_vfs.h | ||
geom_vol_ffs.c | ||
geom.h | ||
notes |