From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755326AbbHLPS0 (ORCPT ); Wed, 12 Aug 2015 11:18:26 -0400 Received: from out03.mta.xmission.com ([166.70.13.233]:48487 "EHLO out03.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753514AbbHLPSY (ORCPT ); Wed, 12 Aug 2015 11:18:24 -0400 From: ebiederm@xmission.com (Eric W. Biederman) To: Oleg Nesterov 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 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> <87egj9cnk3.fsf@x220.int.ebiederm.org> <20150812144025.GA11979@redhat.com> Date: Wed, 12 Aug 2015 10:11:29 -0500 In-Reply-To: <20150812144025.GA11979@redhat.com> (Oleg Nesterov's message of "Wed, 12 Aug 2015 16:40:25 +0200") Message-ID: <87wpx0a6e6.fsf@x220.int.ebiederm.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-XM-AID: U2FsdGVkX18THtSO5NgRozE7g1ZsXwABERvwYGKvI9Y= X-SA-Exim-Connect-IP: 67.3.205.173 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 0.0 TVD_RCVD_IP Message was received from an IP address * 0.7 XMSubLong Long Subject * 0.0 T_TM2_M_HEADER_IN_MSG BODY: No description available. * 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% * [score: 0.5000] * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa06 1397; Body=1 Fuz1=1 Fuz2=1] * 0.0 T_TooManySym_01 4+ unique symbols in subject X-Spam-DCC: XMission; sa06 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: ;Oleg Nesterov X-Spam-Relay-Country: X-Spam-Timing: total 205 ms - load_scoreonly_sql: 0.04 (0.0%), signal_user_changed: 3.6 (1.7%), b_tie_ro: 2.6 (1.3%), parse: 0.72 (0.4%), extract_message_metadata: 2.5 (1.2%), get_uri_detail_list: 0.92 (0.4%), tests_pri_-1000: 4.1 (2.0%), tests_pri_-950: 1.31 (0.6%), tests_pri_-900: 1.11 (0.5%), tests_pri_-400: 19 (9.2%), check_bayes: 18 (8.6%), b_tokenize: 5 (2.6%), b_tok_get_all: 6 (2.8%), b_comp_prob: 1.73 (0.8%), b_tok_touch_all: 2.8 (1.4%), b_finish: 0.70 (0.3%), tests_pri_0: 159 (77.7%), tests_pri_500: 3.9 (1.9%), rewrite_mail: 0.00 (0.0%) Subject: Re: [PATCH] user_ns: use correct check for single-threadedness X-Spam-Flag: No X-SA-Exim-Version: 4.2.1 (built Wed, 24 Sep 2014 11:00:52 -0600) X-SA-Exim-Scanned: Yes (on in01.mta.xmission.com) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Oleg Nesterov writes: > On 08/11, Eric W. Biederman wrote: >> >> Oleg Nesterov writes: >> >> >> Then why we can't simply check thread_group_empty() == T ? Why should we >> >> worry about CLONE_SIGHAND at all? >> > >> > The same for clone() actually... I forgot why we decided to check >> > CLONE_SIGHAND, iirc I suggested CLONE_THREAD initially then we switched >> > to CLONE_SIGHAND "just in case", to make it as strict as possible. >> >> I do agree that making the test be for CLONE_THREAD is safe, makes >> sense, and is less confusing than what we have now.x > > Good, > >> > How about the patch below? >> > >> > (note that the "or parent" part of the comment is wrong in any case). >> >> It was correct. > > Yes, I know, > >> You failed to removed it when you removed CLONE_PARENT >> from that test. > > Cough... it was you ;) 1f7f4dde5c945f41a7abc2285be43d918029ecc5 > "fork: Allow CLONE_PARENT after setns(CLONE_NEWPID)". So it was. I must have tired when I read the git log last night. Eric