memfd_secret() in 5.14
memfd_secret() in 5.14
Posted Aug 21, 2021 0:22 UTC (Sat) by alopatindev (guest, #153807)In reply to: memfd_secret() in 5.14 by Cyberax
Parent article: memfd_secret() in 5.14
I like this idea. I wonder how multithreaded app should handle this signal though. Which thread is supposed to handle the signal: the main one, the random one, all of them?
Another question: do I understand correctly that the protected memory can't even be written to swap in case if the system is about to run OOM? (Or else I guess it would not make much sense to disable just hibernation, without disabling ordinary swapping).
And another completely unrelated idea: how about (at least optionally) zeroing protected memory (by kernel) before completely releasing it? I know that apps suppose to do that, but it's so easy to implement it incorrectly, that I personally would be happy if kernel simply would not allow to leak incorrectly released memory with sensitive data.
