-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathKconfig.debug
178 lines (132 loc) · 3.28 KB
/
Kconfig.debug
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
# SPDX-License-Identifier: GPL-2.0-or-later
menu "Kernel Hacking"
source "kernel/printk/Kconfig"
config DEBUG_KERNEL
bool "Kernel debugging"
default y
config CONSTRUCTORS
bool
menuconfig KASAN
bool "Runtime Memory Monitor Support"
depends on DEBUG_KERNEL && ARCH_HAS_KASAN
if KASAN
choice
prompt "KASAN Mode Select"
default KASAN_GENERIC
config KASAN_GENERIC
bool "Generic Mode"
select CONSTRUCTORS
endchoice # KASAN Mode Select
config KASAN_SHADOW_OFFSET
hex "KASAN Shadow Offset"
config KASAN_ALL
bool "Enable instrumentation for the entire kernel"
default y
endif # KASAN
menuconfig UBSAN
bool "Undefined Behaviour Sanity Checker"
depends on DEBUG_KERNEL
default y
if UBSAN
config UBSAN_SHIFT
bool "Perform checking for bit-shift overflows"
default UBSAN
depends on $(cc-option,-fsanitize=shift)
default y
config UBSAN_DIV_ZERO
bool "Perform checking for integer divide-by-zero"
depends on $(cc-option,-fsanitize=integer-divide-by-zero)
default y
config UBSAN_UNREACHABLE
bool "Perform checking for unreachable code"
depends on $(cc-option,-fsanitize=unreachable)
default y
config UBSAN_BOOL
bool "Perform checking for non-boolean values used as boolean"
depends on $(cc-option,-fsanitize=bool)
default y
config UBSAN_ENUM
bool "Perform checking for out of bounds enum values"
depends on $(cc-option,-fsanitize=enum)
default y
config UBSAN_ALIGNMENT
bool "Perform checking for misaligned pointer usage"
depends on $(cc-option,-fsanitize=alignment)
default y
config UBSAN_ALL
bool "Enable instrumentation for the entire kernel"
default y
endif # UBSAN
menuconfig KGCOV
bool "Enable gcov-based kernel profiling"
depends on DEBUG_KERNEL
select CONSTRUCTORS
default y
if KGCOV
config KGCOV_ALL
bool "Enable instrumentation for the entire kernel"
default y
endif # KGCOV
menu "Device Driver Debugging"
endmenu # Device Driver Debugging
menu "Scheduler Debugging"
config DEBUG_PREEMPT
bool "preemptible kernel"
depends on DEBUG_KERNEL && PREEMPTION
default y
endmenu # Scheduler Debugging
menu "Debug Lockups"
config DEBUG_SPINLOCK
bool "Debug spinlock deadlock"
depends on DEBUG_KERNEL
default y
endmenu # Debug Lockups
menu "Memory Debugging"
config DEBUG_SLOB
bool "Debug slob out of bounds"
depends on DEBUG_KERNEL && MM_SLOB
default y
config DEBUG_MEMBLOCK
bool "Debug memblock"
depends on DEBUG_KERNEL
default y
endmenu # Memory Debugging
menu "Debugging data structures"
config DEBUG_DATACHECK_BUG
bool "Trigger BUG when data corruption"
config DEBUG_LIST
bool "Debug list manipulation"
depends on DEBUG_KERNEL
default y
config DEBUG_HLIST
bool "Debug hash List manipulation"
depends on DEBUG_KERNEL
default y
config DEBUG_SLIST
bool "Debug single List manipulation"
depends on DEBUG_KERNEL
default y
config DEBUG_ILIST
bool "Debug index List manipulation"
depends on DEBUG_KERNEL
default y
config DEBUG_RBTREE
bool "Debug rbtree manipulation"
depends on DEBUG_KERNEL
default y
config DEBUG_REFCOUNT
bool "Debug refcount saturation"
depends on DEBUG_KERNEL
default y
config DEBUG_RESPOOL
bool "resources pool verbose debug messages"
depends on DEBUG_KERNEL
default y
endmenu # Debug data structures
config PANIC_TIMEOUT
int "panic timeout"
default 0
config PANIC_TIMESTEP
int "panic timestep"
default 200
endmenu # Kernel Hacking