menu "Kernel hacking" config TRACE_IRQFLAGS_SUPPORT bool default y source "lib/Kconfig.debug" config EARLY_PRINTK bool "Early printk" if EMBEDDED && DEBUG_KERNEL default y help Write kernel log output directly into the VGA buffer or to a serial port. This is useful for kernel debugging when your machine crashes very early before the console code is initialized. For normal operation it is not recommended because it looks ugly and doesn't cooperate with klogd/syslogd or the X server. You should normally N here, unless you want to debug such a crash. 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. comment "Page alloc debug is incompatible with Software Suspend on i386" depends on DEBUG_KERNEL && HIBERNATION config DEBUG_PAGEALLOC bool "Debug page memory allocations" depends on DEBUG_KERNEL && !HIBERNATION && !HUGETLBFS help Unmap pages from the kernel linear mapping after free_pages(). This results in a large slowdown, but helps to find certain types of memory corruptions. 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 4KSTACKS bool "Use 4Kb for kernel stacks instead of 8Kb" depends on DEBUG_KERNEL help If you say Y here the kernel will use a 4Kb stacksize for the kernel stack attached to each process/thread. This facilitates running more threads on a system and also reduces the pressure on the VM subsystem for higher order allocations. This option will also use IRQ stacks to compensate for the reduced stackspace. config X86_FIND_SMP_CONFIG bool depends on X86_LOCAL_APIC || X86_VOYAGER default y config X86_MPPARSE bool depends on X86_LOCAL_APIC && !X86_VISWS default y config DOUBLEFAULT default y bool "Enable doublefault exception handler" if EMBEDDED help This option allows trapping of rare doublefault exceptions that would otherwise cause a system to silently reboot. Disabling this option saves about 4k and might cause you much additional grey hair. 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 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_LKCD_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 KDB_USB bool "Support for USB Keyboard in KDB (OHCI only)" depends on KDB && USB_OHCI_HCD help If you want to use kdb from a OHCI USB keyboard then say Y here. If you say N then kdb can only be used from a PC (AT) keyboard or a serial console. endmenu