5b13fa7987
Shortlinks occupy the space of both di_db and di_ib when used. However, everywhere that wants to read or write a shortlink takes a pointer do di_db and promptly runs off the end of it into di_ib. This is fine on most architectures, if a little dodgy. However, on CHERI, the compiler can optionally restrict the bounds on pointers to subobjects to just that subobject, in order to mitigate intra-object buffer overflows, and this is enabled in CheriBSD's pure-capability kernels. Instead, clean this up by inserting a union such that a new di_shortlink can be added with the right size and element type, avoiding the need to cast and allowing the use of the DIP macro to access the field. This also mirrors how the ext2fs code implements extents support, with the exact same structure other than having a uint32_t i_data[] instead of a char di_shortlink[]. Reviewed by: mckusick, jhb Differential Revision: https://reviews.freebsd.org/D33650 |
||
---|---|---|
.. | ||
cd9660 | ||
ffs | ||
msdos | ||
sys | ||
tests | ||
cd9660.c | ||
cd9660.h | ||
ffs.c | ||
ffs.h | ||
Makefile | ||
Makefile.depend | ||
makefs.8 | ||
makefs.c | ||
makefs.h | ||
msdos.c | ||
msdos.h | ||
mtree.c | ||
walk.c |