The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Arjan van de Ven <arjanv@redhat.com>
To: Chris Friesen <cfriesen@nortelnetworks.com>
Cc: Andy Isaacson <adi@hexapodia.org>, Pavel Machek <pavel@ucw.cz>,
	linux-kernel@vger.kernel.org, Andrew Morton <akpm@osdl.org>
Subject: Re: Some highmem pages still in use after shrink_all_memory()?
Date: Mon, 8 Mar 2004 16:16:25 +0100	[thread overview]
Message-ID: <20040308151625.GC3999@devserv.devel.redhat.com> (raw)
In-Reply-To: <404C8CBB.1030008@nortelnetworks.com>

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

On Mon, Mar 08, 2004 at 10:09:47AM -0500, Chris Friesen wrote:
> Arjan van de Ven wrote:
> >>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.)
> >>
> >
> >mlock() does not guarantee things not hitting magnetic media, just as
> >mlock() doesn't guarantee that the physical address of a page doesn't
> >change.
> 
> The mlock() man page sure seems to hint that they do, by explicitly 
> describing its use by high-security data processing as a way to keep the 
> information from getting to disk.

... and explicitly describing that this is not a 100% thing due to suspend
etc etc. 

----
mlock disables paging for the memory in the range starting at addr with
length len bytes. All pages which contain a part of the specified memory
range are guaranteed be resident in RAM when the mlock system call returns
successfully and they are guaranteed to stay in RAM until the pages are
unlocked by munlock or munlockall, until the pages are unmapped via munmap,
or until the process terminates or starts another program with exec.  Child
processes do not inherit page locks across a fork.
-----

that is what it guarantees. it guarantees that you don't hard-fault.
The rest of the manpage talks about potential usages but immediatly
describes the crypto one as non-solid

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2004-03-08 15:17 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-07 14:49 Some highmem pages still in use after shrink_all_memory()? Pavel Machek
2004-03-08  0:40 ` Andrew Morton
2004-03-08  6:36   ` Andy Isaacson
2004-03-08  5:41     ` Nigel Cunningham
2004-03-08  9:13     ` Pavel Machek
2004-03-08  9:39     ` Arjan van de Ven
2004-03-08 15:09       ` Chris Friesen
2004-03-08 15:16         ` Arjan van de Ven [this message]
2004-03-08 15:35           ` Chris Friesen
2004-03-08 17:54             ` Zwane Mwaikambo
2004-03-08 16:36       ` Andy Isaacson
2004-03-08 18:34         ` Pavel Machek
2004-03-08 18:52           ` Andy Isaacson

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=20040308151625.GC3999@devserv.devel.redhat.com \
    --to=arjanv@redhat.com \
    --cc=adi@hexapodia.org \
    --cc=akpm@osdl.org \
    --cc=cfriesen@nortelnetworks.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox