Re: [patch] user-vm-unlock-2.5.31-A2

From: Linus Torvalds (torvalds@transmeta.com)
Date: Thu Aug 15 2002 - 19:06:37 EST


On Fri, 16 Aug 2002, Ingo Molnar wrote:
> > [...] In which case we sure as heck don't want the original child to
> > modify the VM that it now shares with a subthread.
>
> in what way is clone() utilized? if it's via any threading library then
> the fork()-ed process has its own thread state, which must be freed when
> exiting.

See this:

        process X

        fork()
                        -------> Process Y
                                        clone()
                                                                ----> thread Z

                                        exit()
                                        THIS MUST NOT
                                        WRITE TO MEMORY
                                        IN Z!!

Notice how the exit() in Y will never be able to write into the address
space of X - it would only write into the address space of Z, and Z is not
expecting that at all!

                Linus

-
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 : Thu Aug 15 2002 - 22:00:41 EST