From patchwork Tue Dec 19 18:28:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 181208 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp2142524dyi; Tue, 19 Dec 2023 10:32:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IFPMKQ8Nk0tW1UqOAiwGPohOTY489k9o0BK416OU7FyI67ySFQye60l3SNu5kSqBhXCOtfY X-Received: by 2002:a17:902:db01:b0:1d3:44ad:215b with SMTP id m1-20020a170902db0100b001d344ad215bmr14036275plx.92.1703010749574; Tue, 19 Dec 2023 10:32:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703010749; cv=none; d=google.com; s=arc-20160816; b=t4pqT844QUMID+s8appOd+EBheQTxndngwq+Mwq7ny7gzwz2/E8wHdeFE8v8I0jYIS t/h8CR9BxxYK7Xsb1U7bBjh3qWnStVXXT5kzAkWhNJpdouPo+8Es9LyjvmLubOgxMYdJ D9RJOrj58QXPj3vVayLKVPMNv8sebBIGUtpPo6e0hwt8Tfp5z/bKW206snI2847cxGap Z5jyupu3ciuVQ+wd30xKr1xzRB904yq1EHQocsdFdkULcv/xUowyKOACc9uuOn9i/de7 l9XDaVlSD0XJ6e2fyyuvYsUt3LNGZuSnBLs+BCGUNvDzcfASxucVZ/pwvpNwQgCLx7aS xWng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=LDG4KDv5wwX2kza3UPNrWUg1e0EysxIiTYAMq1+4kAM=; fh=xLlxUC+ywf2ABt7fnguwGXlOdh+R36y0FwjrKCS14ok=; b=Ll3htdrMpoeQKIJ0ni1nX9UCNtRgI7EDEjyZuVzdEQawwTpnOetgdP22sQ+0G+AItc 9DzRqsbj0SfcxGi7z2F/3JY2qyOwO+V5PushU2vLUyW2nIYLrA3befVD7dxwISj48+Y7 Nm3hfoQzNZ+be3ptm2/PwVSCcbB2N3dRXyr+RZFXI9cLq8FVq7O8hn/rR1AKpm9fP+pf fBy6BCB/yVoRVDuP5RohYAf7liBwQJxGBuIU3mCxq1088jQ8mTusiAoVtApXbMnhTsAh zqqHu5QFqTHRkEPYG9ELEkp2fYhl7OfW3YJbLm5cOkZJ/Bqw64ezoCHxk+SkwEZccoz/ /bhA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-5811-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5811-ouuuleilei=gmail.com@vger.kernel.org" Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id v10-20020a170902b7ca00b001d35645b662si1467918plz.435.2023.12.19.10.32.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 10:32:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-5811-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-5811-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5811-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 68C36B236D6 for ; Tue, 19 Dec 2023 18:29:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 86B46381D7; Tue, 19 Dec 2023 18:28:47 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8515637D1A for ; Tue, 19 Dec 2023 18:28:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rFepS-0003v1-II; Tue, 19 Dec 2023 19:28:30 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rFepH-0004q5-9I; Tue, 19 Dec 2023 19:28:20 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1rFepI-000ERh-2q; Tue, 19 Dec 2023 19:28:20 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Andrew Morton Cc: Stephen Boyd , Petr Mladek , Kees Cook , Douglas Anderson , Randy Dunlap , Geert Uytterhoeven , "Paul E. McKenney" , Zhaoyang Huang , Marco Elver , linux-kernel@vger.kernel.org, kernel@pengutronix.de Subject: [PATCH] lib: Add note about process exit message for DEBUG_STACK_USAGE Date: Tue, 19 Dec 2023 19:28:09 +0100 Message-ID: <20231219182808.210284-2-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.42.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=950; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=fe37acVhtHyJr122fBh9gFX3aE010DiPd5McETtsGXY=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBlgeC5ie0fCEOBIJZkzOvTO7zoN+GaSJcgV6cHQ CCpjOwQZJmJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZYHguQAKCRCPgPtYfRL+ TnJ+B/0Vknig4k6cd3X+bWQGTkAyGVmOwlQuS3Td0MRMREYoLNm23IcNByDktH87YHHKEHqaR8M gFKHYAq05N1oojCgmp8peO45HdLPFnzNpQRvyihyWwyL3B07sS/WAx0I+fkTQA48n5XhFfpop7K D6credUBv1Y8Txfs9MwbsBs+1vqqOVHN7EtqlS52sE9/0f7YyFJ3n+0cdFgS1iXVsiO6H/9K5/V 9dS5sYHWbpEBLA55OtNvrGHkb0+k86zAcYLmP4nnNQNoVWD8IONDgIa+PizwW7braSi7LJVzxhY K6fkUx13opSekTSixCQOe0sPuVHmBL5uuRhgRBRyq4rA5ItP X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785736199793135346 X-GMAIL-MSGID: 1785736199793135346 DEBUG_STACK_USAGE doesn't only have an influence on the output of sysrq-T and sysrq-P, it also enables a message at process exit. See check_stack_usage() in kernel/exit.c where this is implemented. Signed-off-by: Uwe Kleine-König --- lib/Kconfig.debug | 2 ++ 1 file changed, 2 insertions(+) base-commit: aa4db8324c4d0e67aa4670356df4e9fae14b4d37 diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 1642a6d58be4..97ce28f4d154 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -763,6 +763,8 @@ config DEBUG_STACK_USAGE help Enables the display of the minimum amount of free stack which each task has ever had available in the sysrq-T and sysrq-P debug output. + Also emits a message to dmesg when a process exits if that process + used more stack space than previously exiting processes. This option will slow down process creation somewhat.