Re: how to (really) cleanly shutdown the system when root is on multiple stacked block devices

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Christoph Anton Mitterer
Date: Saturday, June 26, 2010 - 9:44 am

On Sat, 2010-06-26 at 18:17 +0200, Milan Broz wrote:
You just mean I cannot remove/close it, until something above (e.g.
filesystem) is still open/mounted? Yeah that was clear (and that's good,
isn't it?!)


clear clear ... :)


of course :)


a) What is recent? ;)
b) The barrier thingy,... does it have to be supported by the thing
(e.g. filesystem, LV, etc.) on top? Or is this something generically
implemented for flushing?


Uhm what exactly do you mean?


So I understand,.. this means it is something "separate"... and
regardless of whether the filesystem on top supports barriers itself,...
I'll have everything flushed out to disk when doing the remount,ro...
even if the block layer devices below are not yet closed.


Great :) And I guess you can speak for both lvm and dm-crypt ?! :)
And it should probably also flush through md,... as it's also dm?


How long is this about staying in the RAM (after poweroff)?
And after reboot.... isn't everything set to 0x0? Otherwise,... booting
e.g. another OS or a compromised Linux could leak the key...


I've already feared that... so we need de-initramfs? ;)


I guess non-root devices should be cleanly closed, with luksClose, or
not?


Isn't it possible to patch the kernel,.. that always when halting or
rebooting,.. it "simply" wipes _ALL_ dm-cryptkeys available,...
And why/how are plaintext leaks possible?


Already thought about that before,... but it seems impossible to me,...
to convice distros to do that...
And it's quite complex I guess,... given the fact that there are
basically arbitrary ways to stack your block devices...


Right now when I shutdown,... I get errors for lvm/dm-crypt/md,... as
they all can't close there devices,... as the root-fs is just ro-mounted
(ok the Debian cryptsetup package seems to not display that error,.. but
it's probably there).
Nevertheless,... what should "we" do now?
- Always seeing a "failed" is rather ugly
- One could simply not call the appropriate initscripts for stopping in
rc0 and rc6.
This would however affect all such devices,... not only those where the
root-fs is on top.
But I guess it's rather complex to find out the correct ones and skip
the error-message only for them...
And it does not solve the crypto-leak issue :(



Cheers,
Chris.

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
how to (really) cleanly shutdown the system when root is o ..., Christoph Anton Mitterer, (Sat Jun 26, 4:44 am)
Re: how to (really) cleanly shutdown the system when root ..., Christoph Anton Mitterer, (Sat Jun 26, 9:44 am)
Re: how to (really) cleanly shutdown the system when root ..., Christoph Anton Mitterer, (Sat Jun 26, 4:10 pm)
Re: how to (really) cleanly shutdown the system when root ..., Christoph Anton Mitterer, (Sat Jun 26, 7:34 pm)
Re: how to (really) cleanly shutdown the system when root ..., Christoph Anton Mitterer, (Sat Jun 26, 7:38 pm)