Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3023283ybi; Sun, 26 May 2019 12:44:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqyMsgKJR3o5XNNF24Zw4ZZbw1ejdFzMa9ylkQRQ6gJT3JtfL9z0jqgrfChqOW/pDiK/AsaC X-Received: by 2002:a17:90a:37ef:: with SMTP id v102mr26799610pjb.12.1558899879328; Sun, 26 May 2019 12:44:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558899879; cv=none; d=google.com; s=arc-20160816; b=FupWCnoYofovkQ8tQXiQyBf5p0ror8UpP+0oZwt6uwxvbZBfEdbshJ2CQYE9W8ZotP dSoS+vFB//T1kfOYftyMafGb0K+XI095YeYRhihsPBeGTy1rNsE35gANeVx6DO6PFvup aflcprKcZgX5GmZ5TJic7ZccZsiaqmyv7OX5Oy5mas+4KlEj6PWhMFSSlpRfMiFKIn9W 7P1wBB2GRF9UOqJ1Eyf79l9ZBwExnYqByJ58tT9viK5jTNHyhVNqo2sqzGxkO1OppwCm ibpjnaPwpJGhIodfK0Ib8ZY0N93w5p4bgwDa4kOW6tycYudM4vxJfWJ6oHlZK+m6fc+5 YyhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from; bh=ytQJQiBOkiUgF6nSl3mHOSW1S08qacgGrBlIVbTRgLE=; b=Okvvju/EKQkESLzSrG0FoncZBRzlnG4snlDvuD5CJfgjxfIIsiP5HqOzt+diEmpQzV KMJXHuKEJDSodqHF2L8wkybONpZU/ZC4ppTxVzXtC3f36AbirjWckyO45mWYm+jzb80U TG63fc9vGj98kQVGRs/O6wNcbvhKI9BdFXcgt+RcT/Qtw5fvknRrUbOTb/7g5u3i9w3G fGsnle4y88thUhQpIYqjw8j+s33U7hR9YF7+b5shGywVSMUEgkfP3YgAKnaC7j8obJ8/ e0BOIpC/oNpwnR77/s/7DnsjyFWCh8Ln1CfUQNQNgnnZ7Fsyyq74GoKZQLVFcchDODHP PUqA== 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 d65si14351013pgc.330.2019.05.26.12.44.23; Sun, 26 May 2019 12:44:39 -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 S1727184AbfEZTld (ORCPT + 99 others); Sun, 26 May 2019 15:41:33 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:46472 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726996AbfEZTlc (ORCPT ); Sun, 26 May 2019 15:41:32 -0400 Received: from localhost ([127.0.0.1] helo=vostro.local) by Galois.linutronix.de with esmtp (Exim 4.80) (envelope-from ) id 1hUz1O-00045D-N0; Sun, 26 May 2019 21:41:30 +0200 From: John Ogness To: Andrew Morton Cc: Jan Luebbe , Alexey Dobriyan , Andy Lutomirski , kernel@pengutronix.de, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH] proc: report eip and esp for all threads when coredumping References: <20190522161614.628-1-jlu@pengutronix.de> <875zpzif8v.fsf@linutronix.de> <20190525143220.e771b7915d17f22dad1438fa@linux-foundation.org> Date: Sun, 26 May 2019 21:41:28 +0200 In-Reply-To: <20190525143220.e771b7915d17f22dad1438fa@linux-foundation.org> (Andrew Morton's message of "Sat, 25 May 2019 14:32:20 -0700") Message-ID: <87d0k5f1g7.fsf@linutronix.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andrew, On 2019-05-25, Andrew Morton wrote: > Please send along a signed-off-by: for this? From my response: On 2019-05-25, John Ogness wrote: > AFAICT core_state does not need to be set before the other lines. But > there may be some side effects that I overlooked! The changes I showed were more of a suggestion for Jan than an actual patch. For a signed-off-by I'll need to do some deeper looking to make sure what I suggested was safe. Also, we probably need a barrier to make sure the task flag is cleared before setting core_state. Or instead, we probably should set core_state after releasing the siglock, setting it where the PF_DUMPCORE flag is set. It seems to me that checking for a non-NULL core_state and checking for the PF_DUMPCORE flag are both used throughout the kernel to identify core dumps in action. So I think it makes sense to set them "at the same time". (Or perhaps eliminate PF_DUMPCORE altogether and just use a non-NULL core_state to identify core dumping.) I will take a closer look at this. John Ogness