menu "Kernel hacking"
config TRACE_IRQFLAGS_SUPPORT
bool
default y
source "lib/Kconfig.debug"
config DEBUG_RODATA
bool "Write protect kernel read-only data structures"
depends on DEBUG_KERNEL
help
Mark the kernel read-only data as write-protected in the pagetables,
in order to catch accidental (and incorrect) writes to such const data.
This option may have a slight performance impact because a portion
of the kernel code won't be covered by a 2MB TLB anymore.
If in doubt, say "N".
config KDB
bool "Built-in Kernel Debugger support"
depends on DEBUG_KERNEL
select KALLSYMS
select KALLSYMS_ALL
help
This option provides a built-in kernel debugger. The built-in
kernel debugger contains commands which allow memory to be examined,
instructions to be disassembled and breakpoints to be set. For details,
see Documentation/kdb/kdb.mm and the manual pages kdb_bt, kdb_ss, etc.
Kdb can also be used via the serial port. Set up the system to
have a serial console (see Documentation/serial-console.txt).
The key sequence <escape>KDB on the serial port will cause the
kernel debugger to be entered with input from the serial port and
output to the serial console. If unsure, say N.
config KDB_MODULES
tristate "KDB modules"
depends on KDB
help
KDB can be extended by adding your own modules, in directory
kdb/modules. This option selects the way that these modules should
be compiled, as free standing modules (select M) or built into the
kernel (select Y). If unsure say M.
config KDB_OFF
bool "KDB off by default"
depends on KDB
help
Normally kdb is activated by default, as long as CONFIG_KDB is set.
If you want to ship a kernel with kdb support but only have kdb
turned on when the user requests it then select this option. When
compiled with CONFIG_KDB_OFF, kdb ignores all events unless you boot
with kdb=on or you echo "1" > /proc/sys/kernel/kdb. This option also
works in reverse, if kdb is normally activated, you can boot with
kdb=off or echo "0" > /proc/sys/kernel/kdb to deactivate kdb. If
unsure, say N.
config KDB_CONTINUE_CATASTROPHIC
int "KDB continues after catastrophic errors"
depends on KDB
default "0"
help
This integer controls the behaviour of kdb when the kernel gets a
catastrophic error, i.e. for a panic, oops, NMI or other watchdog
tripping. CONFIG_KDB_CONTINUE_CATASTROPHIC interacts with
/proc/sys/kernel/kdb and CONFIG_DUMP (if your kernel has the LKCD
patch).
When KDB is active (/proc/sys/kernel/kdb == 1) and a catastrophic
error occurs, nothing extra happens until you type 'go'.
CONFIG_KDB_CONTINUE_CATASTROPHIC == 0 (default). The first time
you type 'go', kdb warns you. The second time you type 'go', KDB
tries to continue - no guarantees that the kernel is still usable.
CONFIG_KDB_CONTINUE_CATASTROPHIC == 1. KDB tries to continue - no
guarantees that the kernel is still usable.
CONFIG_KDB_CONTINUE_CATASTROPHIC == 2. If your kernel has the LKCD
patch and LKCD is configured to take a dump then KDB forces a dump.
Whether or not a dump is taken, KDB forces a reboot.
When KDB is not active (/proc/sys/kernel/kdb == 0) and a catastrophic
error occurs, the following steps are automatic, no human
intervention is required.
CONFIG_KDB_CONTINUE_CATASTROPHIC == 0 (default) or 1. KDB attempts
to continue - no guarantees that the kernel is still usable.
CONFIG_KDB_CONTINUE_CATASTROPHIC == 2. If your kernel has the LKCD
patch and LKCD is configured to take a dump then KDB automatically
forces a dump. Whether or not a dump is taken, KDB forces a
reboot.
If you are not sure, say 0. Read Documentation/kdb/dump.txt before
setting to 2.
config IOMMU_DEBUG
depends on IOMMU && DEBUG_KERNEL
bool "Enable IOMMU debugging"
help
Force the IOMMU to on even when you have less than 4GB of
memory and add debugging code. On overflow always panic. And
allow to enable IOMMU leak tracing. Can be disabled at boot
time with iommu=noforce. This will also enable scatter gather
list merging. Currently not recommended for production
code. When you use it make sure you have a big enough
IOMMU/AGP aperture. Most of the options enabled by this can
be set more finegrained using the iommu= command line
options. See Documentation/x86_64/boot-options.txt for more
details.
config IOMMU_LEAK
bool "IOMMU leak tracing"
depends on DEBUG_KERNEL
depends on IOMMU_DEBUG
help
Add a simple leak tracer to the IOMMU code. This is useful when you
are debugging a buggy device driver that leaks IOMMU mappings.
config DEBUG_STACKOVERFLOW
bool "Check for stack overflows"
depends on DEBUG_KERNEL
help
This option will cause messages to be printed if free stack space
drops below a certain limit.
config DEBUG_STACK_USAGE
bool "Stack utilization instrumentation"
depends on DEBUG_KERNEL
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.
This option will slow down process creation somewhat.
#config X86_REMOTE_DEBUG
# bool "kgdb debugging stub"
endmenu