mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Suspend to RAM - freeze & sync
@ 2013-01-18 15:16 Radek Pilar
  2013-10-08 14:47 ` Pavel Machek
  0 siblings, 1 reply; 2+ messages in thread
From: Radek Pilar @ 2013-01-18 15:16 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 826 bytes --]

Hello,
I'm trying to implement feature that removes cryptsetup keys from RAM on
suspend to RAM: mounts ramfs, unpacks initramfs to ramfs, moves /proc
/dev and /sys to ramfs, chroots, calls luksSuspend, suspends system
using /sys/power/state, after resume calls luksResume and cleans up.
However, there is a small issue I wasn't able to solve: after calling
luksSuspend, all attempts to access suspended device blocks - so most
likely some processes won't be able to freeze. The same issue will be
with sync just before suspend - if there are some data to be written,
sync() blocks. If I comment out freeze and sync from the suspend code,
it suspends (and wakes up) just fine - however, that patch will never be
accepted.
Is there any *correct* way to do this? (Skip freeze/sync on demand)?
Thanks
Radek Pilar


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]

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

* Re: Suspend to RAM - freeze & sync
  2013-01-18 15:16 Suspend to RAM - freeze & sync Radek Pilar
@ 2013-10-08 14:47 ` Pavel Machek
  0 siblings, 0 replies; 2+ messages in thread
From: Pavel Machek @ 2013-10-08 14:47 UTC (permalink / raw)
  To: Radek Pilar; +Cc: linux-kernel

Hi!
> I'm trying to implement feature that removes cryptsetup keys from RAM on
> suspend to RAM: mounts ramfs, unpacks initramfs to ramfs, moves /proc
> /dev and /sys to ramfs, chroots, calls luksSuspend, suspends system
> using /sys/power/state, after resume calls luksResume and cleans up.
> However, there is a small issue I wasn't able to solve: after calling
> luksSuspend, all attempts to access suspended device blocks - so most
> likely some processes won't be able to freeze. The same issue will be
> with sync just before suspend - if there are some data to be written,
> sync() blocks. If I comment out freeze and sync from the suspend code,
> it suspends (and wakes up) just fine - however, that patch will never be
> accepted.
> Is there any *correct* way to do this? (Skip freeze/sync on demand)?

Maybe uswsusp interface is powerful enough to do this?
									Pavel


-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

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

end of thread, other threads:[~2013-10-08 14:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-18 15:16 Suspend to RAM - freeze & sync Radek Pilar
2013-10-08 14:47 ` Pavel Machek

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

all inboxes | Powered by JetHome®