[lkml]   [2006]   [Oct]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: copy_from_user / copy_to_user with no swap space
mfbaustx <> 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
Departamento de Informatica Fono: +56 32 2654431
Universidad Tecnica Federico Santa Maria +56 32 2654239
Casilla 110-V, Valparaiso, Chile Fax: +56 32 2797513
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2006-10-16 22:25    [W:0.036 / U:17.564 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site