Re: context switch vs. signal delivery [was: Re: Accelerating user mode

Udo A. Steinberg
2002-08-06T11:10:56Z

On Tue, 06 Aug 2002 06:20:52 -0500
Jeff Dike <jdike@karaya.com> wrote:

> us15@os.inf.tu-dresden.de said:
> > if (current->pgrp != -arg &&
> > current->pid != arg &&
> > !capable(CAP_KILL)) return(-EPERM);
>
> What's the problem here? This will let UML do F_SETOWN as well.

It will let the incoming process take over ownership of the socket,
which is probably what you mean and what you currently use.

I'm talking about a setup with the kernel residing in its own process.
On iret it would have to change ownership of the socket to another task,
i.e. process with kernel_pid wants to set task_pid as the owner of the
socket. The above code fragment doesn't permit this, as far as I can see.
What it does permit is the incoming task setting itself to the socket
owner, but that requires that the incoming task always runs a trampoline
first which accomplishes that.

-Udo.