3 ms·
I don't know. I/O error and panic both make sense to me, but I'd say the latter only in specific situations. It seems unwarranted to me to panic the system when
by anyfoo 3y ago
I don't know. I/O error and panic both make sense to me, but I'd say the latter only in specific situations. It seems unwarranted to me to panic the system when, say, a README.txt somewhere in the fs has a non-validating block.
- krackers 3y agoFrom https://support.apple.com/sr-rs/guide/security/secd698747c9/web https://support.apple.com/sr-rs/guide/security/secd698747c9/... >In case of mismatch, the system assumes the data has been tampered with and won’t return it to the requesting software. Whether this then leads to a kernel panic later on probably depends on if it's the kernel that needs this file, or a userspace process
- anyfoo 3y agoYeah, that's basically what I was getting at. For things like the root hash, it probably makes sense to panic (or otherwise impede boot), in order to have an early, more descriptive failure, than to later only implicitly access the root hash by validating the first accessed page of the init process (launchd, in macOS), and panicking with a less obvious I/O error reading launchd. In most situations, you likely just want the regular I/O error and then whatever happens downstream of that.