-
Notifications
You must be signed in to change notification settings - Fork 3k
Extended mount to check all metadata-pairs #9406
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@jenia81 Can you check whether this resolved the CI issues? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this change. LGTM.
@ARMmbed/mbed-os-maintainers The KCM CI passed with this PR, solving the issue https://jira.arm.com/browse/IOTSTOR-754. I think it should be merged into 5.11.2 if this is a blocker. |
We will check, 5.11.2 is going to be released soon. We will start CI asap for this one (it take a bit as the queue is big at the moment - we will monitor). |
The most common issue with using littlefs in mbed-os is when users change from littlefs->FAT->littlefs (or with MBR or similar). When this corrupts the superblock, littlefs tries to fall back to the backup superblock. However, at this point in the time the old superblock may be very out-of-date and pointing to an incorrect filesystem. There's no complete solution to a malicious modification of the filesystem (short of checking all metadata+data, a very expensive operation), but we can at least expand our validation to all of the metadata for the filesystem. This at least catches the common issues with changing between different filesystems.
NOTE: This PR has now been rebased. If this was made in error, feel free to force-push your local branch to restore the PR. |
20ecebd
to
9d6e309
Compare
CI started |
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
Description
Okay, short explanation:
@davidsaada's idea, this improves littlefs's detection of storage format encroachment (littlefs->FAT->littlefs). This is an issue with MCC<->Mbed OS integration due to some CI/example integration issues.
Long explanation:
The most common issue with using littlefs in mbed-os is when users change from littlefs->FAT->littlefs (or with MBR or similar). When this corrupts the superblock, littlefs tries to fall back to the backup superblock. However, at this point in the time the old superblock may be very out-of-date and pointing to an incorrect filesystem.
There's no complete solution to a malicious modification of the filesystem (short of checking all metadata+data, a very expensive operation), but we can at least expand our validation to all of the metadata for the filesystem. This at least catches the common issues with changing between different filesystems.
Downside: LittleFS takes a bit longer to mount
Upside: Improved user experience when trying out different filesystems
Pull request type
Reviewers
@davidsaada, @ARMmbed/mbed-os-storage