From: "Horst H. von Brand" <vonbrand@inf.utfsm.cl>
To: mfbaustx <mfbaustx@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: copy_from_user / copy_to_user with no swap space
Date: Mon, 16 Oct 2006 17:21:24 -0300 [thread overview]
Message-ID: <200610162021.k9GKLOqC015900@laptop13.inf.utfsm.cl> (raw)
In-Reply-To: Message from mfbaustx <mfbaustx@gmail.com> of "Mon, 16 Oct 2006 14:19:03 CDT." <op.thi3x1mvnwjy9v@titan>
mfbaustx <mfbaustx@gmail.com> wrote:
> I've been trying to find or derive a definitive answer to this
> question for a while now but can't quite get over the hump.
>
> I understand when/why copy_<to|from>_user (and siblings) are required
> (address validation, guaranteeing a process is paged in, etc...). The
> question is: if you have no swap space (or virtual memory or
> whatever), can there ever be a case in which any valid pointer to a
> buffer in user-space would be incorrect as a result of another
> process's PTE being present? Put another way: can a process be
> partially paged?
Yes. The executable (including data areas) and shared libraries are demand
paged in (and ro areas could also be evicted), so they can very well be
only partially in memory.
In any case, relying on "this kernel will never have no swap" isn't wise...
--
Dr. Horst H. von Brand User #22616 counter.li.org
Departamento de Informatica Fono: +56 32 2654431
Universidad Tecnica Federico Santa Maria +56 32 2654239
Casilla 110-V, Valparaiso, Chile Fax: +56 32 2797513
prev parent reply other threads:[~2006-10-16 20:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-16 19:19 mfbaustx
2006-10-16 19:28 ` Oliver Neukum
2006-10-16 19:47 ` mfbaustx
2006-10-17 10:58 ` Horst H. von Brand
2006-10-17 12:00 ` Helge Hafting
2006-10-16 19:34 ` Al Viro
2006-10-16 19:39 ` Kyle Moffett
2006-10-16 20:26 ` mfbaustx
2006-10-16 20:21 ` Horst H. von Brand [this message]
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=200610162021.k9GKLOqC015900@laptop13.inf.utfsm.cl \
--to=vonbrand@inf.utfsm.cl \
--cc=linux-kernel@vger.kernel.org \
--cc=mfbaustx@gmail.com \
/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
all inboxes | Powered by JetHome®