Thread (32 messages) 32 messages, 6 authors, 2021-05-19

Re: [PATCH v19 6/8] PM: hibernate: disable when there are active secretmem users

From: Dan Williams <hidden>
Date: 2021-05-19 01:49:59
Also in: linux-api, linux-arch, linux-fsdevel, linux-kselftest, linux-mm, linux-riscv, lkml

On Tue, May 18, 2021 at 6:33 PM James Bottomley [off-list ref] wrote:
On Tue, 2021-05-18 at 11:24 +0100, Mark Rutland wrote:
quoted
On Thu, May 13, 2021 at 09:47:32PM +0300, Mike Rapoport wrote:
quoted
From: Mike Rapoport <redacted>

It is unsafe to allow saving of secretmem areas to the hibernation
snapshot as they would be visible after the resume and this
essentially will defeat the purpose of secret memory mappings.

Prevent hibernation whenever there are active secret memory users.
Have we thought about how this is going to work in practice, e.g. on
mobile systems? It seems to me that there are a variety of common
applications which might want to use this which people don't expect
to inhibit hibernate (e.g. authentication agents, web browsers).
If mobile systems require hibernate, then the choice is to disable this
functionality or implement a secure hibernation store.   I also thought
most mobile hibernation was basically equivalent to S3, in which case
there's no actual writing of ram into storage, in which case there's no
security barrier and likely the inhibition needs to be made a bit more
specific to the suspend to disk case?
quoted
Are we happy to say that any userspace application can incidentally
inhibit hibernate?
Well, yes, for the laptop use case because we don't want suspend to
disk to be able to compromise the secret area.  You can disable this
for mobile if you like, or work out how to implement hibernate securely
if you're really suspending to disk.
Forgive me if this was already asked and answered. Why not document
that secretmem is ephemeral in the case of hibernate and push the
problem to userspace to disable hibernation? In other words
hibernation causes applications to need to reload their secretmem, it
will be destroyed on the way down and SIGBUS afterwards. That at least
gives a system the flexibility to either sacrifice hibernate for
secretmem (with a userspace controlled policy), or sacrifice secretmem
using processes for hibernate.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help