Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1668007imm; Wed, 8 Aug 2018 23:21:18 -0700 (PDT) X-Google-Smtp-Source: AA+uWPzQLcAav/8GZhEor6KgyaMSK8ojZ9vKGYtepUiIkskUw5tRAHuSnGReCq2tlTSPOcfxfQot X-Received: by 2002:a62:2e02:: with SMTP id u2-v6mr928540pfu.134.1533795678738; Wed, 08 Aug 2018 23:21:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533795678; cv=none; d=google.com; s=arc-20160816; b=q2Clwd5CBEALe+i2U1NpVFRtyosv/aLKJQgV5EMoNWbXX02k3/2fHgHR6vxnmfqjnj Kh1vzWRb6OF5SUHbC7FOqsXbSpTOvT0guDx4B1G1ChDodmTwY6taG0ogAWdyuMHUjecD 4QBcAZHdVCPogmW5V5SrTj1WAbgYw+bFanG5HGhRs7fvGjRxzdgxm0SnpO38LHYJA+/U n+pid0cu6anzI3LryO5VAX+cKRMiHh0sgj/7WRYdYmuU7YRowfiq0/4h4BH+Z2E21Etj 8JiTyH4Dbc8KQPXWoqZnK/BEzWDKI8iep0HpkbrzHNRNj2x3XoQC3RljMMm1JHJkn16D b7IQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:mime-version:user-agent :message-id:in-reply-to:date:references:cc:to:from :arc-authentication-results; bh=IQkCWRRohKzTsLbCLQXQuLyG572ppVhnE/hRyP0Y+mg=; b=v15lZ6/Os1ThZEs2MrOQQ68svdg+Hi8PI7v8C75YG+FXDHoUuWtssEKo0rjV5yHbj/ kX5Ea5mB+EByFEyqm7X34IwQjmqDd66apkYjne7H6TGHwAFQIQLdXUZcbLORgHbT4npH +c8EPmJMzf5K644+hDHoT6Cs0JyiJn2IyoxxlNMYOySjLv4MOGTKqkOZP3G4xi6juICn JhEs7k3eEz5CHwVeSA63OmJjcNCYigdxmFx7zF/O02L0tZ9F82zi/r2HaP9iovabGfQV 4cP8DJYGvyG9OqcOIZaIbbkbXYCY72Y9R4ZxtPm6ueRTmwGZaRURNqrUK0h9F3h7yeDF KMTQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z89-v6si6472069pfd.357.2018.08.08.23.21.03; Wed, 08 Aug 2018 23:21:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727768AbeHIIm5 (ORCPT + 99 others); Thu, 9 Aug 2018 04:42:57 -0400 Received: from out02.mta.xmission.com ([166.70.13.232]:40495 "EHLO out02.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727230AbeHIIm5 (ORCPT ); Thu, 9 Aug 2018 04:42:57 -0400 Received: from in01.mta.xmission.com ([166.70.13.51]) by out02.mta.xmission.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.87) (envelope-from ) id 1fneIO-0005hM-39; Thu, 09 Aug 2018 00:19:40 -0600 Received: from [97.119.167.31] (helo=x220.xmission.com) by in01.mta.xmission.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.87) (envelope-from ) id 1fneIN-0008UK-6t; Thu, 09 Aug 2018 00:19:39 -0600 From: ebiederm@xmission.com (Eric W. Biederman) To: Oleg Nesterov Cc: Linus Torvalds , Andrew Morton , Linux Kernel Mailing List , Wen Yang , majiang References: <874lgo5xdg.fsf@xmission.com> <87fu084cxj.fsf@xmission.com> <87a7qg4bb3.fsf_-_@xmission.com> <87pnzc2upf.fsf@xmission.com> <87k1pk2cj9.fsf_-_@xmission.com> <20180726134143.GB32718@redhat.com> <87pnza6ou2.fsf@xmission.com> <20180726155546.GA467@redhat.com> Date: Thu, 09 Aug 2018 01:19:26 -0500 In-Reply-To: <20180726155546.GA467@redhat.com> (Oleg Nesterov's message of "Thu, 26 Jul 2018 17:55:47 +0200") Message-ID: <87600k2hap.fsf@xmission.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-XM-SPF: eid=1fneIN-0008UK-6t;;;mid=<87600k2hap.fsf@xmission.com>;;;hst=in01.mta.xmission.com;;;ip=97.119.167.31;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX1/h1tWUbOE6SVji+GXUt0yL/3ui2649jWI= X-SA-Exim-Connect-IP: 97.119.167.31 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on sa03.xmission.com X-Spam-Level: X-Spam-Status: No, score=0.5 required=8.0 tests=ALL_TRUSTED,BAYES_50, DCC_CHECK_NEGATIVE,T_TM2_M_HEADER_IN_MSG,T_TooManySym_01,T_TooManySym_02, XMSubLong autolearn=disabled version=3.4.0 X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 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.4922] * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa03 1397; Body=1 Fuz1=1 Fuz2=1] * 0.0 T_TooManySym_02 5+ unique symbols in subject * 0.0 T_TooManySym_01 4+ unique symbols in subject X-Spam-DCC: XMission; sa03 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: ;Oleg Nesterov X-Spam-Relay-Country: X-Spam-Timing: total 490 ms - load_scoreonly_sql: 0.06 (0.0%), signal_user_changed: 3.6 (0.7%), b_tie_ro: 2.3 (0.5%), parse: 1.23 (0.3%), extract_message_metadata: 5 (1.1%), get_uri_detail_list: 2.5 (0.5%), tests_pri_-1000: 6 (1.3%), tests_pri_-950: 2.2 (0.4%), tests_pri_-900: 1.82 (0.4%), tests_pri_-400: 30 (6.2%), check_bayes: 28 (5.7%), b_tokenize: 10 (2.1%), b_tok_get_all: 7 (1.5%), b_comp_prob: 4.5 (0.9%), b_tok_touch_all: 2.3 (0.5%), b_finish: 0.83 (0.2%), tests_pri_0: 411 (83.8%), check_dkim_signature: 0.95 (0.2%), check_dkim_adsp: 5 (1.0%), tests_pri_500: 8 (1.7%), rewrite_mail: 0.00 (0.0%) Subject: Re: [PATCH v3 20/20] signal: Don't restart fork when signals come in. X-Spam-Flag: No X-SA-Exim-Version: 4.2.1 (built Thu, 05 May 2016 13:38:54 -0600) X-SA-Exim-Scanned: Yes (on in01.mta.xmission.com) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Oleg Nesterov writes: > On 07/26, Eric W. Biederman wrote: >> >> Are the earlier patches looking ok to you? > > I obviously like 1-15. > > "[PATCH 16/20] fork: Move and describe why the code examines PIDNS_ADDING" > is "interesting". I mean it is fine, but at the end of this series it doesn't > matter what we check first, PIDNS_ADDING or fatal_signal_pending() - restart > is not possible in both cases. > > > As for 17-20... Yes I am biased. But I still think the simple approach I tried > to propose from the very beginning is better. At least simpler, in that you do > not need to worry about all these special cases/reasons for signal_pending(). I think worrying about them all now results in a future where we don't have to worry about reasons why we can't let fork continue. Giving a better progress guarantee. Which ultimately should be more maintainable going forward. > And you can not imagine how much I hate "[PATCH 19/20] fork: Have new threads > join on-going signal group stops" ;) Because I spent HOURS looking at this trivial > patch and I am still not sure... > > To clarify, the CLONE_THREAD with JOBCTL_STOP_PENDING case is simple, I am mostly > worried about JOBCTL_TRAP_STOP/etc with or without CLONE_THREAD, this adds some > subtle changes but unfortunately I failed to find something wrong so I > can't argue I can understand taking a hard look at JOBCTL_TRAP_STOP especially as it gets mixed in with the multi-task (whole process) stop handling when at least one of the tasks of a process are being ptraced. To make certain I understood your concern I took a second look at it myself. The ptrace actions are defined to only affect a single task, and except for multi-task stop handling all of the jobctl bits are used for ptrace actions. So I don't see how there is anything we could possibly miss in the jobctl bits. Eric