lkml.org 
[lkml]   [1998]   [Aug]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: CLONE_PID (was Re: Potential Threads security bug with LinuxThreads)
From
Date
> I agree; I've had a hard time writing threaded applications on Linux due to
> the thread semantics not working the way my nice O'Reilly "pthreads
> Programming" book says they should. The reason I post is not to negatively
> criticize, but to enquire if a Greater Being has a reason for avoiding
> CLONE_PID or if it's just not implemented yet because no one is working on
> it/finished it. In the former case, I'd be curious to know what the reason
> is.

I'm not working of CLONE_PID, but I am doing something related.

The problems I'm looking at are:

1. Implementing pthread_create with the current clone() support
requires context switches to a manager thread, so pthread_create() has
a huge cost compared to a bare clone().

2. The obvious deviations from POSIX threads: signal handling, wait etc.

Fixing 1 will affect the implementation of 2, so I'm doing 1
first. (I'm most of the way there -- I have kernel changes and a
modified LinuxThreads that run most of my threaded programs reliably,
but there are a few remaining issues to take care of, and I have to
get my modified LinuxThreads to work with existing kernels too.)

The reason I'm not tackling CLONE_PID is that I don't see what problem
it is supposed to solve. Having getpid() and getppid() return the
right values can easily and reliably be achieved in LinuxThreads with
no help from the kernel. If there is a problem that CLONE_PID *itself*
solves, then the good news is that someone has done most of the work
already (http://www.accessv.com/~peeter/#TID).

I don't know of anyone else (Greater Beings or mere mortals) actively
working on CLONE_PID, or working towards better PThread
compliance. This doesn't mean it isn't being done, of course, though I
have been looking out for any discussion of the matter since at least
the start of the year.

--
Dave Wragg


-
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.altern.org/andrebalsa/doc/lkml-faq.html

\
 
 \ /
  Last update: 2005-03-22 13:44    [W:0.092 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site