Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp136072ybi; Wed, 29 May 2019 18:15:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqyGRBAM18NliVbpphH032+bDI/CpldqMgI46PO4jurIDAfYWIz0W6W1dOLPR4fekZlTkeMj X-Received: by 2002:a17:90a:480d:: with SMTP id a13mr701503pjh.40.1559178941991; Wed, 29 May 2019 18:15:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559178941; cv=none; d=google.com; s=arc-20160816; b=UCY6Iuk/r2TkyXEbxQKRNgFdulCyuJoq44HJzOiOarfa9l3MNfAGng4TtTHWghwz/Y GNNQXXfz+BBPim9Euk2F8twyYVe8NxDhGLm6dRF5QcGrh7UkWQuryqHjE8SFfcLLiKjR b1FhbO+hVo+AxfE8zvD6F6hwgMaL7SBILbAmhMD7iTUnY9THGDGFyxM65lmZiKyj7gvU y3tarBCjGWQ6koRc974LsUU3fQVY6BRXtscuH7G+nSSvlImQfJH0T9q+DBG2FsWfPymn 4o02w3KDs7Wb1Oq1hv8/MfAFTNCSvO4wrdfst2XyEsUtOB2KUG2a7PDTudpyHE5NiI8R rbHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=9sILrycH36HFJtsCXQXPeqIJYuomhu5L5m2WYdS8y3Y=; b=V4hJNtFRpo0F42ZJYKQ2hRYhGOWRBTXgafP3ITq9W1VrJWPdH6yh9Bmqy6v7XtdmFF KuJOYLpsXVhuJKYOcNgGE8SJ/GiZL6qjfGzHB34LlslTzqxs54M3Z6fND1Tl+bQBe8YR rskyr1WiAuwY9FzCVfZnqhf85OJ7uao1CyUo8mM9sSFnGWYs0Xgpxa46ksU2RoXPT29h WHV51MznOapLuY9ELCVGzoN2E2jmmFDhYmkjkVk+I+LtvgHrPD1Xkai2m0Xuv3eMZ9X8 ulJ05yD2twdiG+uPv8JUExx7UrN9Os8Fuu8KaxGXO2pq0CGEZ+Of7f+kSlw0DQZaAfVB 0sxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=LQbN+oor; 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 x13si1405329pgi.165.2019.05.29.18.15.25; Wed, 29 May 2019 18:15:41 -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; dkim=pass header.i=@kernel.org header.s=default header.b=LQbN+oor; 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 S1727268AbfE3BOU (ORCPT + 99 others); Wed, 29 May 2019 21:14:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:36364 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726884AbfE3BOT (ORCPT ); Wed, 29 May 2019 21:14:19 -0400 Received: from localhost.localdomain (c-73-223-200-170.hsd1.ca.comcast.net [73.223.200.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9718323BC5; Thu, 30 May 2019 01:14:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559178858; bh=QZzDMRd9CB/MrO8s4JZC2FCSZDZQxh3WfwYlPuei1hk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=LQbN+oorUjzGozrW2QRq9OBw4G7l+E8BCS6r3zIEVsHU4x8bbpDfIwKdncDPLdlhY XQpTlMmjiQ9qGwjPg67dRm+j6MHI5DfdpEpjLqUH0Ta1ybMVXib9vGmuq2l9VD2wlb R1paZ//0Kw1NpZUMqTaRuEI8jj8hzQPb3VC48L5A= Date: Wed, 29 May 2019 18:14:18 -0700 From: Andrew Morton To: John Ogness Cc: Jan Luebbe , Alexey Dobriyan , Andy Lutomirski , kernel@pengutronix.de, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCHv3] fs/proc: allow reporting eip/esp for all coredumping threads Message-Id: <20190529181418.7d47766ab12b43030a357721@linux-foundation.org> In-Reply-To: <87pno0u59o.fsf_-_@linutronix.de> References: <20190522161614.628-1-jlu@pengutronix.de> <875zpzif8v.fsf@linutronix.de> <20190525143220.e771b7915d17f22dad1438fa@linux-foundation.org> <87d0k5f1g7.fsf@linutronix.de> <87y32p7i7a.fsf@linutronix.de> <87pno0u59o.fsf_-_@linutronix.de> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org (ooh, Greg, let me do it!) On Thu, 30 May 2019 02:58:59 +0200 John Ogness wrote: > Commit 0a1eb2d474ed ("fs/proc: Stop reporting eip and esp in > /proc/PID/stat") stopped reporting eip/esp and commit fd7d56270b52 > ("fs/proc: Report eip/esp in /prod/PID/stat for coredumping") > reintroduced the feature to fix a regression with userspace core dump > handlers (such as minicoredumper). > > Because PF_DUMPCORE is only set for the primary thread, this didn't fix > the original problem for secondary threads. Allow reporting the eip/esp > for all threads by checking for PF_EXITING as well. This is set for all > the other threads when they are killed. coredump_wait() waits for all > the tasks to become inactive before proceeding to invoke a core dumper. > > Fixes: fd7d56270b526ca3 ("fs/proc: Report eip/esp in /prod/PID/stat for coredumping") > Reported-by: Jan Luebbe > Signed-off-by: John Ogness > --- > This is a rework of Jan's v1 patch that allows accessing eip/esp of all > the threads without risk of the task still executing on a CPU. > > The code chagnes are the same as v2. With v3 I included a "Fixes" tag, > fixed a typo in the commit message, and Cc'd stable. No, the way to Cc stable is to add Cc: to the changelog metadata. I've made these changes to my copy of this patch, thanks.