]> git.itanic.dy.fi Git - linux-stable/commitdiff
lib: add note about process exit message for DEBUG_STACK_USAGE
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Tue, 19 Dec 2023 18:28:09 +0000 (19:28 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 29 Dec 2023 20:22:26 +0000 (12:22 -0800)
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.

Link: https://lkml.kernel.org/r/20231219182808.210284-2-u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Douglas Anderson <dianders@chromium.org>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Kees Cook <keescook@chromium.org>
Cc: Marco Elver <elver@google.com>
Cc: "Paul E. McKenney" <paulmck@kernel.org>
Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
Cc: Petr Mladek <pmladek@suse.com>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Stephen Boyd <sboyd@kernel.org>
Cc: Zhaoyang Huang <zhaoyang.huang@unisoc.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
lib/Kconfig.debug

index e77873cf85c78d0b19df8ced392a57c912314ca4..6cc3d29338c52315bf25cde31a9abd5450688256 100644 (file)
@@ -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.