Re:Keeping Memory Contents Secret
by m_eiman on Monday November 25, 2019 @03:40AM
(#21626406)
It'd be interesting to have the kernel transparently encrypt the secret page whenever the process is put to sleep or waiting for IO, so that the contents are only readable when the process is active. Could be a nice, if not perfect, layer of protection against having the secrets read from other processes. IIRC there's a way to store crypto keys in CPU registers, so that they won't be available in a RAM dump.
[ Parent
| on HN ]
You'd have to find a way to pin the keys in the registers, lest they be put in RAM during a context switch.
Re:Keeping Memory Contents Secret
by tom_mellior on Monday November 25, 2019 @05:41AM
(#21626924)
That's OK if your threat model trusts the kernel and only wants to protect against speculative execution attacks within the application itself. While the application is running, they keys will only ever be accessed from registers -- context switches are transparent to the application.
Yes, but there are debug registers that can be used for this.