lkml.org 
[lkml]   [2011]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] user namespace: make signal.c respect user namespaces
Quoting Oleg Nesterov (oleg@redhat.com):
> Sorry, I missed this email...
>
> On 10/04, Serge E. Hallyn wrote:
> >
> > Quoting Oleg Nesterov (oleg@redhat.com):
> > > --- x/kernel/signal.c
> > > +++ x/kernel/signal.c
> > > @@ -1019,6 +1019,27 @@ static inline int legacy_queue(struct si
> > > return (sig < SIGRTMIN) && sigismember(&signals->signal, sig);
> > > }
> > >
> > > +static inline fixup_uid(struct siginfo *info, struct task_struct *t)
> > > +{
> > > +#ifdef CONFIG_USER_NS
> > > + if (current_user_ns() == task_cred_xxx(t, user_ns)))
> > > +#endif
> > > + return;
> > > +
> > > + if (SI_FROMKERNEL(info))
> > > + switch (info->si_code & __SI_MASK) {
> > > + default:
> > > + return;
> > > +
> > > + case __SI_CHLD:
> >
> > If I'm reading this right, this will catch do_notify_parent, which is
> > sending signals not from current.
>
> Argh, indeed. So we need to modify the callers.
>
> OTOH, this is only possible if the debugger notifies tracee->real_parent,
> or we reparent to /sbin/init.

Right. (I thought we decided that was the case anyway, but maybe I was
missing something)

> Anyways, yes, I forgot about this. Thanks.
>
> Oleg.

I'll try to get the new patch out this week, else early next. (Shouldn't
take long to write, but testing is another matter)

thanks,
-serge


\
 
 \ /
  Last update: 2011-10-11 15:11    [W:0.067 / U:1.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site