Re: [TRIVIAL] Warn users about machines with non-working WP bit

Kasper Dupont
2002-08-06T14:12:40Z

"David S. Miller" wrote:
>
> From: Kasper Dupont <kasperd@daimi.au.dk>
> Date: Tue, 06 Aug 2002 16:03:34 +0200
>
> "David S. Miller" wrote:
> > verify_area() checks aren't enough, consider a threaded application
> > calling mprotect() while the copy is in progress.
>
> Couldn't we just freeze all other processes with the same mm while
> a copy_to_user is in progress?
>
> What if we have to sleep and page in some memory from disk?
>
> Your idea could lead to deadlock in a multi-threaded app.

Why? The page should eventually get into memory from the disk,
at this point the process doing the copy can continue, and
when it finishes the other processes gets waked up. While the
copy_to_user is in progress all the processes witht this mm
should be in noninterruptible sleep. The sleeping procces
doesn't need to do anything to get the page into memory, so I
cannot see the problem.

--
Kasper Dupont -- der bruger for meget tid på usenet.
For sending spam use mailto:razrep@daimi.au.dk
or mailto:mcxumhvenwblvtl@skrammel.yaboo.dk