Re: Syslets, signals, and security

2007-06-05 Thread Andi Kleen
> > I don't think it's a good idea. > > Ditto (and glibc handles it for userspace posix APIs) How? -Andi - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Ple

Re: Syslets, signals, and security

2007-06-04 Thread Alan Cox
> The problem is that you would need to reference count/lock them in every > syscall or ioctl or similar. Otherwise another thread > could change them in the middle of a syscall which wouldn't be > good. Doing this full reference counting would be probably somewhat > expensive with more locked cycl

Re: Syslets, signals, and security

2007-06-04 Thread Andi Kleen
Jeff Dike <[EMAIL PROTECTED]> writes: > How about splitting the credentials out of the task_struct and making > them sharable ala ->mm et al? You change uid there and it changes for > everyone. It will make fork slightly more expensive though. Strictly that's required by POSIX anyways. But it's

Re: Syslets, signals, and security

2007-06-04 Thread Jeff Dike
On Mon, Jun 04, 2007 at 10:45:42AM -0700, Zach Brown wrote: > > Second, security. What happens if a well-written server starts life > > as root, does some (async) I/O, and setuids to a non-root uid? There > > will be a bunch of async threads still running as root, with the > > result that async o

Re: Syslets, signals, and security

2007-06-04 Thread Zach Brown
On Mon, Jun 04, 2007 at 12:31:45PM -0400, Jeff Dike wrote: > Syslets seem like a fundamentally good idea to me, but the current > implementation, using CLONE_THREAD threads, seems like a basic > problem. It has remaining problems that need to be addressed, yes. > First, there are signals. If the

Re: Syslets, signals, and security

2007-06-04 Thread Ulrich Drepper
On 6/4/07, Jeff Dike <[EMAIL PROTECTED]> wrote: First, there are signals. If the app has an interval timer enabled, every thread will inherit it and you will have 32 threads getting alarms, which seems surprising and wasteful. Not only that. IIRC the current code does nothing about blocking s

Syslets, signals, and security

2007-06-04 Thread Jeff Dike
Syslets seem like a fundamentally good idea to me, but the current implementation, using CLONE_THREAD threads, seems like a basic problem. First, there are signals. If the app has an interval timer enabled, every thread will inherit it and you will have 32 threads getting alarms, which seems surp