Messages in this thread | | | Date | Tue, 17 Nov 1998 05:48:43 +0100 | From | Andi Kleen <> | Subject | Re: linux-kernel-digest V1 #2839 (writable /proc/<pid>/cmdli |
| |
On Mon, Nov 16, 1998 at 11:39:16PM +0100, Peeter Joot wrote: > Hi Andy, > > The sendmail solution that uses kmem is only for SCO if I read the code right. > On linux all that is required is coping a new string into argv[0]. This is > much simpler then messing around with /proc at least in our case (db2) where we > have a multi-process based system rather than a multi-thread based solution. > > But, your point about threads is a good one, because argv[0] would be shared > for all threads and a writable /proc/<pid>/cmdline could be used to rename the > ps output for different threads/clones, and overwriting argv[0] wouldn't work > in this case.
It wouldn't even with your /proc hack.
If the threads share VM (with CLONE_VM) they share all memory, including the environment. argv[] is stored in the environment. Changing Linux to support only partly shared memory in CLONE_VM (with threads private pages like in Windows or OS/2) would be a fairly major redesign of the kernel threads mechanism.
-Andi
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |