Re: copy to suer space

From: Anton Altaparmakov (aia21@cam.ac.uk)
Date: Tue Nov 20 2001 - 12:37:19 EST


At 17:08 20/11/01, Luís Henriques wrote:
>When I'm modifing the code, I'm sure that the page is in memory because my
>code is called from the user space, in the exact location where I want to
>change it (with a breakpoint interruption...)

There is a time window in which it might get paged out in the mean time but
it's admittedly a very small window. But that is irrelevant as copy_to_user
would take care of the page out case by faulting the page back in (that is
at least my understanding of it).

But that is not the problem I was talking about: Imagine you do
successfully modify the user space code and AFTER THAT the kernel pages out
the code and pages it back in later. Your change is then lost without trace.

That can easily crash your program depending on what modifications you do
to it...

Anton

-- 
   "I've not lost my mind. It's backed up on tape somewhere." - Unknown
-- 
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Linux NTFS Maintainer / WWW: http://linux-ntfs.sf.net/
ICQ: 8561279 / WWW: http://www-stu.christs.cam.ac.uk/~aia21/

- 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/



This archive was generated by hypermail 2b29 : Fri Nov 23 2001 - 21:00:23 EST