aboutsummaryrefslogtreecommitdiff
path: root/stand/efi/boot1/Makefile
diff options
context:
space:
mode:
authorKirk McKusick <mckusick@FreeBSD.org>2022-08-13 20:50:08 +0000
committerKirk McKusick <mckusick@FreeBSD.org>2022-08-13 20:51:25 +0000
commit6b9d4fbb7fe550788d82168e7beeabcd5ad238ce (patch)
tree26d22ad93b7de0924c3b6a5fda265ee0148e9496 /stand/efi/boot1/Makefile
parent30f6269155927423eda4ed0bea2c903ef008b2d6 (diff)
downloadsrc-main.tar.gz
src-main.zip
Explicitly initialize rather than reading newly allocated UFS inodes.HEADmain
The function ffs_vgetf() is used to find or load UFS inodes into a vnode. It first looks up the inode and if found in the cache its vnode is returned. If it is not already in the cache, a new vnode is allocated and its associated inode read in from the disk. The read is done even for inodes that are being initially created. The contents for the inode on the disk are assumed to be empty. If the on-disk contents had been corrupted either due to a hardware glitch or an agent deliberately trying to exploit the system, the UFS code could panic from the unexpected partially-allocated inode. Rather then having fsck_ffs(8) verify that all unallocated inodes are properly empty, it is easier and quicker to add a flag to ffs_vgetf() to indicate that the request is for a newly allocated inode. When set, the disk read is skipped and the inode is set to its expected empty (zero'ed out) initial state. As a side benefit, an unneeded disk I/O is avoided. Reported by: Peter Holm Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'stand/efi/boot1/Makefile')
0 files changed, 0 insertions, 0 deletions