Repository navigation
initramfs: mark whole UFS disks read-only without an allowlist - #919
Open
quatrixone wants to merge 1 commit into
Open
quatrixone wants to merge 1 commit into
quatrixone wants to merge 1 commit into
Conversation
The guard removed the sda device node while leaving its whole-disk read-only flag at 0 when UFS_RW was empty. A RAM rescue boot must leave the whole disk read-only, and the hand-over check must detect a reopened disk. Keep the existing Pixel path when an allowlist is present. On Dipper, a RAM-only rescue image built with this init reported ro=1 for all six UFS disks and 85 partitions; root remained initramfs and reboot-to returned to fastboot.
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.
Summary
Make the initramfs mark every UFS whole disk read-only when its writable-partition allowlist is empty or rejected. The old guard removed
/dev/sdabut left the disk'sroflag at 0, so a RAM rescue boot did not meet its own read-only claim. The hand-over check now reports a disk reopened in that mode. Descriptors with a nonempty allowlist keep the existing Pixel behavior.Checks
tests/storage-guardpasses, including both Pixel slot layouts and missing, empty and malformed allowlists. The closed cases now require whole disks to reportro=1and check that a reopenedsdais detected.tools/pr-check origin/mainpasses.dipper), a RAM-only image built with this exactinitramfs/init(SHA-25606a8cc368ce86ae6ba570208d0291c642f143019283dd0a88d99ef2365d746b3) reached the rescue initramfs on kernel7.3.0-rc6-omamobile-push1. All six UFS disks and all 85 partitions reportedro=1. The RAM-onlyreboot-to bootloaderreturned to fastboot; nothing was flashed.This is independent of the Dipper package in #714 and the descriptor-aware smoke check in #916.