Re: mlock(1)

From: Stefan Seyfried
Date: Mon Sep 27 2004 - 05:33:14 EST


Andrea Arcangeli wrote:

> random keys are exactly fine, but only for the swap usage on a desktop
> machine (the one I mentioned above, where the user will not be asked for
> a password), but it's not ok for suspend/resume, suspend/resume needs
> a regular password asked to the user both at suspend time and at resume
> time.

Why not ask on every boot? (and yes, the passphrase could be stored on a
fixed disk location - hashed with a function of sufficient complexity
and number of bits, just to warn the user if he does a typo, couldn't
it?). If suspend is working, you basically never reboot. So why ask on
suspend _and_ resume? This also solves the "suspend on lid close" issue.

And a resume is - in the beginning - a boot, so just ask early enough
(maybe the bootloader could do this?)

I'm not a crypto expert at all, just thinking loud...

Stefan

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/