freebsd-nq/lib/libufs
Kirk McKusick 8f829a5cf0 Continuing efforts to provide hardening of FFS. This change adds a
check hash to the filesystem inodes. Access attempts to files
associated with an inode with an invalid check hash will fail with
EINVAL (Invalid argument). Access is reestablished after an fsck
is run to find and validate the inodes with invalid check-hashes.
This check avoids a class of filesystem panics related to corrupted
inodes. The hash is done using crc32c.

Note this check-hash is for the inode itself and not any of its
indirect blocks. Check-hash validation may be extended to also
cover indirect block pointers, but that will be a separate (and
more costly) feature.

Check hashes are added only to UFS2 and not to UFS1 as UFS1 is
primarily used in embedded systems with small memories and low-powered
processors which need as light-weight a filesystem as possible.

Reviewed by:  kib
Tested by:    Peter Holm
Sponsored by: Netflix
2018-12-11 22:14:37 +00:00
..
block.c
bread.3
cgread.3
cgroup.c
getinode.3 In preparation for adding inode check-hashes, clean up and 2018-11-13 21:40:56 +00:00
inode.c Continuing efforts to provide hardening of FFS. This change adds a 2018-12-11 22:14:37 +00:00
libufs.3 Bring up to date with recently added functions berase(3), getinode(3), 2018-11-26 23:09:45 +00:00
libufs.h Continuing efforts to provide hardening of FFS. This change adds a 2018-12-11 22:14:37 +00:00
Makefile In preparation for adding inode check-hashes, clean up and 2018-11-13 21:40:56 +00:00
Makefile.depend
sblock.c Normally when an attempt is made to mount a UFS/FFS filesystem whose 2018-12-06 00:09:39 +00:00
sbread.3
type.c
ufs_disk_close.3