Skip to content
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

Add integrity checks to file system #217

Open
PatrickKa opened this issue Dec 18, 2023 · 2 comments
Open

Add integrity checks to file system #217

PatrickKa opened this issue Dec 18, 2023 · 2 comments

Comments

@PatrickKa
Copy link
Contributor

PatrickKa commented Dec 18, 2023

Description

I think littlefs already supports some kind of integrity check, but I am not sure. We have to check out its documentation. If it does not support it already, we add a CRC32 checksum at the end of all files.

@PatrickKa
Copy link
Contributor Author

Blocked by #186

@PatrickKa
Copy link
Contributor Author

Littlefs does check if writes were successful by immediately reading back each written page, but it does not detect data corruption after a finished write. We can, however, add checksums right in Program() and Read() which we must provide to littlefs to know how to write to a device (in our case flash or RAM). This has the advantage that the user of the file system does not know or care about the checksums. Also, since we have one checksum per page (256 bytes) instead of per file, we get better error detection for files > 256 B. Finally, this also means that this issue is no longer blocked by #186. It is actually part of the error handling now.

@PatrickKa PatrickKa changed the title Add integrity check for EDU programs and results Add integrity checks to file system Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants