freebsd-nq/sys/geom
Marcel Moolenaar ae04949bff Fix unaligned memory accesses on Alpha and possible other platforms.
By using a pointer to struct dos_partition, we implicitly tell the
compiler that the pointer is 4-bytes aligned, even though we know
that's not the case. The fact that we only dereference the pointer
to access a byte-wide field (field dp_ptyp) is not a guarantee that
the compiler will in fact use a byte-wide load. On some platforms
it's more efficient to use long word or quad word loads and use
bit-shifting and bit-masking to get the intended byte. On those
platforms an misaligned load will be the result.
The fix is to use byte-wide pointer arithmetic based on sizeof() and
offsetof() to avoid invalid casts which avoids that the compiler
makes invalid assumptions.

Backtrace provided by: wilko@
MFC after: 1 week
2006-06-04 20:26:13 +00:00
..
bde Kill leading whilespace. 2005-11-30 19:07:28 +00:00
concat Remove trailing spaces. 2006-02-01 12:06:01 +00:00
eli geli(8) provides keys on newsession time, so remove CRD_F_KEY_EXPLICIT flag 2006-04-20 06:33:46 +00:00
gate Remove trailing spaces. 2006-02-01 12:06:01 +00:00
label We need to check if file system size is equal to provider's size, because 2006-03-04 19:41:54 +00:00
mirror - Remove dead code. 2006-04-28 12:13:49 +00:00
nop Remove trailing spaces. 2006-02-01 12:06:01 +00:00
raid3 Use G_RAID3_FOREACH_SAFE_BIO() macro instead of G_RAID3_FOREACH_BIO() in 2006-05-04 13:01:16 +00:00
shsec Remove trailing spaces. 2006-02-01 12:06:01 +00:00
stripe Remove trailing spaces. 2006-02-01 12:06:01 +00:00
uzip Rename geom_uzip class to g_uzip in order to be consistent with the naming 2006-01-22 15:35:14 +00:00
vinum Protect from creating striped and RAID5 plexes with unequally sized 2006-03-30 14:01:25 +00:00
zero Remove trailing spaces. 2006-02-01 12:06:01 +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_apple.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_enc.c /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 18:27:30 +00:00
geom_bsd.c Remove the trailing half of a sentence which was clearly superceded 2006-05-24 11:02:32 +00:00
geom_ccd.c Make CCD be able to read and write Linux software raids. 2006-04-13 20:35:31 +00:00
geom_ctl.c Change gctl_set_param() to return an error instead of setting an 2006-04-07 16:19:48 +00:00
geom_ctl.h
geom_dev.c Avoid null pointer dereference. 2005-03-18 06:57:58 +00:00
geom_disk.c Add g_wither_provider() to abstract the details of destroying a 2006-04-10 03:55:13 +00:00
geom_disk.h Fix a bug that caused some /dev entries to continue to exist after 2005-11-18 02:43:49 +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 Remove a race condition that could result in processes being stuck 2005-09-04 19:14:19 +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_gpt.c Fix unaligned memory accesses on Alpha and possible other platforms. 2006-06-04 20:26:13 +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 Fix a typo. 2006-03-13 14:59:57 +00:00
geom_kern.c Add sysctl descriptions. 2005-11-25 10:09:30 +00:00
geom_mbr_enc.c /* -> /*- for copyright notices, minor format tweaks as necessary 2005-01-06 18:27:30 +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_pc98_enc.c Fix signed vs unsigned warning. 2005-05-01 09:44:50 +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_slice.c Add g_wither_provider() to abstract the details of destroying a 2006-04-10 03:55:13 +00:00
geom_slice.h Allow to use g_slice_orphan() from outside. 2006-02-18 11:21:17 +00:00
geom_subr.c Add g_wither_provider() to abstract the details of destroying a 2006-04-10 03:55:13 +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_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_vfs.c - Lock Giant if needed around the call to vnode_create_vobject(). This is 2006-03-02 05:37:44 +00:00
geom_vfs.h Make various random things static 2005-02-10 12:10:35 +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
geom.h Add g_wither_provider() to abstract the details of destroying a 2006-04-10 03:55:13 +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