Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp10975963imu; Thu, 6 Dec 2018 09:31:55 -0800 (PST) X-Google-Smtp-Source: AFSGD/VP6mkgQiJPvRnBP7apVOa9kSw/t8NKwFsjKxj3q2x/30mQGcMqApu1EaOh9AvlJ2B+t80g X-Received: by 2002:a17:902:8687:: with SMTP id g7mr28698622plo.96.1544117514994; Thu, 06 Dec 2018 09:31:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544117514; cv=none; d=google.com; s=arc-20160816; b=JStc+JYo5SDI90LqsDHtkBEVyO3jcEr87+87wclWdNlLEnyO/m6MGgNle1Rcffj3Tu FUXyf4gykOqKj8QsLEKoKcrgb0IR6klJeUYEPxk52WQAadYmtUNAgV9a8IEjss7SoUsi DM/tElatCUNTU9yVZTRq13aDKDgzPAAM3xA+AIYrTzBlHiH46JxSmDN1BzjYCBTr3zD/ tOjxndoVoSA6u8ew7F06ZdK9lsLmjYEkVTUCfx636irmT0GJOWSXDBB7OavYVabAd+c5 Ak12lQqXGwyTDw6VeSRhjjq4/8qs0THgRiD/eOBbTZWXOaDzQl64wT/4PrMMwBstzwwi R67w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=xZnvWQ01LWWC9lzVhTAgGxOOEx3WnuhKhS/aS+EFu6A=; b=rgxE5lN1W87ag9q2vvAc6FnwQ69Mcc1KnGnlJXafC5Vg0yskVoUiipdduXnTXjuyOx f2e30/itE/BYZNfqhCzvo67G8+nDMohkoOU0hxh4vudaGAX21Pat7KfxSH8taneosakD iL+8TejYtTavgvM/MlaaLrDbJ/7pcdYcTHIk2IaWbMxCSD8gNm1Gn8+IBj/ANZ7DCj5h nhIdsAKUs1Qk4GXjM2wnV8Eliqn2BSQ9tLPnGaB7gc3p58byqimdQZKnkWE5ftf+OnEz P1gxNGNY13yNNRyOLB3+pdZunh9NjZP280lLMolEA7T64rcuyTFVvVgueJTZ7fLlBlNM l8eQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l1si687111pld.324.2018.12.06.09.31.27; Thu, 06 Dec 2018 09:31:54 -0800 (PST) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726134AbeLFR3l (ORCPT + 99 others); Thu, 6 Dec 2018 12:29:41 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37302 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726109AbeLFR3l (ORCPT ); Thu, 6 Dec 2018 12:29:41 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 31586307CDC1; Thu, 6 Dec 2018 17:29:40 +0000 (UTC) Received: from dhcp-27-174.brq.redhat.com (unknown [10.43.17.131]) by smtp.corp.redhat.com (Postfix) with SMTP id EBA2360E3F; Thu, 6 Dec 2018 17:29:32 +0000 (UTC) Received: by dhcp-27-174.brq.redhat.com (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Thu, 6 Dec 2018 18:29:39 +0100 (CET) Date: Thu, 6 Dec 2018 18:29:32 +0100 From: Oleg Nesterov To: Andrew Morton Cc: Enke Chen , Dave Martin , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Peter Zijlstra , Arnd Bergmann , "Eric W. Biederman" , Khalid Aziz , Kate Stewart , Helge Deller , Greg Kroah-Hartman , Al Viro , Christian Brauner , Catalin Marinas , Will Deacon , Mauro Carvalho Chehab , Michal Hocko , Rik van Riel , "Kirill A. Shutemov" , Roman Gushchin , Marcos Paulo de Souza , 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 Subject: Re: [PATCH v5 1/2] kernel/signal: Signal-based pre-coredump notification Message-ID: <20181206172931.GA12967@redhat.com> References: <7741efa7-a3f8-62a1-ba52-613883164643@cisco.com> <84460a77-a111-404e-4bad-88104a6e246e@cisco.com> <20181026082812.GA10581@redhat.com> <21f678a8-4001-df36-c26e-e96cf203b1b1@cisco.com> <20181029111804.GA24820@redhat.com> <0c197608-3b7e-ffd1-8943-801a60beb917@cisco.com> <80e96710-f424-9b39-72ee-9cc7cbe7a5f7@cisco.com> <20181128151911.GN3505@e103592.cambridge.arm.com> <20181204143759.fe24ee036a33000193339561@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181204143759.fe24ee036a33000193339561@linux-foundation.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Thu, 06 Dec 2018 17:29:40 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/04, Andrew Morton wrote: > > I'm not sure what to make of this patchset, really. Oleg sounds > unhappy and that's always a bad sign. And signals are rather ugly > things. Oleg, can you please expand on your concerns? I don't really know what can I say... Yes the signals are ugly things, this is one reason. Worse, you need to use real-time predump_signal if parent has 2 or more children. And when it comes to child-parent notifications we already have do_wait(). So probably it would be better to implement WCOREDUMP so that the parent could rely on SIGCHLD + waitpid(WCOREDUMP). Not that I think this is a good idea and this is much more complex especially if we want to report this event to ptracer too, while this patch is very simple. In fact I think that we need something more generic, but I can't suggest any good idea :/ May be we could simply add a tracepoint or perf_event_coredump, I dunno. Sure, the usage of perf events is not that simple... Oleg.