Messages in this thread | | | Date | Mon, 8 Mar 2004 00:36:39 -0600 | From | Andy Isaacson <> | Subject | Re: Some highmem pages still in use after shrink_all_memory()? |
| |
On Sun, Mar 07, 2004 at 04:40:52PM -0800, Andrew Morton wrote: > Pavel Machek <pavel@ucw.cz> wrote: > > For swsusp, I need to free as much memory as possible. Well, and it > > would be great if no highmem pages remained, so that I would not have > > to deal with that. Is that possible? > > No, it isn't. There are pagetable pages and mlocked user pages which we > cannot do anything with. > > We could perhaps swap out the mlocked pages anyway if a suspend is in > progress, but the highmem pagetable pages are not presently reclaimed > by the VM.
Note that there are some applications for which it is a *bug* if an mlocked page gets written out to magnetic media. (gpg, for example.) I imagine that they'd rather lose the mapping and get a page fault on the next reference (which they can then fix up with a new mmap and mlock) than have precious key material written to disk.
... unless, of course, the swap device is securely encrypted a la OpenBSD's 'sysctl vm.swapencrypt.enable'.
http://www.openbsd.org/papers/swapencrypt.ps
However, I don't see how to implement a cryptographically secure swsusp.
(The importance of this behavior is obviously dependent on your threat model. Perhaps the Sufficiently Paranoid gpg users will simply need to avoid using swsusp.)
-andy - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |