opnsense-src/sys/geom
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
..
bde Rename the kthread_xxx (e.g. kthread_create()) calls 2007-10-20 23:23:23 +00:00
cache Despite several examples in the kernel, the third argument of 2007-06-04 18:25:08 +00:00
concat If provider is open for writing when we taste it, skip it for classes that 2009-10-09 09:42:22 +00:00
eli Detach GELI providers on shutdown/reboot, which will allow providers underneath 2009-03-16 19:31:08 +00:00
gate Bump copyright year. 2006-09-08 10:20:44 +00:00
journal Make gjournal work with kernel compiled with "options DIAGNOSTIC". 2009-06-30 14:34:06 +00:00
label If provider is open for writing when we taste it, skip it for classes that 2009-10-09 09:42:22 +00:00
linux_lvm - Apply the same naming rules of LVM names as done in the LVM code itself. 2009-06-24 22:09:30 +00:00
mirror Add support for changing providers priority. 2009-09-06 06:52:06 +00:00
multipath There's no need for checking result of M_WAITOK allocation. 2009-08-27 08:40:51 +00:00
nop Remove trailing spaces. 2006-09-30 08:16:49 +00:00
part Fix handling of GPT headers when size is > 92 bytes. 2009-11-07 17:29:03 +00:00
raid3 Revert r190676,190677 2009-04-10 04:08:34 +00:00
shsec If provider is open for writing when we taste it, skip it for classes that 2009-10-09 09:42:22 +00:00
stripe If provider is open for writing when we taste it, skip it for classes that 2009-10-09 09:42:22 +00:00
uzip If provider is open for writing when we taste it, skip it for classes that 2009-10-09 09:42:22 +00:00
vinum - Improve error message consistency and wording. 2009-10-05 08:44:31 +00:00
virstor Avoid NULL deference. 2008-06-30 15:21:42 +00:00
zero Remove trailing spaces. 2006-02-01 12:06:01 +00:00
geom.h Make gjournal work with kernel compiled with "options DIAGNOSTIC". 2009-06-30 14:34:06 +00:00
geom_aes.c Don't pass error value pointer to g_read_data(9) at all if we don't 2005-11-30 22:15:00 +00:00
geom_bsd.c Trivial patch to show on which geom has the error been detected. 2008-12-01 15:02:00 +00:00
geom_bsd_enc.c Decode as many or as few partition entries as the label claims there 2007-12-09 22:44:22 +00:00
geom_ccd.c - Fix a potential NULL pointer reference. Note that this should not happen in 2008-11-25 20:28:33 +00:00
geom_ctl.c Add sbuf_new_auto as a shortcut for the very common case of creating a 2008-08-09 11:14:05 +00:00
geom_ctl.h Simplify the GEOM OAM api: Drop the request type, and let everything 2003-06-01 13:47:51 +00:00
geom_dev.c Do not check proper request alignment here in geom_dev in production. 2009-09-08 05:46:38 +00:00
geom_disk.c Simplify g_disk_ident_adjust() function and allow any printable character 2009-09-04 09:39:06 +00:00
geom_disk.h Revert r190676,190677 2009-04-10 04:08:34 +00:00
geom_dump.c Make the kern.geom.conftxt sysctl more usable by also dumping the 2005-11-12 20:02:02 +00:00
geom_event.c When orphaning a provider, cancel events related to it. 2007-09-27 20:18:34 +00:00
geom_fox.c Don't pass error value pointer to g_read_data(9) at all if we don't 2005-11-30 22:15:00 +00:00
geom_int.h Use unit number allocation functions for GEOM minor numbers. 2004-10-25 12:28:28 +00:00
geom_io.c MFp4: 2009-09-06 19:33:13 +00:00
geom_kern.c Add sbuf_new_auto as a shortcut for the very common case of creating a 2008-08-09 11:14:05 +00:00
geom_mbr.c Don't pass error value pointer to g_read_data(9) at all if we don't 2005-11-30 22:15:00 +00:00
geom_mbr_enc.c /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 18:27:30 +00:00
geom_pc98.c Don't pass error value pointer to g_read_data(9) at all if we don't 2005-11-30 22:15:00 +00:00
geom_pc98_enc.c Fix signed vs unsigned warning. 2005-05-01 09:44:50 +00:00
geom_redboot.c Do not stop the loop when an empty or deleted directory entry is found. 2009-06-24 06:42:13 +00:00
geom_slice.c Add sbuf_new_auto as a shortcut for the very common case of creating a 2008-08-09 11:14:05 +00:00
geom_slice.h Allow to use g_slice_orphan() from outside. 2006-02-18 11:21:17 +00:00
geom_subr.c Fix a panic which (reportedly) can happen when unmounting a filesystem 2009-07-01 20:16:29 +00:00
geom_sunlabel.c Don't pass error value pointer to g_read_data(9) at all if we don't 2005-11-30 22:15:00 +00:00
geom_sunlabel_enc.c Support VTOC volume names. This can be useful to distinguish multiple 2005-03-30 09:33:10 +00:00
geom_vfs.c Remove unused variable. 2009-09-08 17:20:17 +00:00
geom_vfs.h Remove the struct thread unuseful argument from bufobj interface. 2008-10-10 21:23:50 +00:00
geom_vol_ffs.c Don't pass error value pointer to g_read_data(9) at all if we don't 2005-11-30 22:15:00 +00:00
notes For removable devices without media we set a zero mediasize but a non-zero 2004-09-05 21:15:58 +00:00