Re: [PATCH] user namespace: make signal.c respect user namespaces

From: Oleg Nesterov
Date: Tue Sep 20 2011 - 14:21:49 EST


On 09/20, Serge E. Hallyn wrote:
>
> Quoting Oleg Nesterov (oleg@xxxxxxxxxx):
> >
> > I didn't really check, but afaics send_sigio_to_task/etc never use
> > SEND_SIG_NOINFO. And they shouldn't, there is no the sending process.
>
> (I'm sure you're right -

I am not that sure, please recheck ;)

> > I guess ptrace_signal() can even do
> >
> > info->si_pid = task_pid_vnr(current->parent);
> >
> > if (info->si_pid) // same namespace
> > info->si_uid = current_uid();
> > else // can't see the tracer, we are from the sub-namespace
> > info->si_uid = 0;
> >
> > Whatever you like more.
>
> Except you don't have to split pid and user namespaces at the same
> time.

Argh, you mean CLONE_NEWUSER? I fotgot about it. And probably
there is something else which I simply do not know?

I got lost. This means send_signal() can't rely on from_parent_ns.
I have no idea how can we fix sys_kill() without a lot of ugly changes
then.

Oleg.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/