Signals to cinit

Oleg Nesterov oleg at redhat.com
Wed Nov 12 08:12:34 PST 2008


On 11/12, Oleg Nesterov wrote:
>
> On 11/10, sukadev at linux.vnet.ibm.com wrote:
> >
> > Oleg Nesterov [oleg at redhat.com] wrote:
> > | > Or something. yes, sys_rt_sigqueueinfo() is problematic...
> >
> > Yes, if user-space sets si_pid to 0.
> >
> > Can we change sys_rt_sigqueueinfo() to:
> >
> > 	if (!info->si_pid)
> > 		info->si_pid = getpid();
>
> I doubt very much we can do this. This can break the existing applications
> which can overload ->si_pid. I think it is better to pass ->si_pid as is.
> If user-space sends siginfo_t so sub-namespace, it must know what it does.
> I don't think the kernel can help, it just can't know what ->si_pid actually
> means. Unless this is documented somewhere, but I don't know.

On the second thought, I think perhaps we should do the following.

if sys_rt_sigqueueinfo() sends the signal to the sub-namespace, then clear
always ->sid_pid. Otherwise do not touch it.

This way we can't break the existing apps, and this simplifies send_signal()
which should take "is_it_from_ancestor_ns" into account.

What do you think?

Oleg.



More information about the Containers mailing list