DM-Crypt Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [dm-crypt] RAM Flush on Shutdown?
@ 2014-02-07 23:52 Saiga
  2014-02-08 17:05 ` Milan Broz
  0 siblings, 1 reply; 2+ messages in thread
From: Saiga @ 2014-02-07 23:52 UTC (permalink / raw)
  To: dm-crypt

Does DM-Crypt/LUKS purge the RAM of the master key when the shutdown
signal is given? If not how could I configure it to do so?

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dm-crypt] RAM Flush on Shutdown?
  2014-02-07 23:52 [dm-crypt] RAM Flush on Shutdown? Saiga
@ 2014-02-08 17:05 ` Milan Broz
  0 siblings, 0 replies; 2+ messages in thread
From: Milan Broz @ 2014-02-08 17:05 UTC (permalink / raw)
  To: Saiga, dm-crypt

On 02/08/2014 12:52 AM, Saiga wrote:
> Does DM-Crypt/LUKS purge the RAM of the master key when the shutdown
> signal is given? If not how could I configure it to do so?

Not explicitly (no shutdown handler directly in dmcrypt) but init
system should dismout storage stack properly.
(Dmcrypt will wipe key on mapping removal. You can also force removal
of active device by "dmsetup remove -f <dev>" - this will replace active
dmcrypt mapping by remapping to error target thus removal of key
in memory as well.)

I think the only init system currently implementing this is systemd,
others just only remount read-only on shutdown which will not remove
dmcrypt key from memory. You need some ramdisk to do this properly...

The problem is obvious here - you have no idea which IO are in flight,
so force removal of key is equivalent to force device removal.

Another option is to explicitly call key wipe (which will put dmcrypt
device in suspend state). Not sure if anyone using this - but it was
designed for suspend to RAM.

Milan

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-02-08 17:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-07 23:52 [dm-crypt] RAM Flush on Shutdown? Saiga
2014-02-08 17:05 ` Milan Broz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox