freebsd-skq/sys/ufs/ffs
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
..
ffs_alloc.c Remove unused argument to priv_check_cred. 2018-12-11 19:32:16 +00:00
ffs_balloc.c Replace the TRIM consolodation framework originally added in -r337396 2018-08-18 22:21:59 +00:00
ffs_extern.h Continuing efforts to provide hardening of FFS. This change adds a 2018-12-11 22:14:37 +00:00
ffs_inode.c Continuing efforts to provide hardening of FFS. This change adds a 2018-12-11 22:14:37 +00:00
ffs_rawread.c sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
ffs_snapshot.c Continuing efforts to provide hardening of FFS. This change adds a 2018-12-11 22:14:37 +00:00
ffs_softdep.c Continuing efforts to provide hardening of FFS. This change adds a 2018-12-11 22:14:37 +00:00
ffs_subr.c Continuing efforts to provide hardening of FFS. This change adds a 2018-12-11 22:14:37 +00:00
ffs_suspend.c Avoid assertion in /dev/ufssuspend when the suspend ioctl is 2018-08-01 19:06:55 +00:00
ffs_tables.c sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
ffs_vfsops.c Continuing efforts to provide hardening of FFS. This change adds a 2018-12-11 22:14:37 +00:00
ffs_vnops.c Remove unused argument to priv_check_cred. 2018-12-11 19:32:16 +00:00
fs.h Continuing efforts to provide hardening of FFS, this change adds a 2018-10-23 21:10:06 +00:00
softdep.h Replace the TRIM consolodation framework originally added in -r337396 2018-08-18 22:21:59 +00:00