Skip to content

Commit ac66998

Browse files
ramosian-gliderakpm00
authored andcommitted
Kconfig.debug: ensure early check for KMSAN in CONFIG_KMSAN_WARN
As pointed out by Masahiro Yamada, Kconfig picks up the first default entry which has true 'if' condition. Hence, the previously added check for KMSAN was never used, because it followed the checks for 64BIT and !64BIT. Put KMSAN check before others to ensure it is always applied. Link: https://lkml.kernel.org/r/[email protected] Link: google/kmsan#89 Link: https://lore.kernel.org/linux-mm/[email protected]/ Fixes: 921757b ("Kconfig.debug: disable CONFIG_FRAME_WARN for KMSAN by default") Signed-off-by: Alexander Potapenko <[email protected]> Cc: Kees Cook <[email protected]> Cc: Masahiro Yamada <[email protected]> Cc: Nick Desaulniers <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: Dave Hansen <[email protected]> Cc: Dmitry Vyukov <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Marco Elver <[email protected]> Cc: Peter Zijlstra (Intel) <[email protected]> Cc: Thomas Gleixner <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 11385b2 commit ac66998

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Kconfig.debug

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,12 +395,12 @@ endif # DEBUG_INFO
395395
config FRAME_WARN
396396
int "Warn for stack frames larger than"
397397
range 0 8192
398+
default 0 if KMSAN
398399
default 2048 if GCC_PLUGIN_LATENT_ENTROPY
399400
default 2048 if PARISC
400401
default 1536 if (!64BIT && XTENSA)
401402
default 1024 if !64BIT
402403
default 2048 if 64BIT
403-
default 0 if KMSAN
404404
help
405405
Tell the compiler to warn at build time for stack frames larger than this.
406406
Setting this too low will cause a lot of warnings.

0 commit comments

Comments
 (0)