freebsd-dev/sys
Kirk McKusick fb14e73cb4 Normally when an attempt is made to mount a UFS/FFS filesystem whose
superblock has a check-hash error, an error message noting the
superblock check-hash failure is printed and the mount fails. The
administrator then runs fsck to repair the filesystem and when
successful, the filesystem can once again be mounted.

This approach fails if the filesystem in question is a root filesystem
from which you are trying to boot. Here, the loader fails when trying
to access the filesystem to get the kernel to boot. So it is necessary
to allow the loader to ignore the superblock check-hash error and make
a best effort to read the kernel. The filesystem may be suffiently
corrupted that the read attempt fails, but there is no harm in trying
since the loader makes no attempt to write to the filesystem.

Once the kernel is loaded and starts to run, it attempts to mount its
root filesystem. Once again, failure means that it breaks to its prompt
to ask where to get its root filesystem. Unless you have an alternate
root filesystem, you are stuck.

Since the root filesystem is initially mounted read-only, it is
safe to make an attempt to mount the root filesystem with the failed
superblock check-hash. Thus, when asked to mount a root filesystem
with a failed superblock check-hash, the kernel prints a warning
message that the root filesystem superblock check-hash needs repair,
but notes that it is ignoring the error and proceeding. It does
mark the filesystem as needing an fsck which prevents it from being
enabled for writing until fsck has been run on it. The net effect
is that the reboot fails to single user, but at least at that point
the administrator has the tools at hand to fix the problem.

Reported by:    Rick Macklem (rmacklem@)
Discussed with: Warner Losh (imp@)
Sponsored by:   Netflix
2018-12-06 00:09:39 +00:00
..
amd64 Plug memory disclosures via ptrace(2). 2018-12-03 20:54:17 +00:00
arm Plug memory disclosures via ptrace(2). 2018-12-03 20:54:17 +00:00
arm64 Build the dtb for the rock64 board. 2018-12-02 19:36:20 +00:00
bsm
cam NVME trim clocking 2018-11-27 00:36:35 +00:00
cddl zfs: we can boot from dataset with large_dnode enabled 2018-12-03 19:35:21 +00:00
compat Remove redundant declaration after r341517. 2018-12-05 15:56:44 +00:00
conf Fix LINT build after r341572. 2018-12-05 15:42:31 +00:00
contrib sx: retire SX_NOADAPTIVE 2018-12-05 16:43:03 +00:00
crypto rijndael (AES): Avoid leaking sensitive data on kernel stack 2018-10-26 20:53:01 +00:00
ddb ddb: Enable 'thread <address>' 2018-10-20 20:45:49 +00:00
dev mlx4/mlx5: Updated driver version to 3.5.0 2018-12-05 14:25:34 +00:00
dts arm64: allwinner: Add 792Mhz frequency to sun50i-a64-opp 2018-11-30 10:31:30 +00:00
fs Plug memory disclosures via ptrace(2). 2018-12-03 20:54:17 +00:00
gdb
geom Normally when an attempt is made to mount a UFS/FFS filesystem whose 2018-12-06 00:09:39 +00:00
gnu Update our devicetree to 4.19 for arm and arm64 2018-11-10 21:02:32 +00:00
i386 Plug memory disclosures via ptrace(2). 2018-12-03 20:54:17 +00:00
isa Reapply, with minor tweaks, r338025, from the original commit: 2018-09-26 17:12:14 +00:00
kern Further simplify arguments to init. 2018-12-05 19:18:16 +00:00
kgssapi
libkern mcount: tidy up ANSIfication 2018-10-20 22:39:35 +00:00
mips Add CAPABILITIES to the ERL kernel config so that tools that have been 2018-11-28 13:25:10 +00:00
modules mlx5fpga_tools initial code import. 2018-12-05 14:17:22 +00:00
net netmap.h: include stdatomic.h 2018-12-05 15:38:52 +00:00
net80211 Fix misspellings of transmitter/transmitted 2018-08-10 20:37:32 +00:00
netgraph ng_source(4): correction after the change r340617 2018-11-27 04:05:38 +00:00
netinet Clamp the INPCB port hash tables to IPPORT_MAX + 1 chains. 2018-12-05 17:06:00 +00:00
netinet6 Clamp the INPCB port hash tables to IPPORT_MAX + 1 chains. 2018-12-05 17:06:00 +00:00
netipsec Add sadb_x_sa2 extension to SADB_ACQUIRE requests. 2018-10-21 14:19:16 +00:00
netpfil Add ability to request listing and deleting only for dynamic states. 2018-12-04 16:12:43 +00:00
netsmb
nfs
nfsclient
nfsserver
nlm
ofed ipoib: Notify on modify QP failure only when relevant 2018-12-05 13:27:17 +00:00
opencrypto Add sha224 to the authctx union. 2018-10-23 18:07:37 +00:00
powerpc Sprinkle EARLY_DRIVER_MODULE around the tree 2018-12-04 04:55:49 +00:00
riscv Fix reporting of SS_ONSTACK 2018-11-30 22:44:33 +00:00
rpc
security audit: predict AUDITING_TD as false 2018-11-29 09:19:48 +00:00
sparc64 Plug memory disclosures via ptrace(2). 2018-12-03 20:54:17 +00:00
sys sx: retire SX_NOADAPTIVE 2018-12-05 16:43:03 +00:00
teken Implement ECMA-48 "REP", some Linuxen have started emitting them recently. 2018-10-21 08:29:36 +00:00
tests
tools Use ${ECHO} in dtb/dtbo build, pass in from dtb.mk for -s 2018-11-09 18:56:40 +00:00
ufs Normally when an attempt is made to mount a UFS/FFS filesystem whose 2018-12-06 00:09:39 +00:00
vm Normalize COMPAT_43 syscall declarations. 2018-12-04 16:48:47 +00:00
x86 Add definitions for Intel Speed Shift 2018-11-21 00:21:58 +00:00
xdr
xen xen: legacy PVH fixes for the new interrupt count 2018-09-13 07:14:11 +00:00
Makefile