Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4549208ybi; Mon, 3 Jun 2019 12:56:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqwLiB9NI3wBmSRWKeR4hykqOhdCQigczk9XPiAZeViOHz0Fttca8HDm/xpwl5ULlmHNUGAD X-Received: by 2002:aa7:9a01:: with SMTP id w1mr13299102pfj.262.1559591764701; Mon, 03 Jun 2019 12:56:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559591764; cv=none; d=google.com; s=arc-20160816; b=c6AsOf3uGkJBRT6HUekafuFEDajD4sF9+amERKehS1rI634TfkGn6G5ROQ/Qsyjusu Mn2vG45T4OmEbd5y6sD6KdQcuLrtnkANHnRLmyZqxaftvsM1HMUoTOZvT1V10/CpSj6Y gpGy2tYKAk7y+n17VkfCH6wve+yvXHJXCoRM0vXxmfWYoKkQFFUiqL1Qg/Wyg2sJ7fSx V2tPhPN2iMl8ds9eW4z/RAxyf5wv/m1yzL0yg0JMS4Z9Kz6Rl9+FBhAPd4qLG7cmD7ZN UIKZfkN9iQgl69WQWlCZ/DDEzFg82HXtDra3i07a20yIUPqD7rFiS4UtBLaVulp6LXBa 47EQ== 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 :organization:references:in-reply-to:date:cc:to:reply-to:from :subject:message-id; bh=IDSyBXQvPC4MwQlZtlm+C2yCjMIkSOHfN2aqXci+2ZM=; b=KMmfvLKDE4DomaB4hg4TMrWNIp3WPBjgMo/Sec8S+VKj2y3otsVU9BVpnFKQ+Wu/79 +3ozdWAsqMgJXxcfTXbP8zy0/xikfRIrJ56hYX4QnUd28j8MlQvWhhBW6ur4Sv5VTv6c 5CGX7vaAhip1wrKUZHqganrhcR6y+aJxPk/5+2Jg+7/nmlVW5D7EuUlHbmJbr1pA1UhU WvhEazvcgB4lSaYdqXHTwAvS5WvP9M561qE15BZ20MwJR8qgJDZWRz02es67Bp97t+pl 85ehUFx/8n1y/2dMCqQAgGFdgnULZb1hrhzYfAwWWIs+rNM0sOWe2yH79D4/4z1EK0N+ 8FoA== 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 n11si22076722plg.248.2019.06.03.12.55.48; Mon, 03 Jun 2019 12:56:04 -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 S1726637AbfFCTyN (ORCPT + 99 others); Mon, 3 Jun 2019 15:54:13 -0400 Received: from metis.ext.pengutronix.de ([85.220.165.71]:43355 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725876AbfFCTyN (ORCPT ); Mon, 3 Jun 2019 15:54:13 -0400 Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hXt22-0003ST-Nc; Mon, 03 Jun 2019 21:54:10 +0200 Received: from localhost ([127.0.0.1]) by ptx.hi.pengutronix.de with esmtp (Exim 4.89) (envelope-from ) id 1hXt22-0000mT-2E; Mon, 03 Jun 2019 21:54:10 +0200 Message-ID: <1559591648.29720.5.camel@pengutronix.de> Subject: Re: [PATCHv3] fs/proc: allow reporting eip/esp for all coredumping threads From: Jan =?ISO-8859-1?Q?L=FCbbe?= Reply-To: jlu@pengutronix.de To: John Ogness Cc: Andrew Morton , Alexey Dobriyan , Andy Lutomirski , kernel@pengutronix.de, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, stable@vger.kernel.org Date: Mon, 03 Jun 2019 21:54:08 +0200 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> Organization: Pengutronix Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.6-1+deb9u1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: jlu@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2019-05-30 at 02:58 +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 Tested-by: Jan Luebbe I've tested your patch and can confirm that eip/esp is accessible for all threads again. Thanks, Jan -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |