3 ms·
There's a whole section on the memory implications: "Another change, which created a bit of controversy over the life of the patch, disables hibernation when a
by GauntletWizard 5y ago
There's a whole section on the memory implications: "Another change, which created a bit of controversy over the life of the patch, disables hibernation when a secret memory area is active."
Based on that, I doubt they ignored the problem of swap space. My guess is that the region of memory is designated unswappable, as was already possible before.
- nextaccountic 5y agoIdeally there would be a way for the OS to signal that it's going to hibernate, so that the application can get rid of the secret stuff (overwrite with zeroes etc) and go to a state that, when back from hibernation, would ask for a password again. Or even, disable this when hibernating to a swap inside an encrypted luks partition (which also asks for a password when it wakes up)
- Galanwe 5y agoI guess it should be theorically possible already for processes to do that. Systemd for instance is monitoring the suspend state.
- mjw1007 5y agoPerhaps a reasonable way would be to have a memfd_secret() flag which requests "kill this process if you're going to hibernate". Then you could do the operations involving the secret in a dedicated subprocess.
- formerly_proven 5y agoThis sounds usable to me and also promotes process-based isolation of application subcomponents.
- astan 5y agomlock already allows you to do this so they likely did consider it