Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp5319046imm; Tue, 16 Oct 2018 08:28:14 -0700 (PDT) X-Google-Smtp-Source: ACcGV63/XSzR7K/t5lD+TUED0H1WSaDHT5wPFuBCSNyflQ+s9wFZ9M3txd9AaToHmSRrI/8Ms6Kh X-Received: by 2002:a63:565d:: with SMTP id g29-v6mr20313332pgm.227.1539703694226; Tue, 16 Oct 2018 08:28:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539703694; cv=none; d=google.com; s=arc-20160816; b=neyzemSswfBpKXTRdxsVb656pwB0ISjKoSpFf9hPz0U8j3uU2jZ+/Rcee7d7DYJUMT hP71mm84ghLzutlLkcnqkmufZASWgfdMmq8fLNtCZqvhW3f6za1NvQS30Odpu3NWMxCe XchFeWE/mdqEq/vFaqnrs4Ot8l3dotVIVxNzG9therxvnGCOkrsmdxCFO5QlNAj/1ncH 5vOzKGPIK3f6yBGm2MGmjL/bcICHXoTqDAi2D8A0rpzWngkfb5TIWtdNsyBg3ZgC2wgk /N58nXYyapyK/1fVtHzy61s/6uUnsoN2GmnGXz46HMssB42nB2zSo17Pdkk78Q15UJBl eGdQ== 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; bh=NdMQfrZ7NHqXxdEcQmRKQlmT3oO0F3oxq0A4WBYMf9o=; b=z8eMG4uvedi/ufO/WZoS39LodMjsB59EB/s/NOWcknc9tGZEWPqmr2kI3eLZu7gFZt uCsxXXE/L3fw7I9Dw0n4eiX/aKp5ltfoKyqFhs5qBaULUNJyErFxsvXfSBvcZktGWxsw mJp12N29Cnyng19zQJzjW4lneIwfhdEx8NHwoJZEstfBtS1Z4CgfKYIrUXnAZI+81qhm w2SX5F17Rb0MfTN9QDh1HIx4cVHfy0ZgUMI9uF/Bnz+umVEnkjaIYi3cQVVpvT5jE5Ey Us15N9VV2gFw8C8kgUUxf2J/YEAzxzBUIVYDcnwoCf4+4cv0uTkyxsjxEnefpuPrlKfk zQ6w== 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 m12-v6si13820589pls.35.2018.10.16.08.27.57; Tue, 16 Oct 2018 08:28:14 -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 S1727187AbeJPXSI (ORCPT + 99 others); Tue, 16 Oct 2018 19:18:08 -0400 Received: from out02.mta.xmission.com ([166.70.13.232]:42693 "EHLO out02.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726978AbeJPXSI (ORCPT ); Tue, 16 Oct 2018 19:18:08 -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 1gCRFV-0005At-E3; Tue, 16 Oct 2018 09:27:09 -0600 Received: from 67-3-154-154.omah.qwest.net ([67.3.154.154] 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 1gCRFU-00088y-Gi; Tue, 16 Oct 2018 09:27:09 -0600 From: ebiederm@xmission.com (Eric W. Biederman) To: Enke Chen Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , x86@kernel.org, Peter Zijlstra , Arnd Bergmann , Khalid Aziz , Kate Stewart , Helge Deller , Greg Kroah-Hartman , Al Viro , Andrew Morton , Christian Brauner , Catalin Marinas , Will Deacon , Dave Martin , Mauro Carvalho Chehab , Michal Hocko , Rik van Riel , "Kirill A. Shutemov" , Roman Gushchin , Marcos Paulo de Souza , Oleg Nesterov , Dominik Brodowski , Cyrill Gorcunov , Yang Shi , Jann Horn , Kees Cook , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, "Victor Kamensky \(kamensky\)" , xe-linux-external@cisco.com, Stefan Strogin References: <87va62lri4.fsf@xmission.com> <6211eeaa-ce07-a909-e4c2-172618ddfb95@cisco.com> Date: Tue, 16 Oct 2018 10:26:50 -0500 In-Reply-To: <6211eeaa-ce07-a909-e4c2-172618ddfb95@cisco.com> (Enke Chen's message of "Mon, 15 Oct 2018 17:54:43 -0700") Message-ID: <87ftx5kj45.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=1gCRFU-00088y-Gi;;;mid=<87ftx5kj45.fsf@xmission.com>;;;hst=in01.mta.xmission.com;;;ip=67.3.154.154;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX18cBUikD1RZP+LoIb4Y7J0pKV0OWDGySyw= X-SA-Exim-Connect-IP: 67.3.154.154 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on sa07.xmission.com X-Spam-Level: X-Spam-Status: No, score=0.5 required=8.0 tests=ALL_TRUSTED,BAYES_50, DCC_CHECK_NEGATIVE,TVD_RCVD_IP,T_TM2_M_HEADER_IN_MSG,T_TooManySym_01, XMSubLong autolearn=disabled version=3.4.1 X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% * [score: 0.5000] * 0.7 XMSubLong Long Subject * 0.0 TVD_RCVD_IP Message was received from an IP address * 0.0 T_TM2_M_HEADER_IN_MSG BODY: No description available. * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa07 1397; Body=1 Fuz1=1 Fuz2=1] * 0.0 T_TooManySym_01 4+ unique symbols in subject X-Spam-DCC: XMission; sa07 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: ;Enke Chen X-Spam-Relay-Country: X-Spam-Timing: total 250 ms - load_scoreonly_sql: 0.03 (0.0%), signal_user_changed: 2.3 (0.9%), b_tie_ro: 1.60 (0.6%), parse: 0.69 (0.3%), extract_message_metadata: 10 (4.2%), get_uri_detail_list: 1.10 (0.4%), tests_pri_-1000: 9 (3.4%), tests_pri_-950: 1.25 (0.5%), tests_pri_-900: 1.09 (0.4%), tests_pri_-400: 27 (10.8%), check_bayes: 26 (10.2%), b_tokenize: 10 (3.9%), b_tok_get_all: 8 (3.2%), b_comp_prob: 2.3 (0.9%), b_tok_touch_all: 3.6 (1.4%), b_finish: 0.52 (0.2%), tests_pri_0: 188 (75.0%), check_dkim_signature: 0.53 (0.2%), check_dkim_adsp: 3.5 (1.4%), tests_pri_10: 2.1 (0.8%), tests_pri_500: 6 (2.5%), rewrite_mail: 0.00 (0.0%) Subject: Re: [PATCH] kernel/signal: Signal-based pre-coredump notification 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 Enke Chen writes: > Hi, Eric: > > On 10/15/18 4:28 PM, Eric W. Biederman wrote: >> With that said I think the best solution would be to figure out how to >> allow the coredump to run in parallel with the usual exit signal, and >> exit code reaping of the process> >> That would solve the problem for everyone, and would not introduce any >> new complicated APIs. > > That would certainly help. But given the huge deployment of Linux, I don't > think it would be feasible to change this fundamental behavior (signal post > coredump). Of course it will be feasible to change. Make it a sysctl and keep the current default and no one will even notice. Waiting for something that is happening asynchronously is not be difficult so having the wait optional should not be a problem. Right now the default in most distributions is to disable core dumps entirely. Which means that you are going to have to find a very specific situation in which people and applications care about core dumps happening to break an existing setup. Then all you have to do to get the non-blocking behavior is to just do: echo 1 > /proc/sys/kernel_core_async Then everything else works without modifications and everyone is happy. Maybe I am wearing rose colored glasses but that looks like all that is needed and it should be much easier to work with and maintain than having to modify every manager process to listen for unreliable signals, and then take action on those unreliable signals. Eric