Repository navigation
Validate deadman arming and make sysfs writes safe and reversible - #65
Merged
Merged
Conversation
…thout following links, and roll back a failed plan Follow-ups from the review of the previous change: a status query that fails after systemd-run is not 'probably armed'; an empty --pattern matched every lspci line; an attribute that is a symlink is not written through; a write that fails part-way restores the attributes already changed. Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com>
Contributor
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #65 +/- ##
==========================================
+ Coverage 94.14% 94.32% +0.17%
==========================================
Files 6 6
Lines 495 581 +86
Branches 39 47 +8
==========================================
+ Hits 466 548 +82
- Misses 26 29 +3
- Partials 3 4 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Follow-ups from the review of #64 (merged while the review ran).
armconfirms the timer with a query that must answer: a failed query aftersystemd-runis aDeadmanError, not "probably armed".is_armedkeeps its conservative default for the pre-arm and disarm checks.--pattern ""(an empty shell variable) matched every lspci line; empty patterns are refused.O_NOFOLLOWand refuse apowerdirectory that is a symlink, so a valid-looking device under a caller-supplied--sysfs-rootcannot redirect a root write. The device entry itself is a symlink on a real sysfs by design and stays allowed.RuntimePmErrorwith exit 1, not a traceback.arm --timeout N, the form dau-build uses;--timeout N armno longer parses. Stated here rather than supported.