From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752619Ab1IWVUe (ORCPT ); Fri, 23 Sep 2011 17:20:34 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:33418 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752590Ab1IWVUc (ORCPT ); Fri, 23 Sep 2011 17:20:32 -0400 Date: Fri, 23 Sep 2011 16:20:25 -0500 From: "Serge E. Hallyn" To: Oleg Nesterov Cc: lkml , richard@nod.at, Andrew Morton , "Eric W. Biederman" , Tejun Heo , serge@hallyn.com Subject: Re: [PATCH] user namespace: make signal.c respect user namespaces Message-ID: <20110923212025.GA21330@sergelap> References: <20110919214531.GA18085@sergelap> <20110920174849.GB22317@redhat.com> <20110920185354.GA19629@sergelap> <20110921175357.GA25590@redhat.com> <20110923163113.GA3820@sergelap> <20110923173656.GA5233@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110923173656.GA5233@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Oleg Nesterov (oleg@redhat.com): > On 09/23, Serge E. Hallyn wrote: > > > > It looks like I can fix all the > > cases > > except ptrace_signal(). Although we can simply ignore this case, imho. ptrace_signal() calls send_signal() though. But oh, dear. It is sending a signal on behalf of the parent, so what I was about to send, which does the uid mapping at send_signal() using current_cred() as the id to send, is not correct. Which unfortunately means that I'll have to have the caller of send_signal (when doing SI_USER) either send the signal sender's cred, or do the mapping. Or special-case ptrace_signal(). This is not as pretty as I'd hoped. > > at send_signal() > > Yes, I was thinking about this too but didn't have the time to check > if this can really work. > > > by checking whether si_fromuser(info) > > I am not sure... sys_rt_queueinfo() is nasty. Plus we have to handle > the "fromkernel" case too. May be we can ignore this too. sys_rt_tgsigqueueinfo() still seems to go through send_signal(). thanks, -serge