xref: /linux/kernel/configs/debug.config (revision 78c3925c048c752334873f56c3a3d1c9d53e0416)
1# Help: Debugging for CI systems and finding regressions
2#
3# The config is based on running daily CI for enterprise Linux distros to
4# seek regressions on linux-next builds on different bare-metal and virtual
5# platforms. It can be used for example,
6#
7# $ make ARCH=arm64 defconfig debug.config
8#
9# Keep alphabetically sorted inside each section.
10#
11# printk and dmesg options
12#
13CONFIG_DEBUG_BUGVERBOSE=y
14CONFIG_DYNAMIC_DEBUG=y
15CONFIG_PRINTK_CALLER=y
16CONFIG_PRINTK_TIME=y
17CONFIG_SYMBOLIC_ERRNAME=y
18#
19# Compile-time checks and compiler options
20#
21CONFIG_DEBUG_INFO=y
22CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y
23CONFIG_DEBUG_SECTION_MISMATCH=y
24CONFIG_FRAME_WARN=2048
25CONFIG_SECTION_MISMATCH_WARN_ONLY=y
26#
27# Generic Kernel Debugging Instruments
28#
29# CONFIG_UBSAN_ALIGNMENT is not set
30# CONFIG_UBSAN_DIV_ZERO is not set
31# CONFIG_UBSAN_TRAP is not set
32# CONFIG_WARN_ALL_UNSEEDED_RANDOM is not set
33CONFIG_DEBUG_FS=y
34CONFIG_DEBUG_FS_ALLOW_ALL=y
35CONFIG_DEBUG_IRQFLAGS=y
36CONFIG_UBSAN=y
37CONFIG_UBSAN_BOOL=y
38CONFIG_UBSAN_BOUNDS=y
39CONFIG_UBSAN_ENUM=y
40CONFIG_UBSAN_SHIFT=y
41CONFIG_UBSAN_UNREACHABLE=y
42#
43# Networking Debugging
44#
45CONFIG_NET_DEV_REFCNT_TRACKER=y
46CONFIG_NET_NS_REFCNT_TRACKER=y
47CONFIG_DEBUG_NET=y
48#
49# Memory Debugging
50#
51# CONFIG_DEBUG_PAGEALLOC is not set
52# CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF is not set
53# CONFIG_DEBUG_RODATA_TEST is not set
54# CONFIG_DEBUG_WX is not set
55# CONFIG_KFENCE is not set
56# CONFIG_PAGE_POISONING is not set
57# CONFIG_SLUB_STATS is not set
58CONFIG_PAGE_EXTENSION=y
59CONFIG_PAGE_OWNER=y
60CONFIG_DEBUG_KMEMLEAK=y
61CONFIG_DEBUG_KMEMLEAK_AUTO_SCAN=y
62CONFIG_DEBUG_OBJECTS=y
63CONFIG_DEBUG_OBJECTS_ENABLE_DEFAULT=1
64CONFIG_DEBUG_OBJECTS_FREE=y
65CONFIG_DEBUG_OBJECTS_PERCPU_COUNTER=y
66CONFIG_DEBUG_OBJECTS_RCU_HEAD=y
67CONFIG_DEBUG_OBJECTS_TIMERS=y
68CONFIG_DEBUG_OBJECTS_WORK=y
69CONFIG_DEBUG_PER_CPU_MAPS=y
70CONFIG_DEBUG_STACK_USAGE=y
71CONFIG_DEBUG_VIRTUAL=y
72CONFIG_DEBUG_VM=y
73CONFIG_DEBUG_VM_PGFLAGS=y
74CONFIG_DEBUG_VM_RB=y
75CONFIG_DEBUG_VM_VMACACHE=y
76CONFIG_GENERIC_PTDUMP=y
77CONFIG_KASAN=y
78CONFIG_KASAN_GENERIC=y
79CONFIG_KASAN_INLINE=y
80CONFIG_KASAN_VMALLOC=y
81CONFIG_PTDUMP_DEBUGFS=y
82CONFIG_SCHED_STACK_END_CHECK=y
83CONFIG_SLUB_DEBUG_ON=y
84#
85# Debug Oops, Lockups and Hangs
86#
87# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
88# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
89CONFIG_DEBUG_ATOMIC_SLEEP=y
90CONFIG_DETECT_HUNG_TASK=y
91CONFIG_PANIC_ON_OOPS=y
92CONFIG_PANIC_TIMEOUT=0
93CONFIG_SOFTLOCKUP_DETECTOR=y
94#
95# Lock Debugging (spinlocks, mutexes, etc...)
96#
97# CONFIG_PROVE_RAW_LOCK_NESTING is not set
98CONFIG_PROVE_LOCKING=y
99#
100# Debug kernel data structures
101#
102CONFIG_BUG_ON_DATA_CORRUPTION=y
103#
104# RCU Debugging
105#
106CONFIG_PROVE_RCU=y
107CONFIG_PROVE_RCU_LIST=y
108#
109# Tracers
110#
111CONFIG_BRANCH_PROFILE_NONE=y
112CONFIG_DYNAMIC_FTRACE=y
113CONFIG_FTRACE=y
114CONFIG_FUNCTION_TRACER=y
115