From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933853AbbHLR0g (ORCPT ); Wed, 12 Aug 2015 13:26:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51347 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932195AbbHLR0e (ORCPT ); Wed, 12 Aug 2015 13:26:34 -0400 Date: Wed, 12 Aug 2015 19:24:18 +0200 From: Oleg Nesterov To: "Eric W. Biederman" Cc: "Kirill A. Shutemov" , Andrew Morton , Kees Cook , David Howells , linux-kernel@vger.kernel.org, Peter Zijlstra , Ingo Molnar , "Kirill A. Shutemov" , Rik van Riel , Vladimir Davydov , Ricky Zhou , Julien Tinnes Subject: Re: [PATCH 2/2] userns,pidns: Force thread group sharing, not signal handler sharing Message-ID: <20150812172418.GA6370@redhat.com> References: <20150728171500.GA2871@www.outflux.net> <20150728143504.5aa996ba5955522a19c2d5f1@linux-foundation.org> <20150728221111.GA23391@node.dhcp.inet.fi> <20150805172356.GA20490@redhat.com> <87wpx9sjhq.fsf@x220.int.ebiederm.org> <87614tr2jd.fsf@x220.int.ebiederm.org> <20150806130629.GA4728@redhat.com> <20150806134426.GA6843@redhat.com> <871tf9cnbi.fsf_-_@x220.int.ebiederm.org> <87oaidb8n6.fsf_-_@x220.int.ebiederm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87oaidb8n6.fsf_-_@x220.int.ebiederm.org> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/11, Eric W. Biederman wrote: > > The code that places signals in signal queues computes the uids, gids, > and pids at the time the signals are enqueued. Which means that tasks > that share signal queues must be in the same pid and user namespaces. > > Sharing signal handlers is fine, but bizarre. > > So make the code in fork and userns_install clearer by only testing > for what is functionally necessary. > > Also update the comment in unshare about unsharing a user namespace to > be a little more explicit and make a little more sense. > > Signed-off-by: "Eric W. Biederman" Acked-by: Oleg Nesterov But: Eric, Andrew, this means that user_ns-use-correct-check-for-single-threadedness.patch in -mm tree should be dropped. Oleg.