aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/param.h
diff options
context:
space:
mode:
authorKirk McKusick <mckusick@FreeBSD.org>2018-12-11 22:14:37 +0000
committerKirk McKusick <mckusick@FreeBSD.org>2018-12-11 22:14:37 +0000
commit8f829a5cf0fa341a95fd4bed7091d6c44129d68f (patch)
tree2cb40f5c8c0521451556577ffdfcd8b8aeb90861 /sys/sys/param.h
parentd3cc40300eaa672ce8f7d1782454267d3ea15dfb (diff)
downloadsrc-8f829a5cf0fa341a95fd4bed7091d6c44129d68f.tar.gz
src-8f829a5cf0fa341a95fd4bed7091d6c44129d68f.zip
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
Notes
Notes: svn path=/head/; revision=341836
Diffstat (limited to 'sys/sys/param.h')
-rw-r--r--sys/sys/param.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/sys/param.h b/sys/sys/param.h
index 64aa65bef7b0..a28bc884d25c 100644
--- a/sys/sys/param.h
+++ b/sys/sys/param.h
@@ -60,7 +60,7 @@
* in the range 5 to 9.
*/
#undef __FreeBSD_version
-#define __FreeBSD_version 1300004 /* Master, propagated to newvers */
+#define __FreeBSD_version 1300005 /* Master, propagated to newvers */
/*
* __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,
@@ -89,6 +89,7 @@
#define P_OSREL_CK_CYLGRP 1200046
#define P_OSREL_VMTOTAL64 1200054
#define P_OSREL_CK_SUPERBLOCK 1300000
+#define P_OSREL_CK_INODE 1300005
#define P_OSREL_MAJOR(x) ((x) / 100000)
#endif