From: Jeremy Maitin-Shepard <jeremy@jeremyms.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: Nigel Cunningham <ncunningham@crca.org.au>,
tuxonice-devel@lists.tuxonice.net, linux-kernel@vger.kernel.org,
Rafael Wysocki <rjw@sisk.pl>
Subject: Re: [TuxOnIce-devel] RFC: Suspend-to-ram cold boot protection by encrypting page cache
Date: Fri, 10 Jul 2009 00:05:23 -0700 [thread overview]
Message-ID: <87hbxl587g.fsf@jeremyms.com> (raw)
In-Reply-To: <20090709101433.GG10937@elf.ucw.cz> (Pavel Machek's message of "Thu, 09 Jul 2009 12:14:33 +0200")
Pavel Machek <pavel@ucw.cz> writes:
> On Wed 2009-07-08 04:09:41, Jeremy Maitin-Shepard wrote:
>> Pavel Machek <pavel@ucw.cz> writes:
>>
>> > On Wed 2009-07-08 03:47:53, Jeremy Maitin-Shepard wrote:
>> >> Pavel Machek <pavel@ucw.cz> writes:
>> >>
>> >> [snip]
>> >>
>> >> > I believe uswsusp could be used rather easily. Just modify s2disk to
>> >> > encrypt image in ram without writing it out, then decrypt it from ram
>> >> > and resume... it should be interesting hack.
>> >>
>> >> As far as I understand, that would be completely useless since the image
>> >> that would be encrypted would just be a copy of what would still remain
>> >> in memory.
>>
>> > Yes... so next step would be kernel call that would erase all the
>> > pagecache and anonymous pages. You would still leave some data in
>> > kernel structures, but that would be quite hard to fix.
>>
>> Okay. (This does still require the same assumption as TuxOnIce
>> regarding the page cache, though.)
> (Not sure; clearing the page cache could be done atomically, from
> interrupts disabled. But I'm no mm expert.)
But surely it wouldn't work to leave interrupts disabled after that
until the page cache is restored. After the page cache (and other
sensitive memory) is encrypted, after possibly entering and resuming
from S3, the page cache needs to be decrypted. Userspace will be doing
the decryption if a uswsusp-like model is being used, and even if the
decryption is done in the kernel, userspace needs to provide the
encryption key to the kernel. Even disregarding the issue of running
userspace with interrupts disabled, which I assume might have problems,
userspace would likely need to talk to some of the devices in order to
obtain the encryption key from the user.
--
Jeremy Maitin-Shepard
next prev parent reply other threads:[~2009-07-10 7:05 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-01 6:07 RFC: Suspend-to-ram cold boot protection by encrypting page cache Jeremy Maitin-Shepard
2009-07-01 6:24 ` [TuxOnIce-devel] " Nigel Cunningham
2009-07-01 6:43 ` Jeremy Maitin-Shepard
2009-07-01 9:09 ` Nigel Cunningham
2009-07-01 15:55 ` Rafael J. Wysocki
2009-07-01 20:57 ` Jeremy Maitin-Shepard
2009-07-01 22:41 ` Rafael J. Wysocki
2009-07-01 22:58 ` Nigel Cunningham
2009-07-01 23:06 ` Jeremy Maitin-Shepard
2009-07-02 5:14 ` U Kuehn
2009-07-02 5:47 ` Jeremy Maitin-Shepard
2009-07-02 16:12 ` Rafael J. Wysocki
2009-07-04 2:44 ` Pavel Machek
2009-07-08 10:47 ` Jeremy Maitin-Shepard
2009-07-04 2:57 ` Pavel Machek
2009-07-08 11:09 ` Jeremy Maitin-Shepard
2009-07-09 10:14 ` Pavel Machek
2009-07-10 7:05 ` Jeremy Maitin-Shepard [this message]
2009-07-11 22:10 ` Pavel Machek
2009-07-01 12:21 ` Jens Gustedt
2009-07-01 20:40 ` Jeremy Maitin-Shepard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87hbxl587g.fsf@jeremyms.com \
--to=jeremy@jeremyms.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ncunningham@crca.org.au \
--cc=pavel@ucw.cz \
--cc=rjw@sisk.pl \
--cc=tuxonice-devel@lists.tuxonice.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.