configs/debug: Refresh debug config dependencies
PATCH 1/1 configs/debug: Refresh debug config dependencies
Many of the CONFIG_DEBUG* options need CONFIG_DEBUG_KERNEL=y to be set, so enable it explicitly. Similarly for CONFIG_NET* options, enable CONFIG_NET=y. Finally, remove CONFIG_DEBUG_VM_VMACACHE, since it was removed in commit 7964cf8caa4d ("mm: remove vmacache").
---
Cc: "Matthieu Baerts (NGI0)" <[email protected]>
Cc: Jakub Kicinski <[email protected]>
Cc: Masahiro Yamada <[email protected]>
Cc: Simon Horman <[email protected]>
Cc: Anshuman Khandual <[email protected]>
Cc: Stanislav Fomichev <[email protected]>
Cc: Lukas Bulwahn <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: Nicolas Schier <[email protected]>
Cc: Michael Ellerman <[email protected]>
--- kernel/configs/debug.config | 3 ++- kernel/configs/x86_debug.config | 1 - 2 files changed, 2 insertions(+), 2 deletions(-)
kernel/configs/debug.config +2 -1
@@ -26,6 +26,7 @@ CONFIG_SECTION_MISMATCH_WARN_ONLY=y # # Generic Kernel Debugging Instruments # +CONFIG_DEBUG_KERNEL=y # CONFIG_UBSAN_ALIGNMENT is not set # CONFIG_UBSAN_DIV_ZERO is not set # CONFIG_UBSAN_TRAP is not set
@@ -42,6 +43,7 @@ CONFIG_UBSAN_UNREACHABLE=y # # Networking Debugging # +CONFIG_NET=y CONFIG_NET_DEV_REFCNT_TRACKER=y CONFIG_NET_NS_REFCNT_TRACKER=y CONFIG_DEBUG_NET=y
@@ -72,7 +74,6 @@ CONFIG_DEBUG_VIRTUAL=y CONFIG_DEBUG_VM=y CONFIG_DEBUG_VM_PGFLAGS=y CONFIG_DEBUG_VM_RB=y -CONFIG_DEBUG_VM_VMACACHE=y CONFIG_KASAN=y CONFIG_KASAN_GENERIC=y CONFIG_KASAN_INLINE=y
kernel/configs/x86_debug.config +0 -1
@@ -2,7 +2,6 @@ CONFIG_X86_DEBUG_FPU=y CONFIG_LOCK_STAT=y CONFIG_DEBUG_VM=y -CONFIG_DEBUG_VM_VMACACHE=y CONFIG_DEBUG_VM_RB=y CONFIG_DEBUG_SLAB=y CONFIG_DEBUG_KMEMLEAK=y
Signature · 1 line
2.34.1
Hi Kees,
Thank you for sharing this patch!
Quoted 1 line · Kees Cook
Many of the CONFIG_DEBUG* options need
CONFIG_DEBUG_KERNEL=yto be set,
Good point! I guess it has not been seen before because it is usually enabled in the different _defconfig files. So probably no need to backport this I guess, right?
Quoted 2 lines
so enable it explicitly. Similarly for CONFIG_NET* options, enable
CONFIG_NET=y.
I'm not sure about that one: if I'm not mistaken, the net debugging options have been added for CIs using network features, to find bugs in this area. In other words, I don't think it is needed to add a dependence to CONFIG_NET. If it is enabled, then some extra debugging options should be enabled to get more debug. If not, no need to force having CONFIG_NET, no?
(On the other hand, CONFIG_NET is very likely needed for a CI, and it is typically enabled in the different _defconfig and kvm_guest.config. I guess adding this dependence will very likely not annoy anybody, so up to you :) )
Quoted 2 lines
Finally, remove
CONFIG_DEBUG_VM_VMACACHE, since it was removed in commit7964cf8caa4d("mm: remove vmacache").
Good catch!
Cheers,
Matt
Signature · 1 line
Sponsored by the NGI0 Core fund.
Quoted 22 lines · Matthieu Baerts
Hi Kees,
Thank you for sharing this patch!
Quoted 1 line · Kees Cook
Many of the CONFIG_DEBUG* options need
CONFIG_DEBUG_KERNEL=yto be set,Good point! I guess it has not been seen before because it is usually enabled in the different
_defconfigfiles. So probably no need to backport this I guess, right?Quoted 2 lines
so enable it explicitly. Similarly for CONFIG_NET* options, enable
CONFIG_NET=y.I'm not sure about that one: if I'm not mistaken, the net debugging options have been added for CIs using network features, to find bugs in this area. In other words, I don't think it is needed to add a dependence to
CONFIG_NET. If it is enabled, then some extra debugging options should be enabled to get more debug. If not, no need to force havingCONFIG_NET, no?
Quoted 4 lines
(On the other hand,
CONFIG_NETis very likely needed for a CI, and it is typically enabled in the different_defconfigand kvm_guest.config. I guess adding this dependence will very likely not annoy anybody, so up to you :) )
Thanks for making me double-check this... it seems what was missing was defconfig. :P
I noticed all of these from trying to run kunit like this:
$ ./tools/testing/kunit/kunit.py run --arch=x86_64 \ --kunitconfig kernel/configs/debug.config \ fortify
But it seems I need something closer to:
$ ./tools/testing/kunit/kunit.py run --arch=x86_64 \ --kunitconfig arch/x86/configs/x86_64_defconfig \ --kunitconfig kernel/configs/debug.config \ fortify
Quoted 4 lines
Quoted 2 lines
Finally, remove
CONFIG_DEBUG_VM_VMACACHE, since it was removed in commit7964cf8caa4d("mm: remove vmacache").Good catch!
Thanks! I'll nail this down a bit more and send a v2.
Signature · 1 line
Kees Cook