Enable dm_verity panic on corruption #445
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
dm_verity.error_behavior doesn't seem to be a current setting; documentation
describes restart_on_corruption which does indeed restart when it detects a
changed block.
Fixes #441
Not the same version, but docs are here: https://github.com/torvalds/linux/blob/master/Documentation/admin-guide/device-mapper/verity.rst
Testing done:
Played with error_behavior and discovered that neither
=1
nor=3
did anything other than log corruption to dmesg.After setting
restart_on_corruption
and letting an evildd
run for a bit, a read from disk causes a hang:And I see the dm-verity restart in the instance screenshot, and the console system log shows things like this from then on; I also confirmed outside that the instance is in a reboot loop (as intended).
...and the instance screenshot either shows grub or has a fun "Error getting console screenshot - An unknown error occurred" error from then on.