From 0df52582e0154b2e05e9a5924cc60ac5f6f842b2 Mon Sep 17 00:00:00 2001 From: Mark Rutland Date: Mon, 4 Dec 2023 17:18:07 +0000 Subject: kcov: remove stale RANDOMIZE_BASE text The Kconfig help text for CONFIG_KCOV describes that recorded PC values will not be stable across machines or reboots when RANDOMIZE_BASE is selected. This was the case when KCOV was introduced in commit: 5c9a8750a6409c63 ("kernel: add kcov code coverage") However, this changed in commit: 4983f0ab7ffaad1e ("kcov: make kcov work properly with KASLR enabled") Since that commit KCOV always subtracts the KASLR offset from PC values, which ensures that these are stable across machines and across reboots even when RANDOMIZE_BASE is selected. Unfortunately, that commit failed to update the Kconfig help text, which still suggests disabling RANDOMIZE_BASE even though this is no longer necessary. Remove the stale Kconfig text. Link: https://lkml.kernel.org/r/20231204171807.3313022-1-mark.rutland@arm.com Reported-by: Borislav Petkov Signed-off-by: Mark Rutland Reviewed-by: Dmitry Vyukov Cc: Alexander Popov Cc: Andrey Konovalov Signed-off-by: Andrew Morton --- lib/Kconfig.debug | 4 ---- 1 file changed, 4 deletions(-) (limited to 'lib/Kconfig.debug') diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index cc7d53d9dc01..e77873cf85c7 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -2103,10 +2103,6 @@ config KCOV KCOV exposes kernel code coverage information in a form suitable for coverage-guided fuzzing (randomized testing). - If RANDOMIZE_BASE is enabled, PC values will not be stable across - different machines and across reboots. If you need stable PC values, - disable RANDOMIZE_BASE. - For more details, see Documentation/dev-tools/kcov.rst. config KCOV_ENABLE_COMPARISONS -- cgit From bc09d1dea84efaff022c09b9c5175b2a75553006 Mon Sep 17 00:00:00 2001 From: Uwe Kleine-König Date: Tue, 19 Dec 2023 19:28:09 +0100 Subject: lib: add note about process exit message for DEBUG_STACK_USAGE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Cc: Douglas Anderson Cc: Geert Uytterhoeven Cc: Kees Cook Cc: Marco Elver Cc: "Paul E. McKenney" Cc: Pengutronix Kernel Team Cc: Petr Mladek Cc: Randy Dunlap Cc: Stephen Boyd Cc: Zhaoyang Huang Signed-off-by: Andrew Morton --- lib/Kconfig.debug | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/Kconfig.debug') diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index e77873cf85c7..6cc3d29338c5 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. -- cgit