menu "Kernel hacking" source "lib/Kconfig.debug" config EARLY_PRINTK bool "Early printk" if EMBEDDED 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 config KPROBES bool "Kprobes" depends on DEBUG_KERNEL help Kprobes allows you to trap at almost any kernel address and execute a callback function. register_kprobe() establishes a probepoint and specifies the callback. Kprobes is useful for kernel debugging, non-intrusive instrumentation and testing. If in doubt, say "N". 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 DEBUG_PAGEALLOC bool "Page alloc debugging" depends on DEBUG_KERNEL 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 4KSTACKS bool "Use 4Kb for kernel stacks instead of 8Kb" 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 SCHEDSTATS bool "Collect scheduler statistics" depends on DEBUG_KERNEL && PROC_FS help If you say Y here, additional code will be inserted into the scheduler and related routines to collect statistics about scheduler behavior and provide them in /proc/schedstat. These stats may be useful for both tuning and debugging the scheduler If you aren't debugging the scheduler or trying to tune a specific application, you can say N to avoid the very slight overhead this adds. 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 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_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. # KDB_USB does not work, the usb code needs to be # converted from 2.4.19 to 2.5.40 APIs. Omit it until somebody # fixes CONFIG_KDB_USB. #config KDB_USB # bool "Support for USB Keyboard in KDB" # depends on KDB && USB # help # If you want to use kdb from a 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