Kernel hacking
printk and dmesg options
CONFIG_PRINTK_TIME Show timing information on printks
Selecting this option causes time stamps of the printk() messages to be added to the output of the syslog() system call and at the console.
The timestamp is always recorded internally, and exported to /dev/kmsg. This flag just specifies if the timestamp should be included, not that the timestamp is recorded.
The behavior is also controlled by the kernel command line parameter printk.time=1. See Documentation/admin-guide/kernel-parameters.rst
- Depends on
PRINTK
CONFIG_PRINTK_CALLER Show caller information on printks
Selecting this option causes printk() to add a caller "thread id" (if in task context) or a caller "processor id" (if not in task context) to every message.
This option is intended for environments where multiple threads concurrently call printk() for many times, for it is difficult to interpret without knowing where these lines (or sometimes individual line which was divided into multiple lines due to race) came from.
Since toggling after boot makes the code racy, currently there is no option to enable/disable at the kernel command line parameter or sysfs interface.
- Depends on
PRINTK
CONFIG_PRINTK_EXECUTION_CTX
This option extends struct printk_info to include extra execution context in printk, such as task name and CPU number from where the message originated. This is useful for correlating printk messages with specific execution contexts.
This is automatically enabled when a console driver that supports execution context is selected.
- Depends on
PRINTK
CONFIG_STACKTRACE_BUILD_ID Show build ID information in stacktraces
Selecting this option adds build ID information for symbols in stacktraces printed with the printk format '%p[SR]b'.
This option is intended for distros where debuginfo is not easily accessible but can be downloaded given the build ID of the vmlinux or kernel module where the function is located.
- Depends on
PRINTK
CONFIG_CONSOLE_LOGLEVEL_DEFAULT Default console loglevel (1-15)
Default loglevel to determine what will be printed on the console.
Setting a default here is equivalent to passing in loglevel=<x> in the kernel bootargs. loglevel=<x> continues to override whatever value is specified here as well.
Note: This does not affect the log level of un-prefixed printk() usage in the kernel. That is controlled by the MESSAGE_LOGLEVEL_DEFAULT option.
- Range
[1 15]
CONFIG_CONSOLE_LOGLEVEL_QUIET quiet console loglevel (1-15)
loglevel to use when "quiet" is passed on the kernel commandline.
When "quiet" is passed on the kernel commandline this loglevel will be used as the loglevel. IOW passing "quiet" will be the equivalent of passing "loglevel=<CONSOLE_LOGLEVEL_QUIET>"
- Range
[1 15]
CONFIG_MESSAGE_LOGLEVEL_DEFAULT Default message log level (1-7)
Default log level for printk statements with no specified priority.
This was hard-coded to KERN_WARNING since at least 2.6.10 but folks that are auditing their logs closely may want to set it to a lower priority.
Note: This does not affect what message level gets printed on the console by default. To change that, use loglevel=<x> in the kernel bootargs, or pick a different CONSOLE_LOGLEVEL_DEFAULT configuration value.
- Range
[1 7]
CONFIG_BOOT_PRINTK_DELAY Delay each boot printk message by N milliseconds
This build option allows you to read kernel boot messages by inserting a short delay after each one. The delay is specified in milliseconds on the kernel command line, using "boot_delay=N".
It is likely that you would also need to use "lpj=M" to preset the "loops per jiffy" value. See a previous boot log for the "lpj" value to use for your system, and then set "lpj=M" before setting "boot_delay=N". NOTE: Using this option may adversely affect SMP systems. I.e., processors other than the first one may not boot up. BOOT_PRINTK_DELAY also may cause LOCKUP_DETECTOR to detect what it believes to be lockup conditions.
- Depends on
DEBUG_KERNEL && PRINTK &&
CONFIG_DYNAMIC_DEBUG Enable dynamic printk() support
Compiles debug level messages into the kernel, which would not otherwise be available at runtime. These messages can then be enabled/disabled based on various levels of scope - per source file, function, module, format string, and line number. This mechanism implicitly compiles in all pr_debug() and dev_dbg() calls, which enlarges the kernel text size by about 2%.
If a source file is compiled with DEBUG flag set, any pr_debug() calls in it are enabled by default, but can be disabled at runtime as below. Note that DEBUG flag is turned on by many CONFIG_*DEBUG* options.
Usage:
Dynamic debugging is controlled via the 'dynamic_debug/control' file, which is contained in the 'debugfs' filesystem or procfs. Thus, the debugfs or procfs filesystem must first be mounted before making use of this feature. We refer the control file as: <debugfs>/dynamic_debug/control. This file contains a list of the debug statements that can be enabled. The format for each line of the file is:
filename:lineno [module]function flags format
filename : source file of the debug statement lineno : line number of the debug statement module : module that contains the debug statement function : function that contains the debug statement flags : '=p' means the line is turned 'on' for printing format : the format used for the debug statement
From a live system:
nullarbor:~ # cat <debugfs>/dynamic_debug/control
# filename:lineno [module]function flags format
fs/aio.c:222 [aio]__put_ioctx =_ "__put_ioctx:\040freeing\040%p\012"
fs/aio.c:248 [aio]ioctx_alloc =_ "ENOMEM:\040nr_events\040too\040high\012"
fs/aio.c:1770 [aio]sys_io_cancel =_ "calling\040cancel\012"
Example usage:
// enable the message at line 1603 of file svcsock.c
nullarbor:~ # echo -n 'file svcsock.c line 1603 +p' >
<debugfs>/dynamic_debug/control
// enable all the messages in file svcsock.c
nullarbor:~ # echo -n 'file svcsock.c +p' >
<debugfs>/dynamic_debug/control
// enable all the messages in the NFS server module
nullarbor:~ # echo -n 'module nfsd +p' >
<debugfs>/dynamic_debug/control
// enable all 12 messages in the function svc_process()
nullarbor:~ # echo -n 'func svc_process +p' >
<debugfs>/dynamic_debug/control
// disable all 12 messages in the function svc_process()
nullarbor:~ # echo -n 'func svc_process -p' >
<debugfs>/dynamic_debug/control
See Documentation/admin-guide/dynamic-debug-howto.rst for additional information.
CONFIG_DYNAMIC_DEBUG_CORE Enable core function of dynamic debug support
Enable core functional support of dynamic debug. It is useful when you want to tie dynamic debug to your kernel modules with DYNAMIC_DEBUG_MODULE defined for each of them, especially for the case of embedded system where the kernel image size is sensitive for people.
CONFIG_SYMBOLIC_ERRNAME Support symbolic error names in printf
If you say Y here, the kernel's printf implementation will be able to print symbolic error names such as ENOSPC instead of the number 28. It makes the kernel image slightly larger (about 3KB), but can make the kernel logs easier to read.
CONFIG_DEBUG_BUGVERBOSE Verbose BUG() reporting (adds 70K)
Say Y here to make BUG() panics output the file name and line number of the BUG call as well as the EIP and oops trace. This aids debugging but costs about 70-100K of memory.
- Depends on
BUG && ( || HAVE_DEBUG_BUGVERBOSE)
CONFIG_DEBUG_BUGVERBOSE_DETAILED Verbose WARN_ON_ONCE() reporting (adds 100K)
Say Y here to make WARN_ON_ONCE() output the condition string of the warning, in addition to the file name and line number. This helps debugging, but costs about 100K of memory.
Say N if unsure.
CONFIG_DEBUG_KERNEL Kernel debugging
Say Y here if you are developing drivers or trying to debug and identify kernel problems.
If DEBUG_KERNEL
CONFIG_DEBUG_MISC Miscellaneous debug code
Say Y here if you need to enable miscellaneous debug code that should be under a more specific debug option but isn't.
Compile-time checks and compiler options
CONFIG_DEBUG_INFO
A kernel debug info option other than "None" has been selected in the "Debug information" choice below, indicating that debug information will be generated for build targets.
CONFIG_AS_HAS_NON_CONST_ULEB128
Debug information
Selecting something other than "None" results in a kernel image that will include debugging info resulting in a larger kernel image. This adds debug symbols to the kernel and modules (gcc -g), and is needed if you intend to use kernel crashdump or binary object tools like crash, kgdb, LKCD, gdb, etc on the kernel.
Choose which version of DWARF debug info to emit. If unsure, select "Toolchain default".
- Depends on
DEBUG_KERNEL
CONFIG_DEBUG_INFO_NONE Disable debug information
Do not build the kernel with debugging information, which will result in a faster and smaller build.
- Depends on
DEBUG_KERNEL
CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT Rely on the toolchain's implicit default DWARF version
The implicit default version of DWARF debug info produced by a toolchain changes over time.
This can break consumers of the debug info that haven't upgraded to support newer revisions, and prevent testing newer versions, but those should be less common scenarios.
- Depends on
DEBUG_KERNEL && (!CC_IS_CLANG || AS_IS_LLVM || AS_IS_GNU && AS_VERSION>=23502 && AS_HAS_NON_CONST_ULEB128) - Selects
DEBUG_INFO if DEBUG_KERNEL && (!CC_IS_CLANG || AS_IS_LLVM || AS_IS_GNU && AS_VERSION>=23502 && AS_HAS_NON_CONST_ULEB128)
CONFIG_DEBUG_INFO_DWARF4 Generate DWARF Version 4 debuginfo
Generate DWARF v4 debug info. This requires gcc 4.5+, binutils 2.35.2 if using clang without clang's integrated assembler, and gdb 7.0+.
If you have consumers of DWARF debug info that are not ready for newer revisions of DWARF, you may wish to choose this or have your config select this.
- Depends on
DEBUG_KERNEL && (!CC_IS_CLANG || AS_IS_LLVM || AS_IS_GNU && AS_VERSION>=23502) - Selects
DEBUG_INFO if DEBUG_KERNEL && (!CC_IS_CLANG || AS_IS_LLVM || AS_IS_GNU && AS_VERSION>=23502)
CONFIG_DEBUG_INFO_DWARF5 Generate DWARF Version 5 debuginfo
Generate DWARF v5 debug info. Requires binutils 2.35.2, gcc 5.0+ (gcc 5.0+ accepts the -gdwarf-5 flag but only had partial support for some draft features until 7.0), and gdb 8.0+.
Changes to the structure of debug info in Version 5 allow for around 15-18% savings in resulting image and debug info section sizes as compared to DWARF Version 4. DWARF Version 5 standardizes previous extensions such as accelerators for symbol indexing and the format for fission (.dwo/.dwp) files. Users may not want to select this config if they rely on tooling that has not yet been updated to support DWARF Version 5.
- Depends on
DEBUG_KERNEL && !ARCH_HAS_BROKEN_DWARF5 && (!CC_IS_CLANG || AS_IS_LLVM || AS_IS_GNU && AS_VERSION>=23502 && AS_HAS_NON_CONST_ULEB128) - Selects
DEBUG_INFO if DEBUG_KERNEL && !ARCH_HAS_BROKEN_DWARF5 && (!CC_IS_CLANG || AS_IS_LLVM || AS_IS_GNU && AS_VERSION>=23502 && AS_HAS_NON_CONST_ULEB128)
If DEBUG_INFO
CONFIG_DEBUG_INFO_REDUCED Reduce debugging information
If you say Y here gcc is instructed to generate less debugging information for structure types. This means that tools that need full debugging information (like kgdb or systemtap) won't be happy. But if you merely need debugging information to resolve line numbers there is no loss. Advantage is that build directory object sizes shrink dramatically over a full DEBUG_INFO build and compile times are reduced too. Only works with newer gcc versions.
Compressed Debug information
Compress the resulting debug info. Results in smaller debug info sections, but requires that consumers are able to decompress the results.
If unsure, choose DEBUG_INFO_COMPRESSED_NONE.
CONFIG_DEBUG_INFO_COMPRESSED_NONE Don't compress debug information
Don't compress debug info sections.
CONFIG_DEBUG_INFO_COMPRESSED_ZLIB Compress debugging information with zlib
Compress the debug information using zlib.
Users of dpkg-deb via debian/rules may find an increase in size of their debug .deb packages with this config set, due to the debug info being compressed with zlib, then the object files being recompressed with a different compression scheme. But this is still preferable to setting KDEB_COMPRESS or DPKG_DEB_COMPRESSOR_TYPE to "none" which would be even larger.
CONFIG_DEBUG_INFO_COMPRESSED_ZSTD Compress debugging information with zstd
Compress the debug information using zstd. This may provide better compression than zlib, for about the same time costs, but requires newer toolchain support. Requires GCC 13.0+ or Clang 16.0+, binutils 2.40+, and zstd.
CONFIG_DEBUG_INFO_SPLIT Produce split debuginfo in .dwo files
Generate debug info into separate .dwo files. This significantly reduces the build directory size for builds with DEBUG_INFO, because it stores the information only once on disk in .dwo files instead of multiple times in object files and executables. In addition the debug information is also compressed.
Requires recent gcc (4.7+) and recent gdb/binutils. Any tool that packages or reads debug information would need to know about the .dwo files and include them. Incompatible with older versions of ccache.
- Depends on
DEBUG_INFO && (!RISCV || GCC_VERSION>=120000)
CONFIG_DEBUG_INFO_BTF Generate BTF type information
Generate deduplicated BTF type information from DWARF debug info. Turning this on requires pahole v1.22 or later, which will convert DWARF type info into equivalent deduplicated BTF type info.
- Depends on
DEBUG_INFO && !DEBUG_INFO_SPLIT && !DEBUG_INFO_REDUCED && (!GCC_PLUGIN_RANDSTRUCT || COMPILE_TEST) && BPF_SYSCALL && PAHOLE_VERSION>=122 && !HEXAGON
CONFIG_PAHOLE_HAS_BTF_TAG
Decide whether pahole emits btf_tag attributes (btf_type_tag and btf_decl_tag) or not. Currently only clang compiler implements these attributes, so make the config depend on CC_IS_CLANG.
- Depends on
DEBUG_INFO && CC_IS_CLANG
CONFIG_PAHOLE_HAS_LANG_EXCLUDE
Support for the --lang_exclude flag which makes pahole exclude compilation units from the supplied language. Used in Kbuild to omit Rust CUs which are not supported in version 1.24 of pahole, otherwise it would emit malformed kernel and module binaries when using DEBUG_INFO_BTF_MODULES.
CONFIG_PAHOLE_HAS_INLINE
Support for the "inline" BTF feature is available. It encodes information about inline sites and how to retrieve their parameters.
CONFIG_DEBUG_INFO_BTF_MODULES Generate BTF type information for kernel modules
Generate compact split BTF type information for kernel modules.
- Depends on
DEBUG_INFO && DEBUG_INFO_BTF &&
CONFIG_DEBUG_INFO_BTF_INLINE Provide information about inline sites in BTF
- Off
- Module
- Built in
Generate information about inline sites in .BTF.inline sections. These sections contain split BTF relative to the kernel or module BTF and are made available in /sys/kernel/btf with a ".inline" suffix. The information describes inline locations and how to retrieve their associated parameters.
- Depends on
DEBUG_INFO && DEBUG_INFO_BTF && PAHOLE_HAS_INLINE && SYSFS - Selects
DEBUG_INFO_BTF_MODULES if DEBUG_INFO && DEBUG_INFO_BTF && PAHOLE_HAS_INLINE && SYSFS &&
CONFIG_MODULE_ALLOW_BTF_MISMATCH Allow loading modules with non-matching BTF type info
For modules whose split BTF does not match vmlinux, load without BTF rather than refusing to load. The default behavior with module BTF enabled is to reject modules with such mismatches; this option will still load module BTF where possible but ignore it when a mismatch is found.
- Depends on
DEBUG_INFO && DEBUG_INFO_BTF_MODULES
CONFIG_GDB_SCRIPTS Provide GDB scripts for kernel debugging
This creates the required links to GDB helper scripts in the build directory. If you load vmlinux into gdb, the helper scripts will be automatically imported by gdb as well, and additional functions are available to analyze a Linux kernel instance. See Documentation/process/debugging/gdb-kernel-debugging.rst for further details.
CONFIG_FRAME_WARN Warn for stack frames larger than
Tell the compiler to warn at build time for stack frames larger than this. Setting this too low will cause a lot of warnings. Setting it to 0 disables the warning.
- Range
[0 8192]
CONFIG_STRIP_ASM_SYMS Strip assembler-generated symbols during link
Strip internal assembler-generated symbols during a link (symbols that look like '.Lxxx') so they don't pollute the output of get_wchan() and suchlike.
CONFIG_READABLE_ASM Generate readable assembler code
Disable some compiler optimizations that tend to generate human unreadable assembler output. This may make the kernel slightly slower, but it helps to keep kernel developers who have to stare a lot at assembler listings sane.
- Depends on
DEBUG_KERNEL && CC_IS_GCC
CONFIG_HEADERS_INSTALL Install uapi headers to usr/include
This option will install uapi headers (headers exported to user-space) into the usr/include directory for use during the kernel build. This is unneeded for building the kernel itself, but needed for some user-space program samples. It is also needed by some features such as uapi header sanity checks.
CONFIG_DEBUG_SECTION_MISMATCH Enable full Section mismatch analysis
The section mismatch analysis checks if there are illegal references from one section to another. During linktime or runtime, some sections are dropped; any use of code/data previously in these sections would most likely result in an oops.
In the code, functions and variables are annotated with __init, __initdata, and so on (see the full list in include/linux/init.h). This directs the toolchain to place code/data in specific sections.
The section mismatch analysis is always performed after a full kernel build, and enabling this option causes the option -fno-inline-functions-called-once to be added to gcc commands.
However, when inlining a function annotated with __init in a non-init function, we would lose the section information and thus the analysis would not catch the illegal reference. This option tells gcc to inline less (but it does result in a larger kernel).
- Depends on
CC_IS_GCC
CONFIG_SECTION_MISMATCH_WARN_ONLY Make section mismatch errors non-fatal
If you say N here, the build process will fail if there are any section mismatch, instead of just throwing warnings.
If unsure, say Y.
CONFIG_DEBUG_FORCE_FUNCTION_ALIGN_64B Force all function address 64B aligned
There are cases that a commit from one domain changes the function address alignment of other domains, and cause magic performance bump (regression or improvement). Enable this option will help to verify if the bump is caused by function alignment changes, while it will slightly increase the kernel size and affect icache usage.
It is mainly for debug and performance tuning use.
CONFIG_ARCH_WANT_FRAME_POINTERS
CONFIG_FRAME_POINTER Compile the kernel with frame pointers
If you say Y here the resulting kernel image will be slightly larger and slower, but it gives very useful debugging information in case of kernel bugs. (precise oopses/stacktraces/warnings)
- Depends on
DEBUG_KERNEL && (M68K || UML || SUPERH) || ARCH_WANT_FRAME_POINTERS
CONFIG_OBJTOOL
CONFIG_OBJTOOL_WERROR Upgrade objtool warnings to errors
Fail the build on objtool warnings.
Objtool warnings can indicate kernel instability, including boot failures. This option is highly recommended.
If unsure, say Y.
- Depends on
OBJTOOL && !COMPILE_TEST
CONFIG_STACK_VALIDATION Compile-time stack metadata validation
Validate frame pointer rules at compile-time. This helps ensure that runtime stack traces are more reliable.
For more information, see tools/objtool/Documentation/objtool.txt.
- Depends on
HAVE_STACK_VALIDATION && - Selects
OBJTOOL if HAVE_STACK_VALIDATION &&
CONFIG_NOINSTR_VALIDATION
- Depends on
HAVE_NOINSTR_VALIDATION && - Selects
OBJTOOL if HAVE_NOINSTR_VALIDATION &&
CONFIG_VMLINUX_MAP Generate vmlinux.map file when linking
Selecting this option will pass "-Map=vmlinux.map" to ld when linking vmlinux. That file can be useful for verifying and debugging magic section games, and for seeing which pieces of code get eliminated with CONFIG_LD_DEAD_CODE_DATA_ELIMINATION.
- Depends on
EXPERT
If VMLINUX_MAP
CONFIG_BUILTIN_MODULE_RANGES Generate address range information for builtin modules
When modules are built into the kernel, there will be no module name associated with its symbols in /proc/kallsyms. Tracers may want to identify symbols by module name and symbol name regardless of whether the module is configured as loadable or not.
This option generates modules.builtin.ranges in the build tree with offset ranges (per ELF section) for the module(s) they belong to. It also records an anchor symbol to determine the load address of the section.
- Depends on
!LTO && VMLINUX_MAP
CONFIG_WARN_CONTEXT_ANALYSIS Compiler context-analysis warnings
Context Analysis is a language extension, which enables statically checking that required contexts are active (or inactive) by acquiring and releasing user-definable "context locks".
Clang's name of the feature is "Thread Safety Analysis". Requires Clang 23 or later.
Produces warnings by default. Select CONFIG_WERROR if you wish to turn these warnings into errors.
For more details, see Documentation/dev-tools/context-analysis.rst.
- Depends on
CC_IS_CLANG && CLANG_VERSION>=230000 && !TRACE_BRANCH_PROFILING
If WARN_CONTEXT_ANALYSIS
CONFIG_WARN_CONTEXT_ANALYSIS_ALL Enable context analysis for all source files
Enable tree-wide context analysis. This is likely to produce a large number of false positives - enable at your own risk.
If unsure, say N.
- Depends on
WARN_CONTEXT_ANALYSIS && EXPERT && !COMPILE_TEST
Generic Kernel Debugging Instruments
CONFIG_MAGIC_SYSRQ Magic SysRq key
If you say Y here, you will have some control over the system even if the system crashes for example during kernel debugging (e.g., you will be able to flush the buffer cache to disk, reboot the system immediately or dump some status information). This is accomplished by pressing various keys while holding SysRq (Alt+PrintScreen). It also works on a serial console (on PC hardware at least), if you send a BREAK and then within 5 seconds a command keypress. On UML, this is accomplished by sending a "sysrq" command with mconsole, followed by the letter for the requested command. The keys are documented in <file:Documentation/admin-guide/sysrq.rst>. Don't say Y unless you really know what this hack does.
If MAGIC_SYSRQ
CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE Enable magic SysRq key functions by default
Specifies which SysRq key functions are enabled by default. This may be set to 1 or 0 to enable or disable them all, or to a bitmask as described in Documentation/admin-guide/sysrq.rst.
CONFIG_MAGIC_SYSRQ_SERIAL Enable magic SysRq key over serial
Many embedded boards have a disconnected TTL level serial which can generate some garbage that can lead to spurious false sysrq detects. This option allows you to decide whether you want to enable the magic SysRq key.
If MAGIC_SYSRQ_SERIAL
CONFIG_MAGIC_SYSRQ_SERIAL_SEQUENCE Char sequence that enables magic SysRq over serial
Specifies a sequence of characters that can follow BREAK to enable SysRq on a serial console.
If unsure, leave an empty string and the option will not be enabled.
CONFIG_DEBUG_FS Debug Filesystem
debugfs is a virtual file system that kernel developers use to put debugging files into. Enable this option to be able to read and write to these files.
For detailed documentation on the debugfs API, see Documentation/filesystems/.
If unsure, say N.
If DEBUG_FS
Debugfs default access
This selects the default access restrictions for debugfs. It can be overridden with kernel command line option debugfs=[on,off]. The restrictions apply for API access and filesystem registration.
CONFIG_DEBUG_FS_ALLOW_ALL Access normal
No restrictions apply. Both API and filesystem registration is on. This is the normal default operation.
CONFIG_DEBUG_FS_ALLOW_NONE No access
Access is off. Clients get -PERM when trying to create nodes in debugfs tree and debugfs is not registered as a filesystem. Client can then back-off or continue without debugfs access.
Networking Debugging
Memory Debugging
CONFIG_DEBUG_OBJECTS Debug object operations
If you say Y here, additional code will be inserted into the kernel to track the life time of various objects and validate the operations on those objects.
- Depends on
(PREEMPT_COUNT || !DEFERRED_STRUCT_PAGE_INIT) && DEBUG_KERNEL
If DEBUG_OBJECTS
CONFIG_DEBUG_OBJECTS_SELFTEST Debug objects selftest
This enables the selftest of the object debug code.
CONFIG_DEBUG_OBJECTS_FREE Debug objects in freed memory
This enables checks whether a k/v free operation frees an area which contains an object which has not been deactivated properly. This can make kmalloc/kfree-intensive workloads much slower.
CONFIG_DEBUG_OBJECTS_TIMERS Debug timer objects
If you say Y here, additional code will be inserted into the timer routines to track the life time of timer objects and validate the timer operations.
CONFIG_DEBUG_OBJECTS_WORK Debug work objects
If you say Y here, additional code will be inserted into the work queue routines to track the life time of work objects and validate the work operations.
CONFIG_DEBUG_OBJECTS_RCU_HEAD Debug RCU callbacks objects
Enable this to turn on debugging of RCU list heads (call_rcu() usage).
CONFIG_DEBUG_OBJECTS_PERCPU_COUNTER Debug percpu counter objects
If you say Y here, additional code will be inserted into the percpu counter routines to track the life time of percpu counter objects and validate the percpu counter operations.
CONFIG_DEBUG_OBJECTS_ENABLE_DEFAULT debug_objects bootup default value (0-1)
Debug objects boot parameter default value
- Range
[0 1] if DEBUG_OBJECTS
CONFIG_SHRINKER_DEBUG Enable shrinker debugging support
Say Y to enable the shrinker debugfs interface which provides visibility into the kernel memory shrinkers subsystem. Disable it to avoid an extra memory footprint.
- Depends on
DEBUG_FS
CONFIG_DEBUG_STACK_USAGE Stack utilization instrumentation
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. Also emits a message to dmesg when a process exits if that process used more stack space than previously exiting processes.
This option will slow down process creation somewhat.
- Depends on
DEBUG_KERNEL
CONFIG_SCHED_STACK_END_CHECK Detect stack corruption on calls to schedule()
This option checks for a stack overrun on calls to schedule(). If the stack end location is found to be over written always panic as the content of the corrupted region can no longer be trusted. This is to ensure no erroneous behaviour occurs which could result in data corruption or a sporadic crash at a later stage once the region is examined. The runtime overhead introduced is minimal.
- Depends on
DEBUG_KERNEL
CONFIG_ARCH_HAS_DEBUG_VM_PGTABLE
An architecture should select this when it can successfully build and run DEBUG_VM_PGTABLE.
CONFIG_DEBUG_VFS Debug VFS
Enable this to turn on extended checks in the VFS layer that may impact performance.
If unsure, say N.
- Depends on
DEBUG_KERNEL
CONFIG_DEBUG_VM_IRQSOFF
CONFIG_DEBUG_VM Debug VM
Enable this to turn on extended checks in the virtual-memory system that may impact performance.
If unsure, say N.
- Depends on
DEBUG_KERNEL
If DEBUG_VM
CONFIG_DEBUG_VM_SHOOT_LAZIES Debug MMU_LAZY_TLB_SHOOTDOWN implementation
Enable additional IPIs that ensure lazy tlb mm references are removed before the mm is freed.
If unsure, say N.
- Depends on
DEBUG_VM && MMU_LAZY_TLB_SHOOTDOWN
CONFIG_DEBUG_VM_MAPLE_TREE Debug VM maple trees
Enable VM maple tree debugging information and extra validations.
If unsure, say N.
- Selects
DEBUG_MAPLE_TREE if DEBUG_VM
CONFIG_DEBUG_VM_RB Debug VM red-black trees
Enable VM red-black tree debugging information and extra validations.
If unsure, say N.
CONFIG_DEBUG_VM_PGFLAGS Debug page-flags operations
Enables extra validation on page flags operations.
If unsure, say N.
CONFIG_DEBUG_VM_PGTABLE Debug arch page table for semantics compliance
This option provides a debug method which can be used to test architecture page table helper functions on various platforms in verifying if they comply with expected generic MM semantics. This will help architecture code in making sure that any changes or new additions of these helpers still conform to expected semantics of the generic MM. Platforms will have to opt in for this through ARCH_HAS_DEBUG_VM_PGTABLE.
If unsure, say N.
- Depends on
&& ARCH_HAS_DEBUG_VM_PGTABLE
CONFIG_ARCH_HAS_DEBUG_VIRTUAL
CONFIG_DEBUG_VIRTUAL Debug VM translations
Enable some costly sanity checks in virtual to page code. This can catch mistakes with virt_to_page() and friends.
If unsure, say N.
- Depends on
DEBUG_KERNEL && ARCH_HAS_DEBUG_VIRTUAL
CONFIG_DEBUG_NOMMU_REGIONS Debug the global anon/private NOMMU mapping region tree
This option causes the global tree of anonymous and private mapping regions to be regularly checked for invalid topology.
- Depends on
DEBUG_KERNEL && !
CONFIG_DEBUG_MEMORY_INIT Debug memory initialisation
Enable this for additional checks during memory initialisation. The sanity checks verify aspects of the VM such as the memory model and other information provided by the architecture. Verbose information will be printed at KERN_DEBUG loglevel depending on the mminit_loglevel= command-line option.
If unsure, say Y
CONFIG_MEMORY_NOTIFIER_ERROR_INJECT Memory hotplug notifier error injection module
- Off
- Module
- Built in
This option provides the ability to inject artificial errors to memory hotplug notifier chain callbacks. It is controlled through debugfs interface under /sys/kernel/debug/notifier-error-inject/memory
If the notifier call chain should be failed with some events notified, write the error code to "actions/<notifier event>/error".
Example: Inject memory hotplug offline error (-12 == -ENOMEM)
# cd /sys/kernel/debug/notifier-error-inject/memory # echo -12 > actions/MEM_GOING_OFFLINE/error # echo offline > /sys/devices/system/memory/memoryXXX/state bash: echo: write error: Cannot allocate memory
To compile this code as a module, choose M here: the module will be called memory-notifier-error-inject.
If unsure, say N.
- Depends on
MEMORY_HOTPLUG && NOTIFIER_ERROR_INJECTION
CONFIG_DEBUG_PER_CPU_MAPS Debug access to per_cpu maps
Say Y to verify that the per_cpu map being accessed has been set up. This adds a fair amount of code to kernel memory and decreases performance.
Say N if unsure.
- Depends on
DEBUG_KERNEL &&
CONFIG_DEBUG_KMAP_LOCAL Debug kmap_local temporary mappings
This option enables additional error checking for the kmap_local infrastructure. Disable for production use.
- Depends on
DEBUG_KERNEL && KMAP_LOCAL
CONFIG_ARCH_SUPPORTS_KMAP_LOCAL_FORCE_MAP
CONFIG_DEBUG_KMAP_LOCAL_FORCE_MAP Enforce kmap_local temporary mappings
This option enforces temporary mappings through the kmap_local mechanism for non-highmem pages and on non-highmem systems. Disable this for production systems!
- Depends on
DEBUG_KERNEL && ARCH_SUPPORTS_KMAP_LOCAL_FORCE_MAP - Selects
KMAP_LOCAL if DEBUG_KERNEL && ARCH_SUPPORTS_KMAP_LOCAL_FORCE_MAP - Selects
DEBUG_KMAP_LOCAL if DEBUG_KERNEL && ARCH_SUPPORTS_KMAP_LOCAL_FORCE_MAP
CONFIG_DEBUG_HIGHMEM Highmem debugging
This option enables additional error checking for high memory systems. Disable for production systems.
- Depends on
DEBUG_KERNEL && - Selects
DEBUG_KMAP_LOCAL_FORCE_MAP if DEBUG_KERNEL && && ARCH_SUPPORTS_KMAP_LOCAL_FORCE_MAP - Selects
DEBUG_KMAP_LOCAL if DEBUG_KERNEL &&
CONFIG_HAVE_DEBUG_STACKOVERFLOW
CONFIG_DEBUG_STACKOVERFLOW Check for stack overflows
Say Y here if you want to check for overflows of kernel, IRQ and exception stacks (if your architecture uses them). This option will show detailed messages if free stack space drops below a certain limit.
These kinds of bugs usually occur when call-chains in the kernel get too deep, especially when interrupts are involved.
Use this in cases where you see apparently random memory corruption, especially if it appears in 'struct thread_info'
If in doubt, say "N".
- Depends on
DEBUG_KERNEL && HAVE_DEBUG_STACKOVERFLOW
CONFIG_CODE_TAGGING
- Selects
KALLSYMS
CONFIG_DEBUG_SHIRQ Debug shared IRQ handlers
Enable this to generate a spurious interrupt just before a shared interrupt handler is deregistered (generating one when registering is currently disabled). Drivers need to handle this correctly. Some don't and need to be caught.
- Depends on
DEBUG_KERNEL
Debug Oops, Lockups and Hangs
CONFIG_PANIC_ON_OOPS Panic on Oops
Say Y here to enable the kernel to panic when it oopses. This has the same effect as setting oops=panic on the kernel command line.
This feature is useful to ensure that the kernel does not do anything erroneous after an oops which could result in data corruption or other issues.
Say N if unsure.
CONFIG_PANIC_TIMEOUT panic timeout
Set the timeout value (in seconds) until a reboot occurs when the kernel panics. If n = 0, then we wait forever. A timeout value n > 0 will wait n seconds before rebooting, while a timeout value n < 0 will reboot immediately. This setting can be overridden with the kernel command line option panic=, and from userspace via /proc/sys/kernel/panic.
CONFIG_LOCKUP_DETECTOR
CONFIG_SOFTLOCKUP_DETECTOR Detect Soft Lockups
Say Y here to enable the kernel to act as a watchdog to detect soft lockups.
Softlockups are bugs that cause the kernel to loop in kernel mode for more than 20 seconds, without giving other tasks a chance to run. The current stack trace is displayed upon detection and the system will stay locked up.
- Depends on
DEBUG_KERNEL && !S390 - Selects
LOCKUP_DETECTOR if DEBUG_KERNEL && !S390
If SOFTLOCKUP_DETECTOR
CONFIG_SOFTLOCKUP_DETECTOR_INTR_STORM Detect Interrupt Storm in Soft Lockups
Say Y here to enable the kernel to detect interrupt storm during "soft lockups".
"soft lockups" can be caused by a variety of reasons. If one is caused by an interrupt storm, then the storming interrupts will not be on the callstack. To detect this case, it is necessary to report the CPU stats and the interrupt counts during the "soft lockups".
- Depends on
SOFTLOCKUP_DETECTOR && IRQ_TIME_ACCOUNTING - Selects
GENERIC_IRQ_STAT_SNAPSHOT if SOFTLOCKUP_DETECTOR && IRQ_TIME_ACCOUNTING
CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC Panic (Reboot) On Soft Lockups
Set to a non-zero value N to enable the kernel to panic on "soft lockups", which are bugs that cause the kernel to loop in kernel mode for more than (N * 20 seconds) (configurable using the watchdog_thresh sysctl), without giving other tasks a chance to run.
The panic can be used in combination with panic_timeout, to cause the system to reboot automatically after a lockup has been detected. This feature is useful for high-availability systems that have uptime guarantees and where a lockup must be resolved ASAP.
Say 0 if unsure.
CONFIG_HAVE_HARDLOCKUP_DETECTOR_BUDDY
- Depends on
CONFIG_HARDLOCKUP_DETECTOR Detect Hard Lockups
Say Y here to enable the kernel to act as a watchdog to detect hard lockups.
Hardlockups are bugs that cause the CPU to loop in kernel mode for more than 10 seconds, without letting other interrupts have a chance to run. The current stack trace is displayed upon detection and the system will stay locked up.
- Depends on
DEBUG_KERNEL && !S390 && !HARDLOCKUP_DETECTOR_SPARC64 && (HAVE_HARDLOCKUP_DETECTOR_PERF || HAVE_HARDLOCKUP_DETECTOR_BUDDY || HAVE_HARDLOCKUP_DETECTOR_ARCH) - Implies
HARDLOCKUP_DETECTOR_PERF if DEBUG_KERNEL && !S390 && !HARDLOCKUP_DETECTOR_SPARC64 && (HAVE_HARDLOCKUP_DETECTOR_PERF || HAVE_HARDLOCKUP_DETECTOR_BUDDY || HAVE_HARDLOCKUP_DETECTOR_ARCH) - Implies
HARDLOCKUP_DETECTOR_BUDDY if DEBUG_KERNEL && !S390 && !HARDLOCKUP_DETECTOR_SPARC64 && (HAVE_HARDLOCKUP_DETECTOR_PERF || HAVE_HARDLOCKUP_DETECTOR_BUDDY || HAVE_HARDLOCKUP_DETECTOR_ARCH) - Implies
HARDLOCKUP_DETECTOR_ARCH if DEBUG_KERNEL && !S390 && !HARDLOCKUP_DETECTOR_SPARC64 && (HAVE_HARDLOCKUP_DETECTOR_PERF || HAVE_HARDLOCKUP_DETECTOR_BUDDY || HAVE_HARDLOCKUP_DETECTOR_ARCH) - Selects
LOCKUP_DETECTOR if DEBUG_KERNEL && !S390 && !HARDLOCKUP_DETECTOR_SPARC64 && (HAVE_HARDLOCKUP_DETECTOR_PERF || HAVE_HARDLOCKUP_DETECTOR_BUDDY || HAVE_HARDLOCKUP_DETECTOR_ARCH)
If HARDLOCKUP_DETECTOR
CONFIG_HARDLOCKUP_DETECTOR_PREFER_BUDDY Prefer the buddy CPU hardlockup detector
Say Y here to prefer the buddy hardlockup detector over the perf one.
With the buddy detector, each CPU uses its softlockup hrtimer to check that the next CPU is processing hrtimer interrupts by verifying that a counter is increasing.
This hardlockup detector is useful on systems that don't have an arch-specific hardlockup detector or if resources needed for the hardlockup detector are better used for other things.
CONFIG_HARDLOCKUP_DETECTOR_PERF
- Depends on
HARDLOCKUP_DETECTOR && HAVE_HARDLOCKUP_DETECTOR_PERF && !HARDLOCKUP_DETECTOR_PREFER_BUDDY && !HAVE_HARDLOCKUP_DETECTOR_ARCH - Selects
HARDLOCKUP_DETECTOR_COUNTS_HRTIMER if HARDLOCKUP_DETECTOR && HAVE_HARDLOCKUP_DETECTOR_PERF && !HARDLOCKUP_DETECTOR_PREFER_BUDDY && !HAVE_HARDLOCKUP_DETECTOR_ARCH
CONFIG_HARDLOCKUP_DETECTOR_BUDDY
- Depends on
HARDLOCKUP_DETECTOR && HAVE_HARDLOCKUP_DETECTOR_BUDDY && (!HAVE_HARDLOCKUP_DETECTOR_PERF || HARDLOCKUP_DETECTOR_PREFER_BUDDY) && !HAVE_HARDLOCKUP_DETECTOR_ARCH - Selects
HARDLOCKUP_DETECTOR_COUNTS_HRTIMER if HARDLOCKUP_DETECTOR && HAVE_HARDLOCKUP_DETECTOR_BUDDY && (!HAVE_HARDLOCKUP_DETECTOR_PERF || HARDLOCKUP_DETECTOR_PREFER_BUDDY) && !HAVE_HARDLOCKUP_DETECTOR_ARCH
If HARDLOCKUP_DETECTOR
CONFIG_HARDLOCKUP_DETECTOR_ARCH
The arch-specific implementation of the hardlockup detector will be used.
- Depends on
HARDLOCKUP_DETECTOR && HAVE_HARDLOCKUP_DETECTOR_ARCH
CONFIG_HARDLOCKUP_DETECTOR_COUNTS_HRTIMER
- Selects
SOFTLOCKUP_DETECTOR
CONFIG_HARDLOCKUP_CHECK_TIMESTAMP
CONFIG_BOOTPARAM_HARDLOCKUP_PANIC Panic (Reboot) On Hard Lockups
Say Y here to enable the kernel to panic on "hard lockups", which are bugs that cause the kernel to loop in kernel mode with interrupts disabled for more than 10 seconds (configurable using the watchdog_thresh sysctl).
Say N if unsure.
- Depends on
HARDLOCKUP_DETECTOR
CONFIG_DETECT_HUNG_TASK Detect Hung Tasks
Say Y here to enable the kernel to detect "hung tasks", which are bugs that cause the task to be stuck in uninterruptible "D" state indefinitely.
When a hung task is detected, the kernel will print the current stack trace (which you should report), but the task will stay in uninterruptible state. If lockdep is enabled then all held locks will also be reported. This feature has negligible overhead.
- Depends on
DEBUG_KERNEL
If DETECT_HUNG_TASK
CONFIG_DEFAULT_HUNG_TASK_TIMEOUT Default timeout for hung task detection (in seconds)
This option controls the default timeout (in seconds) used to determine when a task has become non-responsive and should be considered hung.
It can be adjusted at runtime via the kernel.hung_task_timeout_secs sysctl or by writing a value to /proc/sys/kernel/hung_task_timeout_secs.
A timeout of 0 disables the check. The default is two minutes. Keeping the default should be fine in most cases.
CONFIG_BOOTPARAM_HUNG_TASK_PANIC Number of hung tasks to trigger kernel panic
When set to a non-zero value, a kernel panic will be triggered if the number of hung tasks found during a single scan reaches this value.
The panic can be used in combination with panic_timeout, to cause the system to reboot automatically after a hung task has been detected. This feature is useful for high-availability systems that have uptime guarantees and where a hung tasks must be resolved ASAP.
Say 0 if unsure.
CONFIG_DETECT_HUNG_TASK_BLOCKER Dump Hung Tasks Blocker
Say Y here to show a possible blocker task's stacktrace when a hung task is waiting on a mutex, semaphore, or rwsem. This will add a bit of overhead but shows suspicious tasks and call traces for waits on one of these locks.
- Depends on
DETECT_HUNG_TASK && !PREEMPT_RT
CONFIG_WQ_WATCHDOG Detect Workqueue Stalls
Say Y here to enable stall detection on workqueues. If a worker pool doesn't make forward progress on a pending work item for over a given amount of time, 30s by default, a warning message is printed along with dump of workqueue state. This can be configured through kernel parameter "workqueue.watchdog_thresh" and its sysfs counterpart.
- Depends on
DEBUG_KERNEL
If WQ_WATCHDOG
CONFIG_BOOTPARAM_WQ_STALL_PANIC Panic on Nth workqueue stall
Set the number of workqueue stalls to trigger a kernel panic. A workqueue stall occurs when a worker pool doesn't make forward progress on a pending work item for over 30 seconds (configurable using the workqueue.watchdog_thresh parameter).
If n = 0, the kernel will not panic on stall. If n > 0, the kernel will panic after n stall warnings.
The panic can be used in combination with panic_timeout, to cause the system to reboot automatically after a stall has been detected. This feature is useful for high-availability systems that have uptime guarantees and where a stall must be resolved ASAP.
This setting can be overridden at runtime via the workqueue.panic_on_stall kernel parameter.
- Range
[0 100] if WQ_WATCHDOG
CONFIG_WQ_CPU_INTENSIVE_REPORT Report per-cpu work items which hog CPU for too long
Say Y here to enable reporting of concurrency-managed per-cpu work items that hog CPUs for longer than workqueue.cpu_intensive_thresh_us. Workqueue automatically detects and excludes them from concurrency management to prevent them from stalling other per-cpu work items. Occassional triggering may not necessarily indicate a problem. Repeated triggering likely indicates that the work item should be switched to use an unbound workqueue.
- Depends on
DEBUG_KERNEL
CONFIG_TEST_CSD_LOCK Test module to stall a CPU on a CSD lock
- Off
- Module
- Built in
This builds the "test_csd_lock" module, which keeps one CPU from answering an IPI for as long as its stall_ms parameter says, so that the CSD-lock debug code has a stall to report. It needs csdlock_debug=1 to be of any use.
If unsure, say N.
- Depends on
m && && CSD_LOCK_WAIT_DEBUG
CONFIG_TEST_LOCKUP Test module to generate lockups
- Off
- Module
- Built in
This builds the "test_lockup" module that helps to make sure that watchdogs and lockup detectors are working properly.
Depending on module parameters it could emulate soft or hard lockup, "hung task", or locking arbitrary lock for a long time. Also it could generate series of lockups with cooling-down periods.
If unsure, say N.
- Depends on
m &&
Scheduler Debugging
CONFIG_SCHED_INFO
CONFIG_SCHEDSTATS Collect scheduler statistics
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.
- Depends on
PROC_FS - Selects
SCHED_INFO if PROC_FS
CONFIG_DEBUG_PREEMPT Debug preemptible kernel
If you say Y here then the kernel will use a debug variant of the commonly used smp_processor_id() function and will print warnings if kernel code uses it in a preemption-unsafe way. Also, the kernel will detect preemption count underflows.
This option has potential to introduce high runtime overhead, depending on workload as it triggers debugging routines for each this_cpu operation. It should only be used for debugging purposes.
- Depends on
DEBUG_KERNEL && PREEMPTION && TRACE_IRQFLAGS_SUPPORT
CONFIG_DEBUG_ATOMIC Debug atomic variables
If you say Y here then the kernel will add a runtime alignment check to atomic accesses. Useful for architectures that do not have trap on mis-aligned access.
This option has potentially significant overhead.
- Depends on
DEBUG_KERNEL
If DEBUG_ATOMIC
CONFIG_DEBUG_ATOMIC_LARGEST_ALIGN Check alignment only up to __aligned_largest
If you say Y here then the check for natural alignment of atomic accesses will be constrained to the compiler's largest alignment for scalar types.
Lock Debugging (spinlocks, mutexes, etc...)
CONFIG_LOCK_DEBUGGING_SUPPORT
- Depends on
TRACE_IRQFLAGS_SUPPORT && &&
CONFIG_PROVE_LOCKING Lock debugging: prove locking correctness
This feature enables the kernel to prove that all locking that occurs in the kernel runtime is mathematically correct: that under no circumstance could an arbitrary (and not yet triggered) combination of observed locking sequences (on an arbitrary number of CPUs, running an arbitrary number of tasks and interrupt contexts) cause a deadlock.
In short, this feature enables the kernel to report locking related deadlocks before they actually occur.
The proof does not depend on how hard and complex a deadlock scenario would be to trigger: how many participant CPUs, tasks and irq-contexts would be needed for it to trigger. The proof also does not depend on timing: if a race and a resulting deadlock is possible theoretically (no matter how unlikely the race scenario is), it will be proven so and will immediately be reported by the kernel (once the event is observed that makes the deadlock theoretically possible).
If a deadlock is impossible (i.e. the locking rules, as observed by the kernel, are mathematically correct), the kernel reports nothing.
NOTE: this feature can also be enabled for rwlocks, mutexes and rwsems - in which case all dependencies between these different locking variants are observed and mapped too, and the proof of observed correctness is also maintained for an arbitrary combination of these separate locking variants.
For more details, see Documentation/locking/lockdep-design.rst.
- Depends on
DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT - Selects
LOCKDEP if DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT - Selects
DEBUG_SPINLOCK if DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT - Selects
DEBUG_MUTEXES if DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT && !PREEMPT_RT - Selects
DEBUG_RT_MUTEXES if DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT && RT_MUTEXES - Selects
DEBUG_RWSEMS if DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT && !PREEMPT_RT - Selects
DEBUG_WW_MUTEX_SLOWPATH if DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT - Selects
DEBUG_LOCK_ALLOC if DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT - Selects
PREEMPT_COUNT if DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT && !ARCH_NO_PREEMPT - Selects
TRACE_IRQFLAGS if DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT
If PROVE_LOCKING
CONFIG_PROVE_RAW_LOCK_NESTING Enable raw_spinlock - spinlock nesting checks
Enable the raw_spinlock vs. spinlock nesting checks which ensure that the lock nesting rules for PREEMPT_RT enabled kernels are not violated.
CONFIG_LOCK_STAT Lock usage statistics
This feature enables tracking lock contention points
For more details, see Documentation/locking/lockstat.rst
This also enables lock events required by "perf lock", subcommand of perf. If you want to use "perf lock", you also need to turn on CONFIG_EVENT_TRACING.
CONFIG_LOCK_STAT defines "contended" and "acquired" lock events. (CONFIG_LOCKDEP defines "acquire" and "release" events.)
- Depends on
DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT - Selects
LOCKDEP if DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT - Selects
DEBUG_SPINLOCK if DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT - Selects
DEBUG_MUTEXES if DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT && !PREEMPT_RT - Selects
DEBUG_RT_MUTEXES if DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT && RT_MUTEXES - Selects
DEBUG_LOCK_ALLOC if DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT
CONFIG_DEBUG_RT_MUTEXES RT Mutex debugging, deadlock detection
This allows rt mutex semantics violations and rt mutex related deadlocks (lockups) to be detected and reported automatically.
- Depends on
DEBUG_KERNEL && RT_MUTEXES
CONFIG_DEBUG_SPINLOCK Spinlock and rw-lock debugging: basic checks
Say Y here and build SMP to catch missing spinlock initialization and certain other kinds of spinlock errors commonly made. This is best used in conjunction with the NMI watchdog so that spinlock deadlocks are also debuggable.
- Depends on
DEBUG_KERNEL - Selects
UNINLINE_SPIN_UNLOCK if DEBUG_KERNEL
CONFIG_DEBUG_MUTEXES Mutex debugging: basic checks
This feature allows mutex semantics violations to be detected and reported.
- Depends on
DEBUG_KERNEL && !PREEMPT_RT
CONFIG_DEBUG_WW_MUTEX_SLOWPATH Wait/wound mutex debugging: Slowpath testing
This feature enables slowpath testing for w/w mutex users by injecting additional -EDEADLK wound/backoff cases. Together with the full mutex checks enabled with (CONFIG_PROVE_LOCKING) this will test all possible w/w mutex interface abuse with the exception of simply not acquiring all the required locks. Note that this feature can introduce significant overhead, so it really should not be enabled in a production or distro kernel, even a debug kernel. If you are a driver writer, enable it. If you are a distro, do not.
- Depends on
DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT - Selects
DEBUG_LOCK_ALLOC if DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT - Selects
DEBUG_SPINLOCK if DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT - Selects
DEBUG_MUTEXES if DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT && !PREEMPT_RT - Selects
DEBUG_RT_MUTEXES if DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT && PREEMPT_RT
CONFIG_DEBUG_RWSEMS RW Semaphore debugging: basic checks
This debugging feature allows mismatched rw semaphore locks and unlocks to be detected and reported.
- Depends on
DEBUG_KERNEL && !PREEMPT_RT
CONFIG_DEBUG_LOCK_ALLOC Lock debugging: detect incorrect freeing of live locks
This feature will check whether any held lock (spinlock, rwlock, mutex or rwsem) is incorrectly freed by the kernel, via any of the memory-freeing routines (kfree(), kmem_cache_free(), free_pages(), vfree(), etc.), whether a live lock is incorrectly reinitialized via spin_lock_init()/mutex_init()/etc., or whether there is any lock held during task exit.
- Depends on
DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT - Selects
DEBUG_SPINLOCK if DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT - Selects
DEBUG_MUTEXES if DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT && !PREEMPT_RT - Selects
DEBUG_RT_MUTEXES if DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT && RT_MUTEXES - Selects
LOCKDEP if DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT
CONFIG_LOCKDEP
- Depends on
DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT - Selects
STACKTRACE if DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT - Selects
KALLSYMS if DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT - Selects
KALLSYMS_ALL if DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT
CONFIG_LOCKDEP_SMALL
CONFIG_LOCKDEP_BITS Size for MAX_LOCKDEP_ENTRIES (as Nth power of 2)
Try increasing this value if you hit "BUG: MAX_LOCKDEP_ENTRIES too low!" message.
- Depends on
LOCKDEP && !LOCKDEP_SMALL - Range
[10 24] if LOCKDEP && !LOCKDEP_SMALL
CONFIG_LOCKDEP_CHAINS_BITS Size for MAX_LOCKDEP_CHAINS (as Nth power of 2)
Try increasing this value if you hit "BUG: MAX_LOCKDEP_CHAINS too low!" message.
- Depends on
LOCKDEP && !LOCKDEP_SMALL - Range
[10 21] if LOCKDEP && !LOCKDEP_SMALL
CONFIG_LOCKDEP_STACK_TRACE_BITS Size for MAX_STACK_TRACE_ENTRIES (as Nth power of 2)
Try increasing this value if you hit "BUG: MAX_STACK_TRACE_ENTRIES too low!" message.
KASAN significantly increases stack trace consumption because its slab tracking interacts with lockdep's dependency validation under PREEMPT_FULL, creating a feedback loop. The higher default when KASAN is enabled costs ~12MB extra, which is negligible compared to KASAN's own shadow memory overhead.
- Depends on
LOCKDEP && !LOCKDEP_SMALL - Range
[10 26] if LOCKDEP && !LOCKDEP_SMALL
CONFIG_LOCKDEP_STACK_TRACE_HASH_BITS Size for STACK_TRACE_HASH_SIZE (as Nth power of 2)
Try increasing this value if you need large STACK_TRACE_HASH_SIZE.
- Depends on
LOCKDEP && !LOCKDEP_SMALL - Range
[10 26] if LOCKDEP && !LOCKDEP_SMALL
CONFIG_LOCKDEP_CIRCULAR_QUEUE_BITS Size for elements in circular_queue struct (as Nth power of 2)
Try increasing this value if you hit "lockdep bfs error:-1" warning due to __cq_enqueue() failure.
CONFIG_DEBUG_LOCKDEP Lock dependency engine debugging
If you say Y here, the lock dependency engine will do additional runtime checks to debug itself, at the price of more runtime overhead.
- Depends on
DEBUG_KERNEL && LOCKDEP - Selects
DEBUG_IRQFLAGS if DEBUG_KERNEL && LOCKDEP
CONFIG_DEBUG_ATOMIC_SLEEP Sleep inside atomic section checking
If you say Y here, various routines which may sleep will become very noisy if they are called inside atomic sections: when a spinlock is held, inside an rcu read side critical section, inside preempt disabled sections, inside an interrupt, etc...
- Depends on
DEBUG_KERNEL && !ARCH_NO_PREEMPT - Selects
PREEMPT_COUNT if DEBUG_KERNEL && !ARCH_NO_PREEMPT
CONFIG_DEBUG_LOCKING_API_SELFTESTS Locking API boot-time self-tests
Say Y here if you want the kernel to run a short self-test during bootup. The self-test checks whether common types of locking bugs are detected by debugging mechanisms or not. (if you disable lock debugging then those bugs won't be detected of course.) The following locking APIs are covered: spinlocks, rwlocks, mutexes and rwsems.
- Depends on
DEBUG_KERNEL
CONFIG_LOCK_TORTURE_TEST torture tests for locking
- Off
- Module
- Built in
This option provides a kernel module that runs torture tests on kernel locking primitives. The kernel module may be built after the fact on the running kernel to be tested, if desired.
Say Y here if you want kernel locking-primitive torture tests to be built into the kernel. Say M if you want these torture tests to build as a module. Say N if you are unsure.
- Depends on
DEBUG_KERNEL - Selects
TORTURE_TEST if DEBUG_KERNEL
CONFIG_WW_MUTEX_SELFTEST Wait/wound mutex selftests
- Off
- Module
- Built in
This option provides a kernel module that runs tests on the on the struct ww_mutex locking API.
It is recommended to enable DEBUG_WW_MUTEX_SLOWPATH in conjunction with this test harness.
Say M if you want these self tests to build as a module. Say N if you are unsure.
CONFIG_SCF_TORTURE_TEST torture tests for smp_call_function*()
- Off
- Module
- Built in
This option provides a kernel module that runs torture tests on the smp_call_function() family of primitives. The kernel module may be built after the fact on the running kernel to be tested, if desired.
- Depends on
DEBUG_KERNEL - Selects
TORTURE_TEST if DEBUG_KERNEL
CONFIG_CSD_LOCK_WAIT_DEBUG Debugging for csd_lock_wait(), called from smp_call_function*()
This option enables debug prints when CPUs are slow to respond to the smp_call_function*() IPI wrappers. These debug prints include the IPI handler function currently executing (if any) and relevant stack traces.
- Depends on
DEBUG_KERNEL && &&
If CSD_LOCK_WAIT_DEBUG
CONFIG_CSD_LOCK_WAIT_DEBUG_DEFAULT Default csd_lock_wait() debugging on at boot time
This option causes the csdlock_debug= kernel boot parameter to default to 1 (basic debugging) instead of 0 (no debugging).
- Depends on
CSD_LOCK_WAIT_DEBUG &&
CONFIG_TRACE_IRQFLAGS
Enables hooks to interrupt enabling and disabling for either tracing or lock debugging.
- Depends on
TRACE_IRQFLAGS_SUPPORT
CONFIG_TRACE_IRQFLAGS_NMI
- Depends on
TRACE_IRQFLAGS && TRACE_IRQFLAGS_NMI_SUPPORT
CONFIG_NMI_CHECK_CPU Debugging for CPUs failing to respond to backtrace requests
Enables debug prints when a CPU fails to respond to a given backtrace NMI. These prints provide some reasons why a CPU might legitimately be failing to respond, for example, if it is offline of if ignore_nmis is set.
- Depends on
DEBUG_KERNEL && X86
CONFIG_DEBUG_IRQFLAGS Debug IRQ flag manipulation
Enables checks for potentially unsafe enabling or disabling of interrupts, such as calling raw_local_irq_restore() when interrupts are enabled.
CONFIG_STACKTRACE Stack backtrace support
This option causes the kernel to create a /proc/pid/stack for every process, showing its current stack trace. It is also used by various kernel debugging features that require stack trace generation.
- Depends on
CONFIG_DEBUG_KOBJECT kobject debugging
If you say Y here, some extra kobject debugging messages will be sent to the syslog.
- Depends on
DEBUG_KERNEL
CONFIG_DEBUG_KOBJECT_RELEASE kobject release debugging
kobjects are reference counted objects. This means that their last reference count put is not predictable, and the kobject can live on past the point at which a driver decides to drop its initial reference to the kobject gained on allocation. An example of this would be a struct device which has just been unregistered.
However, some buggy drivers assume that after such an operation, the memory backing the kobject can be immediately freed. This goes completely against the principles of a refcounted object.
If you say Y here, the kernel will delay the release of kobjects on the last reference count to improve the visibility of this kind of kobject release bug.
- Depends on
DEBUG_OBJECTS_TIMERS
CONFIG_HAVE_DEBUG_BUGVERBOSE
Debug kernel data structures
CONFIG_DEBUG_LIST Debug linked list manipulation
Enable this to turn on extended checks in the linked-list walking routines.
This option trades better quality error reports for performance, and is more suitable for kernel debugging. If you care about performance, you should only enable CONFIG_LIST_HARDENED instead.
If unsure, say N.
- Depends on
DEBUG_KERNEL - Selects
LIST_HARDENED if DEBUG_KERNEL
CONFIG_DEBUG_PLIST Debug priority linked list manipulation
Enable this to turn on extended checks in the priority-ordered linked-list (plist) walking routines. This checks the entire list multiple times during each manipulation.
If unsure, say N.
- Depends on
DEBUG_KERNEL
CONFIG_DEBUG_SG Debug SG table operations
Enable this to turn on checks on scatter-gather tables. This can help find problems with drivers that do not properly initialize their sg tables.
If unsure, say N.
- Depends on
DEBUG_KERNEL
CONFIG_DEBUG_NOTIFIERS Debug notifier call chains
Enable this to turn on sanity checking for notifier call chains. This is most useful for kernel developers to make sure that modules properly unregister themselves from notifier chains. This is a relatively cheap check but if you care about maximum performance, say N.
- Depends on
DEBUG_KERNEL
CONFIG_DEBUG_CLOSURES Debug closures (bcache async widgits)
Keeps all active closures in a linked list and provides a debugfs interface to list them, which makes it possible to see asynchronous operations that get stuck.
CONFIG_DEBUG_MAPLE_TREE Debug maple trees
Enable maple tree debugging information and extra validations.
If unsure, say N.
- Depends on
DEBUG_KERNEL
CONFIG_DEBUG_WQ_FORCE_RR_CPU Force round-robin CPU selection for unbound work items
Workqueue used to implicitly guarantee that work items queued without explicit CPU specified are put on the local CPU. This guarantee is no longer true and while local CPU is still preferred work items may be put on foreign CPUs. Kernel parameter "workqueue.debug_force_rr_cpu" is added to force round-robin CPU selection to flush out usages which depend on the now broken guarantee. This config option enables the debug feature by default. When enabled, memory and cache locality will be impacted.
- Depends on
DEBUG_KERNEL
CONFIG_CPU_HOTPLUG_STATE_CONTROL Enable CPU hotplug state control
Allows to write steps between "offline" and "online" to the CPUs sysfs target file so states can be stepped granular. This is a debug option for now as the hotplug machinery cannot be stopped and restarted at arbitrary points yet.
Say N if your are unsure.
- Depends on
DEBUG_KERNEL &&
CONFIG_LATENCYTOP Latency measuring infrastructure
Enable this option if you want to use the LatencyTOP tool to find out which userspace is blocking on what kernel operations.
- Depends on
DEBUG_KERNEL && && PROC_FS && (FRAME_POINTER || MIPS || PPC || S390 || MICROBLAZE || ARM || ARC || X86) - Selects
KALLSYMS if DEBUG_KERNEL && && PROC_FS && (FRAME_POINTER || MIPS || PPC || S390 || MICROBLAZE || ARM || ARC || X86) - Selects
KALLSYMS_ALL if DEBUG_KERNEL && && PROC_FS && (FRAME_POINTER || MIPS || PPC || S390 || MICROBLAZE || ARM || ARC || X86) - Selects
STACKTRACE if DEBUG_KERNEL && && PROC_FS && (FRAME_POINTER || MIPS || PPC || S390 || MICROBLAZE || ARM || ARC || X86) - Selects
SCHEDSTATS if DEBUG_KERNEL && && PROC_FS && (FRAME_POINTER || MIPS || PPC || S390 || MICROBLAZE || ARM || ARC || X86)
CONFIG_DEBUG_CGROUP_REF Disable inlining of cgroup css reference count functions
Force cgroup css reference count functions to not be inlined so that they can be kprobed for debugging.
- Depends on
DEBUG_KERNEL && CGROUPS && KPROBES
CONFIG_PROVIDE_OHCI1394_DMA_INIT Remote debugging over FireWire early on boot
If you want to debug problems which hang or crash the kernel early on boot and the crashing machine has a FireWire port, you can use this feature to remotely access the memory of the crashed machine over FireWire. This employs remote DMA as part of the OHCI1394 specification which is now the standard for FireWire controllers.
With remote DMA, you can monitor the printk buffer remotely using firescope and access all memory below 4GB using fireproxy from gdb. Even controlling a kernel debugger is possible using remote DMA.
Usage:
If ohci1394_dma=early is used as boot parameter, it will initialize all OHCI1394 controllers which are found in the PCI config space.
As all changes to the FireWire bus such as enabling and disabling devices cause a bus reset and thereby disable remote DMA for all devices, be sure to have the cable plugged and FireWire enabled on the debugging host before booting the debug target for debugging.
This code (~1k) is freed after boot. By then, the firewire stack in charge of the OHCI-1394 controllers should be used instead.
See Documentation/core-api/debugging-via-ohci1394.rst for more information.
CONFIG_ARCH_HAS_DEVMEM_IS_ALLOWED
CONFIG_STRICT_DEVMEM Filter access to /dev/mem
If this option is disabled, you allow userspace (root) access to all of memory, including kernel and userspace memory. Accidental access to this is obviously disastrous, but specific access can be used by people debugging the kernel. Note that with PAT support enabled, even in this case there are restrictions on /dev/mem use due to the cache aliasing requirements.
If this option is switched on, and IO_STRICT_DEVMEM=n, the /dev/mem file only allows userspace access to PCI space and the BIOS code and data regions. This is sufficient for dosemu and X and all common users of /dev/mem.
If in doubt, say Y.
- Depends on
&& DEVMEM && (ARCH_HAS_DEVMEM_IS_ALLOWED || GENERIC_LIB_DEVMEM_IS_ALLOWED)
If STRICT_DEVMEM
CONFIG_IO_STRICT_DEVMEM Filter I/O access to /dev/mem
If this option is disabled, you allow userspace (root) access to all io-memory regardless of whether a driver is actively using that range. Accidental access to this is obviously disastrous, but specific access can be used by people debugging kernel drivers.
If this option is switched on, the /dev/mem file only allows userspace access to *idle* io-memory ranges (see /proc/iomem) This may break traditional users of /dev/mem (dosemu, legacy X, etc...) if the driver using a given range cannot be disabled.
If in doubt, say Y.
x86 Debugging
Kernel Testing and Coverage
CONFIG_NOTIFIER_ERROR_INJECTION Notifier error injection
- Off
- Module
- Built in
This option provides the ability to inject artificial errors to specified notifier chain callbacks. It is useful to test the error handling of notifier call chain failures.
Say N if unsure.
- Depends on
DEBUG_KERNEL - Selects
DEBUG_FS if DEBUG_KERNEL
If NOTIFIER_ERROR_INJECTION
CONFIG_PM_NOTIFIER_ERROR_INJECT PM notifier error injection module
- Off
- Module
- Built in
This option provides the ability to inject artificial errors to PM notifier chain callbacks. It is controlled through debugfs interface /sys/kernel/debug/notifier-error-inject/pm
If the notifier call chain should be failed with some events notified, write the error code to "actions/<notifier event>/error".
Example: Inject PM suspend error (-12 = -ENOMEM)
# cd /sys/kernel/debug/notifier-error-inject/pm/ # echo -12 > actions/PM_SUSPEND_PREPARE/error # echo mem > /sys/power/state bash: echo: write error: Cannot allocate memory
To compile this code as a module, choose M here: the module will be called pm-notifier-error-inject.
If unsure, say N.
- Depends on
&& NOTIFIER_ERROR_INJECTION
CONFIG_OF_RECONFIG_NOTIFIER_ERROR_INJECT OF reconfig notifier error injection module
- Off
- Module
- Built in
This option provides the ability to inject artificial errors to OF reconfig notifier chain callbacks. It is controlled through debugfs interface under /sys/kernel/debug/notifier-error-inject/OF-reconfig/
If the notifier call chain should be failed with some events notified, write the error code to "actions/<notifier event>/error".
To compile this code as a module, choose M here: the module will be called of-reconfig-notifier-error-inject.
If unsure, say N.
- Depends on
OF_DYNAMIC && NOTIFIER_ERROR_INJECTION
CONFIG_NETDEV_NOTIFIER_ERROR_INJECT Netdev notifier error injection module
- Off
- Module
- Built in
This option provides the ability to inject artificial errors to netdevice notifier chain callbacks. It is controlled through debugfs interface /sys/kernel/debug/notifier-error-inject/netdev
If the notifier call chain should be failed with some events notified, write the error code to "actions/<notifier event>/error".
Example: Inject netdevice mtu change error (-22 = -EINVAL)
# cd /sys/kernel/debug/notifier-error-inject/netdev # echo -22 > actions/NETDEV_CHANGEMTU/error # ip link set eth0 mtu 1024 RTNETLINK answers: Invalid argument
To compile this code as a module, choose M here: the module will be called netdev-notifier-error-inject.
If unsure, say N.
- Depends on
NET && NOTIFIER_ERROR_INJECTION
CONFIG_FUNCTION_ERROR_INJECTION Fault-injections of functions
Add fault injections into various functions that are annotated with ALLOW_ERROR_INJECTION() in the kernel. BPF may also modify the return value of these functions. This is useful to test error paths of code.
If unsure, say N
- Depends on
HAVE_FUNCTION_ERROR_INJECTION && KPROBES
CONFIG_FAULT_INJECTION Fault-injection framework
Provide fault-injection framework. For more details, see Documentation/fault-injection/.
- Depends on
DEBUG_KERNEL
If FAULT_INJECTION
CONFIG_FAILSLAB Fault-injection capability for kmalloc
Provide fault-injection capability for kmalloc.
CONFIG_FAIL_PAGE_ALLOC Fault-injection capability for alloc_pages()
Provide fault-injection capability for alloc_pages().
CONFIG_FAULT_INJECTION_USERCOPY Fault injection capability for usercopy functions
Provides fault-injection capability to inject failures in usercopy functions (copy_from_user(), get_user(), ...).
CONFIG_FAIL_MAKE_REQUEST Fault-injection capability for disk IO
Provide fault-injection capability for disk IO.
- Depends on
FAULT_INJECTION && BLOCK
CONFIG_FAIL_IO_TIMEOUT Fault-injection capability for faking disk interrupts
Provide fault-injection capability on end IO handling. This will make the block layer "forget" an interrupt as configured, thus exercising the error handling.
Only works with drivers that use the generic timeout handling, for others it won't do anything.
- Depends on
FAULT_INJECTION && BLOCK
CONFIG_FAIL_FUTEX Fault-injection capability for futexes
Provide fault-injection capability for futexes.
- Depends on
FAULT_INJECTION && FUTEX - Selects
DEBUG_FS if FAULT_INJECTION && FUTEX
CONFIG_FAULT_INJECTION_DEBUG_FS Debugfs entries for fault-injection capabilities
Enable configuration of fault-injection capabilities via debugfs.
- Depends on
FAULT_INJECTION && SYSFS && DEBUG_FS
If FAULT_INJECTION_DEBUG_FS
CONFIG_FAIL_FUNCTION Fault-injection capability for functions
Provide function-based fault-injection capability. This will allow you to override a specific function with a return with given return value. As a result, function caller will see an error value and have to handle it. This is useful to test the error handling in various subsystems.
- Depends on
FAULT_INJECTION_DEBUG_FS && FUNCTION_ERROR_INJECTION
CONFIG_FAIL_MMC_REQUEST Fault-injection capability for MMC IO
Provide fault-injection capability for MMC IO. This will make the mmc core return data errors. This is useful to test the error handling in the mmc block device and to test how the mmc host driver handles retries from the block device.
- Depends on
FAULT_INJECTION_DEBUG_FS && MMC
CONFIG_FAIL_SUNRPC Fault-injection capability for SunRPC
Provide fault-injection capability for SunRPC and its consumers.
- Depends on
FAULT_INJECTION_DEBUG_FS && SUNRPC_DEBUG
CONFIG_FAIL_SKB_REALLOC Fault-injection capability forcing skb to reallocate
Provide fault-injection capability that forces the skb to be reallocated, catching possible invalid pointers to the skb.
For more information, check Documentation/fault-injection/fault-injection.rst
CONFIG_FAULT_INJECTION_CONFIGFS Configfs interface for fault-injection capabilities
This option allows configfs-based drivers to dynamically configure fault-injection via configfs. Each parameter for driver-specific fault-injection can be made visible as a configfs attribute in a configfs group.
- Selects
CONFIGFS_FS if FAULT_INJECTION
CONFIG_FAULT_INJECTION_STACKTRACE_FILTER stacktrace filter for fault-injection capabilities
Provide stacktrace filter for fault-injection capabilities
- Depends on
FAULT_INJECTION && (FAULT_INJECTION_DEBUG_FS || FAULT_INJECTION_CONFIGFS) && && (FRAME_POINTER || MIPS || PPC || S390 || MICROBLAZE || ARM || ARC || X86) - Selects
STACKTRACE if FAULT_INJECTION && (FAULT_INJECTION_DEBUG_FS || FAULT_INJECTION_CONFIGFS) && && (FRAME_POINTER || MIPS || PPC || S390 || MICROBLAZE || ARM || ARC || X86)
CONFIG_ARCH_HAS_KCOV
An architecture should select this when it can successfully build and run with CONFIG_KCOV. This typically requires disabling instrumentation for some early boot code.
CONFIG_KCOV Code coverage for fuzzing
KCOV exposes kernel code coverage information in a form suitable for coverage-guided fuzzing (randomized testing).
For more details, see Documentation/dev-tools/kcov.rst.
- Depends on
ARCH_HAS_KCOV && (!ARCH_WANTS_NO_INSTR || HAVE_NOINSTR_HACK || GCC_VERSION>=120000 || CC_IS_CLANG) - Selects
DEBUG_FS if ARCH_HAS_KCOV && (!ARCH_WANTS_NO_INSTR || HAVE_NOINSTR_HACK || GCC_VERSION>=120000 || CC_IS_CLANG) - Selects
OBJTOOL if ARCH_HAS_KCOV && (!ARCH_WANTS_NO_INSTR || HAVE_NOINSTR_HACK || GCC_VERSION>=120000 || CC_IS_CLANG) && HAVE_NOINSTR_HACK
If KCOV
CONFIG_KCOV_ENABLE_COMPARISONS Enable comparison operands collection by KCOV
KCOV also exposes operands of every comparison in the instrumented code along with operand sizes and PCs of the comparison instructions. These operands can be used by fuzzing engines to improve the quality of fuzzing coverage.
CONFIG_KCOV_INSTRUMENT_ALL Instrument all code by default
If you are doing generic system call fuzzing (like e.g. syzkaller), then you will want to instrument the whole kernel and you should say y here. If you are doing more targeted fuzzing (like e.g. filesystem fuzzing with AFL) then you will want to enable coverage for more specific subsets of files, and should say n here.
CONFIG_KCOV_IRQ_AREA_SIZE Size of interrupt coverage collection area in words
KCOV uses preallocated areas to collect coverage from soft interrupts. This specifies the size of those areas in the number of unsigned long words.
- Range
[0x80 0x1000000] if KCOV
CONFIG_KCOV_SELFTEST Perform short selftests on boot
Run short KCOV coverage collection selftests on boot. On test failure, causes the kernel to panic. Recommended to be enabled, ensuring critical functionality works as intended.
CONFIG_RUNTIME_TESTING_MENU Runtime Testing
If RUNTIME_TESTING_MENU
CONFIG_842_DECOMPRESS_KUNIT_TEST KUnit tests for the 842 decompressor
- Off
- Module
- Built in
Enable stream-validation and boundary tests for the software 842 decompressor. The tests exercise indexed copies, short data and repeat operations at valid and invalid output or history boundaries.
For more information on KUnit and unit tests in general, refer to Documentation/dev-tools/kunit/.
If unsure, say N.
- Depends on
RUNTIME_TESTING_MENU && KUNIT && 842_DECOMPRESS
CONFIG_TEST_DHRY Dhrystone benchmark test
- Off
- Module
- Built in
Enable this to include the Dhrystone 2.1 benchmark. This test calculates the number of Dhrystones per second, and the number of DMIPS (Dhrystone MIPS) obtained when the Dhrystone score is divided by 1757 (the number of Dhrystones per second obtained on the VAX 11/780, nominally a 1 MIPS machine).
To run the benchmark, it needs to be enabled explicitly, either from the kernel command line (when built-in), or from userspace (when built-in or modular).
Run once during kernel boot:
test_dhry.run
Set number of iterations from kernel command line:
test_dhry.iterations=<n>
Set number of iterations from userspace:
echo <n> > /sys/module/test_dhry/parameters/iterations
Trigger manual run from userspace:
echo y > /sys/module/test_dhry/parameters/run
If the number of iterations is <= 0, the test will devise a suitable number of iterations (test runs for at least 2s) automatically. This process takes ca. 4s.
If unsure, say N.
CONFIG_LKDTM Linux Kernel Dump Test Tool Module
- Off
- Module
- Built in
This module enables testing of the different dumping mechanisms by inducing system failures at predefined crash points. If you don't need it: say N Choose M here to compile this code as a module. The module will be called lkdtm.
Documentation on how to use the module can be found in Documentation/fault-injection/provoke-crashes.rst
- Depends on
RUNTIME_TESTING_MENU && DEBUG_FS
CONFIG_CPUMASK_KUNIT_TEST KUnit test for cpumask
- Off
- Module
- Built in
Enable to turn on cpumask tests, running at boot or module load time.
For more information on KUnit and unit tests in general, please refer to the KUnit documentation in Documentation/dev-tools/kunit/.
If unsure, say N.
- Depends on
RUNTIME_TESTING_MENU && KUNIT
CONFIG_TEST_LIST_SORT Linked list sorting test
- Off
- Module
- Built in
Enable this to turn on 'list_sort()' function test. This test is executed only once during system boot (so affects only boot time), or at module load time.
If unsure, say N.
- Depends on
RUNTIME_TESTING_MENU && KUNIT
CONFIG_TEST_SORT Array-based sort test
- Off
- Module
- Built in
This option enables the self-test function of 'sort()' at boot, or at module load time.
If unsure, say N.
- Depends on
RUNTIME_TESTING_MENU && KUNIT
CONFIG_TEST_DIV64 64bit/32bit division and modulo test
- Off
- Module
- Built in
Enable this to turn on 'do_div()' function test. This test is executed only once during system boot (so affects only boot time), or at module load time.
If unsure, say N.
- Depends on
RUNTIME_TESTING_MENU && (DEBUG_KERNEL || m && )
CONFIG_TEST_MULDIV64 mul_u64_u64_div_u64() test
- Off
- Module
- Built in
Enable this to turn on 'mul_u64_u64_div_u64()' function test. This test is executed only once during system boot (so affects only boot time), or at module load time.
If unsure, say N.
- Depends on
RUNTIME_TESTING_MENU && (DEBUG_KERNEL || m && )
CONFIG_TEST_IOV_ITER Test iov_iter operation
- Off
- Module
- Built in
Enable this to turn on testing of the operation of the I/O iterator (iov_iter). This test is executed only once during system boot (so affects only boot time), or at module load time.
If unsure, say N.
- Depends on
RUNTIME_TESTING_MENU && KUNIT &&
CONFIG_KPROBES_SANITY_TEST Kprobes sanity tests
- Off
- Module
- Built in
This option provides for testing basic kprobes functionality on boot. Samples of kprobe and kretprobe are inserted and verified for functionality.
Say N if you are unsure.
- Depends on
RUNTIME_TESTING_MENU && DEBUG_KERNEL && KPROBES && KUNIT - Selects
STACKTRACE if RUNTIME_TESTING_MENU && DEBUG_KERNEL && KPROBES && KUNIT && ARCH_CORRECT_STACKTRACE_ON_KRETPROBE
CONFIG_FPROBE_SANITY_TEST Self test for fprobe
This option will enable testing the fprobe when the system boot. A series of tests are made to verify that the fprobe is functioning properly.
Say N if you are unsure.
- Depends on
RUNTIME_TESTING_MENU && DEBUG_KERNEL && FPROBE && KUNIT=y
CONFIG_BACKTRACE_SELF_TEST Self test for the backtrace code
- Off
- Module
- Built in
This option provides a kernel module that can be used to test the kernel stack backtrace code. This option is not useful for distributions or general kernels, but only for kernel developers working on architecture code.
Note that if you want to also test saved backtraces, you will have to enable STACKTRACE as well.
Say N if you are unsure.
- Depends on
RUNTIME_TESTING_MENU && DEBUG_KERNEL
CONFIG_TEST_REF_TRACKER Self test for reference tracker
- Off
- Module
- Built in
This option provides a kernel module performing tests using reference tracker infrastructure.
Say N if you are unsure.
- Depends on
RUNTIME_TESTING_MENU && DEBUG_KERNEL && - Selects
REF_TRACKER if RUNTIME_TESTING_MENU && DEBUG_KERNEL &&
CONFIG_RBTREE_TEST Red-Black tree test
- Off
- Module
- Built in
A benchmark measuring the performance of the rbtree library. Also includes rbtree invariant checks.
- Depends on
RUNTIME_TESTING_MENU && DEBUG_KERNEL
CONFIG_REED_SOLOMON_TEST Reed-Solomon library test
- Off
- Module
- Built in
This option enables the self-test function of rslib at boot, or at module load time.
If unsure, say N.
- Depends on
RUNTIME_TESTING_MENU && (DEBUG_KERNEL || m && ) - Selects
REED_SOLOMON if RUNTIME_TESTING_MENU && (DEBUG_KERNEL || m && ) - Selects
REED_SOLOMON_ENC16 if RUNTIME_TESTING_MENU && (DEBUG_KERNEL || m && ) - Selects
REED_SOLOMON_DEC16 if RUNTIME_TESTING_MENU && (DEBUG_KERNEL || m && )
CONFIG_INTERVAL_TREE_TEST Interval tree test
- Off
- Module
- Built in
A benchmark measuring the performance of the interval tree library
- Depends on
RUNTIME_TESTING_MENU && DEBUG_KERNEL - Selects
INTERVAL_TREE if RUNTIME_TESTING_MENU && DEBUG_KERNEL
CONFIG_PERCPU_TEST Per cpu operations test
- Off
- Module
- Built in
Enable this option to build test module which validates per-cpu operations.
If unsure, say N.
- Depends on
RUNTIME_TESTING_MENU && m && && DEBUG_KERNEL
CONFIG_ATOMIC64_SELFTEST Perform an atomic64_t self-test
- Off
- Module
- Built in
Enable this option to test the atomic64_t functions at boot or at module load time.
If unsure, say N.
CONFIG_ASYNC_RAID6_TEST Self test for hardware accelerated raid6 recovery
- Off
- Module
- Built in
This is a one-shot self test that permutes through the recovery of all the possible two disk failure scenarios for a N-disk array. Recovery is performed with the asynchronous raid6 recovery routines, and will optionally use an offload engine if one is available.
If unsure, say N.
- Depends on
RUNTIME_TESTING_MENU && ASYNC_RAID6_RECOV - Selects
ASYNC_MEMCPY if RUNTIME_TESTING_MENU && ASYNC_RAID6_RECOV
CONFIG_TEST_HEXDUMP Test functions located in the hexdump module at runtime
- Off
- Module
- Built in
CONFIG_PRINTF_KUNIT_TEST KUnit test printf() family of functions at runtime
- Off
- Module
- Built in
Enable this option to test the printf functions at runtime.
If unsure, say N.
- Depends on
RUNTIME_TESTING_MENU && KUNIT
CONFIG_SCANF_KUNIT_TEST KUnit test scanf() family of functions at runtime
- Off
- Module
- Built in
Enable this option to test the scanf functions at runtime.
If unsure, say N.
- Depends on
RUNTIME_TESTING_MENU && KUNIT
CONFIG_SEQ_BUF_KUNIT_TEST KUnit test for seq_buf
- Off
- Module
- Built in
This builds unit tests for the seq_buf library.
If unsure, say N.
- Depends on
RUNTIME_TESTING_MENU && KUNIT
CONFIG_STRING_KUNIT_TEST KUnit test string functions at runtime
- Off
- Module
- Built in
- Depends on
RUNTIME_TESTING_MENU && KUNIT
CONFIG_STRING_HELPERS_KUNIT_TEST KUnit test string helpers at runtime
- Off
- Module
- Built in
- Depends on
RUNTIME_TESTING_MENU && KUNIT
CONFIG_STRING_KUNIT_BENCH Benchmark string functions at runtime
Enable performance measurement for string functions.
This measures the execution efficiency of string functions during the KUnit test run.
If unsure, say N.
- Depends on
RUNTIME_TESTING_MENU && STRING_KUNIT_TEST
CONFIG_FFS_KUNIT_TEST KUnit test ffs-family functions at runtime
- Off
- Module
- Built in
This builds KUnit tests for ffs-family bit manipulation functions including ffs(), __ffs(), fls(), __fls(), fls64(), and __ffs64().
These tests validate mathematical correctness, edge case handling, and cross-architecture consistency of bit scanning functions.
For more information on KUnit and unit tests in general, please refer to Documentation/dev-tools/kunit/.
- Depends on
RUNTIME_TESTING_MENU && KUNIT
CONFIG_TEST_KSTRTOX Test kstrto*() family of functions at runtime
- Off
- Module
- Built in
CONFIG_TEST_BITMAP Test bitmap_*() family of functions at runtime
- Off
- Module
- Built in
Enable this option to test the bitmap functions at boot.
If unsure, say N.
CONFIG_TEST_XARRAY Test the XArray code at runtime
- Off
- Module
- Built in
CONFIG_TEST_MAPLE_TREE Test the Maple Tree code at runtime or module load
- Off
- Module
- Built in
Enable this option to test the maple tree code functions at boot, or when the module is loaded. Enable "Debug Maple Trees" will enable more verbose output on failures.
If unsure, say N.
CONFIG_TEST_RHASHTABLE Perform selftest on resizable hash table
- Off
- Module
- Built in
Enable this option to test the rhashtable functions at boot.
If unsure, say N.
CONFIG_TEST_IDA Perform selftest on IDA functions
- Off
- Module
- Built in
CONFIG_TEST_MISC_MINOR miscdevice KUnit test
Kunit test for miscdevice API, specially its behavior in respect to static and dynamic minor numbers.
KUnit tests run during boot and output the results to the debug log in TAP format (https://testanything.org/). Only useful for kernel devs running the KUnit test harness, and not intended for inclusion into a production build.
For more information on KUnit and unit tests in general please refer to the KUnit documentation in Documentation/dev-tools/kunit/.
If unsure, say N.
- Depends on
RUNTIME_TESTING_MENU && KUNIT=y
CONFIG_TEST_PARMAN Perform selftest on priority array manager
- Off
- Module
- Built in
Enable this option to test priority array manager on boot (or module load).
If unsure, say N.
- Depends on
RUNTIME_TESTING_MENU && PARMAN
CONFIG_TEST_LKM Test module loading with 'hello world' module
- Off
- Module
- Built in
This builds the "test_module" module that emits "Hello, world" on printk when loaded. It is designed to be used for basic evaluation of the module loading subsystem (for example when validating module verification). It lacks any extra dependencies, and will not normally be loaded by the system unless explicitly requested by name.
If unsure, say N.
- Depends on
RUNTIME_TESTING_MENU && m &&
CONFIG_TEST_BITOPS Test module for compilation of bitops operations
- Off
- Module
- Built in
This builds the "test_bitops" module that is much like the TEST_LKM module except that it does a basic exercise of the set/clear_bit macros and get_count_order/long to make sure there are no compiler warnings from C=1 sparse checker or -Wextra compilations. It has no dependencies and doesn't run or load unless explicitly requested by name. for example: modprobe test_bitops.
If unsure, say N.
CONFIG_TEST_VMALLOC Test module for stress/performance analysis of vmalloc allocator
- Off
- Module
- Built in
This builds the "test_vmalloc" module that should be used for stress and performance analysis. So, any new change for vmalloc subsystem can be evaluated from performance and stability point of view.
If unsure, say N.
- Depends on
RUNTIME_TESTING_MENU &&
CONFIG_TEST_WORKQUEUE Test module for stress/performance analysis of workqueue
- Off
- Module
- Built in
This builds the "test_workqueue" module for benchmarking workqueue throughput under contention. Useful for evaluating affinity scope changes (e.g., cache_shard vs cache).
The test drives sysfs to switch affinity scopes, so it must be loaded after userspace has mounted sysfs; building it in (=y) would run module_init before /sys is available.
If unsure, say N.
- Depends on
RUNTIME_TESTING_MENU && m &&
CONFIG_FIND_BIT_BENCHMARK Test find_bit functions
- Off
- Module
- Built in
This builds the "test_find_bit" module that measure find_*_bit() functions performance.
If unsure, say N.
CONFIG_REGION_ALLOC_BENCHMARK Benchmark bitmap, IDA and Maple Tree region allocation
- Off
- Module
- Built in
This builds a microbenchmark comparing variable-sized region allocation using bitmaps, IDA and Maple Tree. The benchmark runs at initialization time.
Usage: insmod region_alloc_benchmark.ko insmod region_alloc_benchmark.ko capacities=1024,2048,4096,65536
If unsure, say N.
CONFIG_FIND_BIT_BENCHMARK_RUST Test find_bit functions in Rust
- Off
- Module
- Built in
This builds the "find_bit_benchmark_rust" module. It is a micro benchmark that measures the performance of Rust functions that correspond to the find_*_bit() operations in C. It follows the FIND_BIT_BENCHMARK closely but will in general not yield same numbers due to extra bounds checks and overhead of foreign function calls.
If unsure, say N.
- Depends on
RUNTIME_TESTING_MENU && RUST
CONFIG_TEST_FIRMWARE Test firmware loading via userspace interface
- Off
- Module
- Built in
This builds the "test_firmware" module that creates a userspace interface for testing firmware loading. This can be used to control the triggering of firmware loading without needing an actual firmware-using device. The contents can be rechecked by userspace.
If unsure, say N.
- Depends on
RUNTIME_TESTING_MENU && FW_LOADER
CONFIG_TEST_SYSCTL sysctl test driver
- Off
- Module
- Built in
This builds the "test_sysctl" module. This driver enables to test the proc sysctl interfaces available to drivers safely without affecting production knobs which might alter system functionality.
If unsure, say N.
- Depends on
RUNTIME_TESTING_MENU && SYSCTL
CONFIG_BITOPS_KUNIT KUnit test for bitops
- Off
- Module
- Built in
This option enables the KUnit test for the bitops library which provides functions for bit operations.
Note that this is derived from the original test_bitops module. For micro-benchmarks and compiler warning checks, enable TEST_BITOPS.
If unsure, say N.
- Depends on
RUNTIME_TESTING_MENU && KUNIT
CONFIG_BITFIELD_KUNIT KUnit test bitfield functions at runtime
- Off
- Module
- Built in
Enable this option to test the bitfield functions at boot.
KUnit tests run during boot and output the results to the debug log in TAP format (http://testanything.org/). Only useful for kernel devs running the KUnit test harness, and not intended for inclusion into a production build.
For more information on KUnit and unit tests in general please refer to the KUnit documentation in Documentation/dev-tools/kunit/.
If unsure, say N.
- Depends on
RUNTIME_TESTING_MENU && KUNIT
CONFIG_CHECKSUM_KUNIT KUnit test checksum functions at runtime
- Off
- Module
- Built in
Enable this option to test the checksum functions at boot.
KUnit tests run during boot and output the results to the debug log in TAP format (http://testanything.org/). Only useful for kernel devs running the KUnit test harness, and not intended for inclusion into a production build.
For more information on KUnit and unit tests in general please refer to the KUnit documentation in Documentation/dev-tools/kunit/.
If unsure, say N.
- Depends on
RUNTIME_TESTING_MENU && KUNIT
CONFIG_UTIL_MACROS_KUNIT KUnit test util_macros.h functions at runtime
- Off
- Module
- Built in
Enable this option to test the util_macros.h function at boot.
KUnit tests run during boot and output the results to the debug log in TAP format (http://testanything.org/). Only useful for kernel devs running the KUnit test harness, and not intended for inclusion into a production build.
For more information on KUnit and unit tests in general please refer to the KUnit documentation in Documentation/dev-tools/kunit/.
If unsure, say N.
- Depends on
RUNTIME_TESTING_MENU && KUNIT
CONFIG_HASH_KUNIT_TEST KUnit Test for integer hash functions
- Off
- Module
- Built in
Enable this option to test the kernel's string (<linux/stringhash.h>), and integer (<linux/hash.h>) hash functions on boot.
KUnit tests run during boot and output the results to the debug log in TAP format (https://testanything.org/). Only useful for kernel devs running the KUnit test harness, and not intended for inclusion into a production build.
For more information on KUnit and unit tests in general please refer to the KUnit documentation in Documentation/dev-tools/kunit/.
This is intended to help people writing architecture-specific optimized versions. If unsure, say N.
- Depends on
RUNTIME_TESTING_MENU && KUNIT
CONFIG_RESOURCE_KUNIT_TEST KUnit test for resource API
- Off
- Module
- Built in
This builds the resource API unit test. Tests the logic of API provided by resource.c and ioport.h. For more information on KUnit and unit tests in general please refer to the KUnit documentation in Documentation/dev-tools/kunit/.
If unsure, say N.
- Depends on
RUNTIME_TESTING_MENU && KUNIT
CONFIG_SYSCTL_KUNIT_TEST KUnit test for sysctl
- Off
- Module
- Built in
This builds the proc sysctl unit test, which runs on boot. Tests the API contract and implementation correctness of sysctl. For more information on KUnit and unit tests in general please refer to the KUnit documentation in Documentation/dev-tools/kunit/.
If unsure, say N.
- Depends on
RUNTIME_TESTING_MENU && KUNIT
CONFIG_ERRSEQ_KUNIT_TEST KUnit test for errseq
- Off
- Module
- Built in
This builds the errseq KUnit test suite. It tests the documented semantics of the errseq_t error-tracking infrastructure (lib/errseq.c), which underpins writeback error reporting.
For more information on KUnit and unit tests in general please refer to the KUnit documentation in Documentation/dev-tools/kunit/.
If unsure, say N.
- Depends on
RUNTIME_TESTING_MENU && KUNIT
CONFIG_KFIFO_KUNIT_TEST KUnit Test for the generic kernel FIFO implementation
- Off
- Module
- Built in
This builds the generic FIFO implementation KUnit test suite. It tests that the API and basic functionality of the kfifo type and associated macros.
For more information on KUnit and unit tests in general please refer to the KUnit documentation in Documentation/dev-tools/kunit/.
If unsure, say N.
- Depends on
RUNTIME_TESTING_MENU && KUNIT
CONFIG_LIST_KUNIT_TEST KUnit Test for Kernel Linked-list structures
- Off
- Module
- Built in
This builds the linked list KUnit test suite. It tests that the API and basic functionality of the list_head type and associated macros.
KUnit tests run during boot and output the results to the debug log in TAP format (https://testanything.org/). Only useful for kernel devs running the KUnit test harness, and not intended for inclusion into a production build.
For more information on KUnit and unit tests in general please refer to the KUnit documentation in Documentation/dev-tools/kunit/.
If unsure, say N.
- Depends on
RUNTIME_TESTING_MENU && KUNIT
CONFIG_LIST_PRIVATE_KUNIT_TEST KUnit Test for Kernel Private Linked-list structures
- Off
- Module
- Built in
This builds the KUnit test for the private linked-list primitives defined in include/linux/list_private.h.
These primitives allow manipulation of list_head members that are marked as private and require special accessors (ACCESS_PRIVATE) to strip qualifiers or handle encapsulation.
If unsure, say N.
- Depends on
RUNTIME_TESTING_MENU && KUNIT
CONFIG_HASHTABLE_KUNIT_TEST KUnit Test for Kernel Hashtable structures
- Off
- Module
- Built in
This builds the hashtable KUnit test suite. It tests the basic functionality of the API defined in include/linux/hashtable.h. For more information on KUnit and unit tests in general please refer to the KUnit documentation in Documentation/dev-tools/kunit/.
If unsure, say N.
- Depends on
RUNTIME_TESTING_MENU && KUNIT
CONFIG_LINEAR_RANGES_TEST KUnit test for linear_ranges
- Off
- Module
- Built in
This builds the linear_ranges unit test, which runs on boot. Tests the linear_ranges logic correctness. For more information on KUnit and unit tests in general please refer to the KUnit documentation in Documentation/dev-tools/kunit/.
If unsure, say N.
- Depends on
RUNTIME_TESTING_MENU && KUNIT - Selects
LINEAR_RANGES if RUNTIME_TESTING_MENU && KUNIT
CONFIG_CONTEXT_ANALYSIS_TEST Compiler context-analysis warnings test
This builds the test for compiler-based context analysis. The test does not add executable code to the kernel, but is meant to test that common patterns supported by the analysis do not result in false positive warnings.
When adding support for new context locks, it is strongly recommended to add supported patterns to this test.
If unsure, say N.
- Depends on
RUNTIME_TESTING_MENU && EXPERT
CONFIG_LIVEUPDATE_TEST Live Update Kernel Test
Enable a built-in kernel test module for the Live Update Orchestrator.
This module validates the File-Lifecycle-Bound subsystem by registering a set of mock FLB objects with any real file handlers that support live update (such as the memfd handler).
When live update operations are performed, this test module will output messages to the kernel log (dmesg), confirming that its registration and various callback functions (preserve, retrieve, finish, etc.) are being invoked correctly.
This is a debugging and regression testing tool for developers working on the Live Update subsystem. It should not be enabled in production kernels.
If unsure, say N
- Depends on
RUNTIME_TESTING_MENU && LIVEUPDATE
CONFIG_DIMLIB_KUNIT_TEST KUnit test for the DIM library
- Off
- Module
- Built in
This builds the KUnit test for the Dynamic Interrupt Moderation library (lib/dim/), which checks the rate statistics computed by dim_calc_stats().
For more information on KUnit and unit tests in general please refer to the KUnit documentation in Documentation/dev-tools/kunit/.
If unsure, say N.
- Depends on
RUNTIME_TESTING_MENU && KUNIT && NET - Selects
DIMLIB if RUNTIME_TESTING_MENU && KUNIT && NET
CONFIG_CMDLINE_KUNIT_TEST KUnit test for cmdline API
- Off
- Module
- Built in
This builds the cmdline API unit test. Tests the logic of API provided by cmdline.c. For more information on KUnit and unit tests in general please refer to the KUnit documentation in Documentation/dev-tools/kunit/.
If unsure, say N.
- Depends on
RUNTIME_TESTING_MENU && KUNIT
CONFIG_BASE64_KUNIT KUnit test for base64 decoding and encoding
- Off
- Module
- Built in
This builds the base64 unit tests.
The tests cover the encoding and decoding logic of Base64 functions in the kernel. In addition to correctness checks, simple performance benchmarks for both encoding and decoding are also included.
For more information on KUnit and unit tests in general please refer to the KUnit documentation in Documentation/dev-tools/kunit/.
If unsure, say N.
- Depends on
RUNTIME_TESTING_MENU && KUNIT
CONFIG_BITS_TEST KUnit test for bit functions and macros
- Off
- Module
- Built in
This builds the bits unit test. Tests the logic of macros defined in bits.h. For more information on KUnit and unit tests in general please refer to the KUnit documentation in Documentation/dev-tools/kunit/.
If unsure, say N.
- Depends on
RUNTIME_TESTING_MENU && KUNIT
CONFIG_SHDI3_KUNIT_TEST KUnit test for __ashldi3(), __ashrdi3(), and __lshrdi3()
- Off
- Module
- Built in
This builds the unit test for __ashldi3(), __ashrdi3(), and __lshrdi3() helper functions used to implement 64-bit arithmetic shift left, arithmetic shift right and logical shift right, respectively, on a 32-bit CPUs.
- Depends on
RUNTIME_TESTING_MENU && KUNIT && (ARM || XTENSA || MICROBLAZE || (RISCV || SPARC) && !)
CONFIG_SLUB_KUNIT_TEST KUnit test for SLUB cache error detection
- Off
- Module
- Built in
This builds SLUB allocator unit test. Tests SLUB cache debugging functionality. For more information on KUnit and unit tests in general please refer to the KUnit documentation in Documentation/dev-tools/kunit/.
If unsure, say N.
- Depends on
RUNTIME_TESTING_MENU && SLUB_DEBUG && KUNIT
CONFIG_RATIONAL_KUNIT_TEST KUnit test for rational.c
- Off
- Module
- Built in
This builds the rational math unit test. For more information on KUnit and unit tests in general please refer to the KUnit documentation in Documentation/dev-tools/kunit/.
If unsure, say N.
- Depends on
RUNTIME_TESTING_MENU && KUNIT && RATIONAL
CONFIG_MEMCPY_KUNIT_TEST Test memcpy(), memmove(), and memset() functions at runtime
- Off
- Module
- Built in
Builds unit tests for memcpy(), memmove(), and memset() functions. For more information on KUnit and unit tests in general please refer to the KUnit documentation in Documentation/dev-tools/kunit/.
If unsure, say N.
- Depends on
RUNTIME_TESTING_MENU && KUNIT
CONFIG_MIN_HEAP_KUNIT_TEST Min heap test
- Off
- Module
- Built in
This option enables the KUnit test suite for the min heap library which provides functions for creating and managing min heaps. The test suite checks the functionality of the min heap library.
If unsure, say N
- Depends on
RUNTIME_TESTING_MENU && KUNIT
CONFIG_IS_SIGNED_TYPE_KUNIT_TEST Test is_signed_type() macro
- Off
- Module
- Built in
Builds unit tests for the is_signed_type() macro.
For more information on KUnit and unit tests in general please refer to the KUnit documentation in Documentation/dev-tools/kunit/.
If unsure, say N.
- Depends on
RUNTIME_TESTING_MENU && KUNIT
CONFIG_OVERFLOW_KUNIT_TEST Test check_*_overflow() functions at runtime
- Off
- Module
- Built in
Builds unit tests for the check_*_overflow(), size_*(), allocation, and related functions.
For more information on KUnit and unit tests in general please refer to the KUnit documentation in Documentation/dev-tools/kunit/.
If unsure, say N.
- Depends on
RUNTIME_TESTING_MENU && KUNIT
CONFIG_RANDSTRUCT_KUNIT_TEST Test randstruct structure layout randomization at runtime
- Off
- Module
- Built in
Builds unit tests for the checking CONFIG_RANDSTRUCT=y, which randomizes structure layouts.
- Depends on
RUNTIME_TESTING_MENU && KUNIT
CONFIG_STACKINIT_KUNIT_TEST Test level of stack variable initialization
- Off
- Module
- Built in
Test if the kernel is zero-initializing stack variables and padding. Coverage is controlled by compiler flags, CONFIG_INIT_STACK_ALL_PATTERN or CONFIG_INIT_STACK_ALL_ZERO.
- Depends on
RUNTIME_TESTING_MENU && KUNIT
CONFIG_FORTIFY_KUNIT_TEST Test fortified str*() and mem*() function internals at runtime
- Off
- Module
- Built in
Builds unit tests for checking internals of FORTIFY_SOURCE as used by the str*() and mem*() family of functions. For testing runtime traps of FORTIFY_SOURCE, see LKDTM's "FORTIFY_*" tests.
- Depends on
RUNTIME_TESTING_MENU && KUNIT
CONFIG_LONGEST_SYM_KUNIT_TEST Test the longest symbol possible
- Off
- Module
- Built in
Tests the longest symbol possible
If unsure, say N.
- Depends on
RUNTIME_TESTING_MENU && KUNIT && KPROBES && !CALL_PADDING && !CFI && !GCOV_KERNEL
CONFIG_HW_BREAKPOINT_KUNIT_TEST Test hw_breakpoint constraints accounting
Tests for hw_breakpoint constraints accounting.
If unsure, say N.
- Depends on
RUNTIME_TESTING_MENU && HAVE_HW_BREAKPOINT && KUNIT=y
CONFIG_USERCOPY_KUNIT_TEST KUnit Test for user/kernel boundary protections
- Off
- Module
- Built in
This builds the "usercopy_kunit" module that runs sanity checks on the copy_to/from_user infrastructure, making sure basic user/kernel boundary testing is working.
- Depends on
RUNTIME_TESTING_MENU && KUNIT
CONFIG_BLACKHOLE_DEV_KUNIT_TEST Test blackhole netdev functionality
- Off
- Module
- Built in
This builds the "blackhole_dev_kunit" module that validates the data path through this blackhole netdev.
If unsure, say N.
- Depends on
RUNTIME_TESTING_MENU && NET && KUNIT
CONFIG_TEST_UDELAY udelay test driver
- Off
- Module
- Built in
This builds the "udelay_test" module that helps to make sure that udelay() is working properly.
If unsure, say N.
CONFIG_TEST_STATIC_KEYS Test static keys
- Off
- Module
- Built in
Test the static key interfaces.
If unsure, say N.
- Depends on
RUNTIME_TESTING_MENU && m &&
CONFIG_TEST_DYNAMIC_DEBUG Test DYNAMIC_DEBUG
- Off
- Module
- Built in
This module registers a tracer callback to count enabled pr_debugs in a 'do_debugging' function, then alters their enablements, calls the function, and compares counts.
If unsure, say N.
- Depends on
RUNTIME_TESTING_MENU && DYNAMIC_DEBUG
CONFIG_TEST_KMOD kmod stress tester
- Off
- Module
- Built in
Test the kernel's module loading mechanism: kmod. kmod implements support to load modules using the Linux kernel's usermode helper. This test provides a series of tests against kmod.
Although technically you can either build test_kmod as a module or into the kernel we disallow building it into the kernel since it stress tests request_module() and this will very likely cause some issues by taking over precious threads available from other module load requests, ultimately this could be fatal.
To run tests run:
tools/testing/selftests/kmod/kmod.sh --help
If unsure, say N.
- Depends on
RUNTIME_TESTING_MENU && m && - Selects
TEST_LKM if RUNTIME_TESTING_MENU && m &&
CONFIG_TEST_RUNTIME
CONFIG_TEST_RUNTIME_MODULE
CONFIG_TEST_KALLSYMS module kallsyms find_symbol() test
- Off
- Module
- Built in
This allows us to stress test find_symbol() through the kallsyms used to place symbols on the kernel ELF kallsyms and modules kallsyms where we place kernel symbols such as exported symbols.
We have four test modules:
A: has KALLSYSMS_NUMSYMS exported symbols B: uses one of A's symbols C: adds KALLSYMS_SCALE_FACTOR * KALLSYSMS_NUMSYMS exported D: adds 2 * the symbols than C
We stress test find_symbol() through two means:
1) Upon load of B it will trigger simplify_symbols() to look for the one symbol it uses from the module A with tons of symbols. This is an indirect way for us to have B call resolve_symbol_wait() upon module load. This will eventually call find_symbol() which will eventually try to find the symbols used with find_exported_symbol_in_section(). find_exported_symbol_in_section() uses bsearch() so a binary search for each symbol. Binary search will at worst be O(log(n)) so the larger TEST_MODULE_KALLSYSMS the worse the search.
2) The selftests should load C first, before B. Upon B's load towards the end right before we call module B's init routine we get complete_formation() called on the module. That will first check for duplicate symbols with the call to verify_exported_symbols(). That is when we'll force iteration on module C's insane symbol list. Since it has 10 * KALLSYMS_NUMSYMS it means we can first test just loading B without C. The amount of time it takes to load C Vs B can give us an idea of the impact growth of the symbol space and give us projection. Module A only uses one symbol from B so to allow this scaling in module C to be proportional, if it used more symbols then the first test would be doing more and increasing just the search space would be slightly different. The last module, module D will just increase the search space by twice the number of symbols in C so to allow for full projects.
tools/testing/selftests/module/find_symbol.sh
The current defaults will incur a build delay of about 7 minutes on an x86_64 with only 8 cores. Enable this only if you want to stress test find_symbol() with thousands of symbols. At the same time this is also useful to test building modules with thousands of symbols, and if BTF is enabled this also stress tests adding BTF information for each module. Currently enabling many more symbols will segfault the build system.
If unsure, say N.
- Depends on
RUNTIME_TESTING_MENU && m && - Selects
TEST_RUNTIME if RUNTIME_TESTING_MENU && m && - Selects
TEST_RUNTIME_MODULE if RUNTIME_TESTING_MENU && m && - Selects
TEST_KALLSYMS_A if RUNTIME_TESTING_MENU && m && - Selects
TEST_KALLSYMS_B if RUNTIME_TESTING_MENU && m && - Selects
TEST_KALLSYMS_C if RUNTIME_TESTING_MENU && m && - Selects
TEST_KALLSYMS_D if RUNTIME_TESTING_MENU && m &&
If TEST_KALLSYMS
- Depends on
RUNTIME_TESTING_MENU && TEST_KALLSYMS
CONFIG_TEST_KALLSYMS_A
- Off
- Module
- Built in
- Depends on
RUNTIME_TESTING_MENU && TEST_KALLSYMS && m &&
CONFIG_TEST_KALLSYMS_B
- Off
- Module
- Built in
- Depends on
RUNTIME_TESTING_MENU && TEST_KALLSYMS && m &&
CONFIG_TEST_KALLSYMS_C
- Off
- Module
- Built in
- Depends on
RUNTIME_TESTING_MENU && TEST_KALLSYMS && m &&
CONFIG_TEST_KALLSYMS_D
- Off
- Module
- Built in
- Depends on
RUNTIME_TESTING_MENU && TEST_KALLSYMS && m &&
Kallsym test range
Selecting something other than "Fast" will enable tests which slow down the build and may crash your build.
- Depends on
RUNTIME_TESTING_MENU && TEST_KALLSYMS
CONFIG_TEST_KALLSYMS_FAST Fast builds
You won't really be testing kallsysms, so this just helps fast builds when allmodconfig is used..
- Depends on
RUNTIME_TESTING_MENU && TEST_KALLSYMS
CONFIG_TEST_KALLSYMS_LARGE Enable testing kallsyms with large exports
This will enable larger number of symbols. This will slow down your build considerably.
- Depends on
RUNTIME_TESTING_MENU && TEST_KALLSYMS
CONFIG_TEST_KALLSYMS_MAX Known kallsysms limits
This will enable exports to the point we know we'll start crashing builds.
- Depends on
RUNTIME_TESTING_MENU && TEST_KALLSYMS
CONFIG_TEST_KALLSYMS_NUMSYMS test kallsyms number of symbols
The number of symbols to create on TEST_KALLSYMS_A, only one of which module TEST_KALLSYMS_B will use. This also will be used for how many symbols TEST_KALLSYMS_C will have, scaled up by TEST_KALLSYMS_SCALE_FACTOR. Note that setting this to 10,000 will trigger a segfault today, don't use anything close to it unless you are aware that this should not be used for automated build tests.
- Depends on
RUNTIME_TESTING_MENU && TEST_KALLSYMS - Range
[2 10000] if RUNTIME_TESTING_MENU && TEST_KALLSYMS
CONFIG_TEST_KALLSYMS_SCALE_FACTOR test kallsyms scale factor
How many more unusued symbols will TEST_KALLSYSMS_C have than TEST_KALLSYMS_A. If 8, then module C will have 8 * syms than module A. Then TEST_KALLSYMS_D will have double the amount of symbols than C so to allow projections.
- Depends on
RUNTIME_TESTING_MENU && TEST_KALLSYMS
CONFIG_TEST_DEBUG_VIRTUAL Test CONFIG_DEBUG_VIRTUAL feature
- Off
- Module
- Built in
Test the kernel's ability to detect incorrect calls to virt_to_phys() done against the non-linear part of the kernel's virtual address map.
If unsure, say N.
- Depends on
RUNTIME_TESTING_MENU && DEBUG_VIRTUAL
CONFIG_TEST_MEMCAT_P Test memcat_p() helper function
- Off
- Module
- Built in
Test the memcat_p() helper for correctly merging two pointer arrays together.
If unsure, say N.
CONFIG_TEST_OBJAGG Perform selftest on object aggreration manager
- Off
- Module
- Built in
Enable this option to test object aggregation manager on boot (or module load).
- Depends on
RUNTIME_TESTING_MENU && OBJAGG
CONFIG_TEST_MEMINIT Test heap/page initialization
- Off
- Module
- Built in
Test if the kernel is zero-initializing heap and page allocations. This can be useful to test init_on_alloc and init_on_free features.
If unsure, say N.
CONFIG_TEST_HMM Test HMM (Heterogeneous Memory Management)
- Off
- Module
- Built in
This is a pseudo device driver solely for testing HMM. Say M here if you want to build the HMM test module. Doing so will allow you to run tools/testing/selftest/vm/hmm-tests.
If unsure, say N.
- Depends on
RUNTIME_TESTING_MENU && TRANSPARENT_HUGEPAGE && DEVICE_PRIVATE - Selects
HMM_MIRROR if RUNTIME_TESTING_MENU && TRANSPARENT_HUGEPAGE && DEVICE_PRIVATE - Selects
MMU_NOTIFIER if RUNTIME_TESTING_MENU && TRANSPARENT_HUGEPAGE && DEVICE_PRIVATE
CONFIG_TEST_FREE_PAGES Test freeing pages
- Off
- Module
- Built in
Test that a memory leak does not occur due to a race between freeing a block of pages and a speculative page reference. Loading this module is safe if your kernel has the bug fixed. If the bug is not fixed, it will leak gigabytes of memory and probably OOM your system.
CONFIG_TEST_FPU Test floating point operations in kernel space
- Off
- Module
- Built in
Enable this option to add /sys/kernel/debug/selftest_helpers/test_fpu which will trigger a sequence of floating point operations. This is used for self-testing floating point control register setting in kernel_fpu_begin().
If unsure, say N.
- Depends on
RUNTIME_TESTING_MENU && ARCH_HAS_KERNEL_FPU_SUPPORT && !KCOV_INSTRUMENT_ALL
CONFIG_TEST_CLOCKSOURCE_WATCHDOG Test clocksource watchdog in kernel space
- Off
- Module
- Built in
Enable this option to create a kernel module that will trigger a test of the clocksource watchdog. This module may be loaded via modprobe or insmod in which case it will run upon being loaded, or it may be built in, in which case it will run shortly after boot.
If unsure, say N.
- Depends on
RUNTIME_TESTING_MENU && CLOCKSOURCE_WATCHDOG
CONFIG_TEST_OBJPOOL Test module for correctness and stress of objpool
- Off
- Module
- Built in
This builds the "test_objpool" module that should be used for correctness verification and concurrent testings of objects allocation and reclamation.
If unsure, say N.
- Depends on
RUNTIME_TESTING_MENU && m && && DEBUG_KERNEL
CONFIG_TEST_KEXEC_HANDOVER Test for Kexec HandOver
This option enables test for Kexec HandOver (KHO). The test consists of two parts: saving kernel data before kexec and restoring the data after kexec and verifying that it was properly handed over. This test module creates and saves data on the boot of the first kernel and restores and verifies the data on the boot of kexec'ed kernel.
For detailed documentation about KHO, see Documentation/core-api/kho.
To run the test run:
tools/testing/selftests/kho/vmtest.sh -h
If unsure, say N.
- Depends on
RUNTIME_TESTING_MENU && KEXEC_HANDOVER
CONFIG_RATELIMIT_KUNIT_TEST KUnit Test for correctness and stress of ratelimit
- Off
- Module
- Built in
This builds the "test_ratelimit" module that should be used for correctness verification and concurrent testings of rate limiting.
If unsure, say N.
- Depends on
RUNTIME_TESTING_MENU && KUNIT
CONFIG_UUID_KUNIT_TEST KUnit test for UUID
- Off
- Module
- Built in
This option enables the KUnit test suite for the uuid library, which provides functions for generating and parsing UUID and GUID. The test suite checks parsing of UUID and GUID strings.
If unsure, say N.
- Depends on
RUNTIME_TESTING_MENU && KUNIT
CONFIG_INT_POW_KUNIT_TEST Integer exponentiation (int_pow) test
- Off
- Module
- Built in
This option enables the KUnit test suite for the int_pow function, which performs integer exponentiation. The test suite is designed to verify that the implementation of int_pow correctly computes the power of a given base raised to a given exponent.
Enabling this option will include tests that check various scenarios and edge cases to ensure the accuracy and reliability of the exponentiation function.
If unsure, say N
- Depends on
RUNTIME_TESTING_MENU && KUNIT
CONFIG_INT_SQRT_KUNIT_TEST Integer square root test
- Off
- Module
- Built in
This option enables the KUnit test suite for the int_sqrt() function, which performs square root calculation. The test suite checks various scenarios, including edge cases, to ensure correctness.
Enabling this option will include tests that check various scenarios and edge cases to ensure the accuracy and reliability of the square root function.
If unsure, say N
- Depends on
RUNTIME_TESTING_MENU && KUNIT
CONFIG_INT_LOG_KUNIT_TEST Integer log (int_log) test
- Off
- Module
- Built in
This option enables the KUnit test suite for the int_log library, which provides two functions to compute the integer logarithm in base 2 and base 10, called respectively as intlog2 and intlog10.
If unsure, say N
- Depends on
RUNTIME_TESTING_MENU && KUNIT
CONFIG_GCD_KUNIT_TEST Greatest common divisor test
- Off
- Module
- Built in
This option enables the KUnit test suite for the gcd() function, which computes the greatest common divisor of two numbers.
This test suite verifies the correctness of gcd() across various scenarios, including edge cases.
If unsure, say N
- Depends on
RUNTIME_TESTING_MENU && KUNIT
CONFIG_POLYNOMIAL_KUNIT_TEST Polynomial calculation (polynomial_calc) test
- Off
- Module
- Built in
This option enables the KUnit test suite for the polynomial_calc() function, which evaluates integer polynomials using factor redistribution to avoid overflow.
The test suite verifies correctness for constant, linear, and quadratic polynomials, negative coefficients, per-step dividers, divider_leftover, total_divider scaling, and a real sensor N-to-temperature conversion polynomial.
If unsure, say N
- Depends on
RUNTIME_TESTING_MENU && KUNIT - Selects
POLYNOMIAL if RUNTIME_TESTING_MENU && KUNIT
CONFIG_PRIME_NUMBERS_KUNIT_TEST Prime number generator test
- Off
- Module
- Built in
This option enables the KUnit test suite for the {is,next}_prime_number functions.
Enabling this option will include tests that compare the prime number generator functions against a brute force implementation.
If unsure, say N
- Depends on
RUNTIME_TESTING_MENU && KUNIT && PRIME_NUMBERS
CONFIG_GLOB_KUNIT_TEST Glob matching test
- Off
- Module
- Built in
Enable this option to test the glob functions at runtime.
This test suite verifies the correctness of glob_match() across various scenarios, including edge cases.
If unsure, say N
- Depends on
RUNTIME_TESTING_MENU && GLOB && KUNIT
CONFIG_PRANDOM_KUNIT_TEST KUnit test for prandom
- Off
- Module
- Built in
Enable this option to test the prandom functions at runtime.
If unsure, say N
- Depends on
RUNTIME_TESTING_MENU && KUNIT
CONFIG_ARCH_USE_MEMTEST
An architecture should select this when it uses early_memtest() during boot process.
CONFIG_MEMTEST Memtest
This option adds a kernel parameter 'memtest', which allows memtest
to be set and executed.
memtest=0, mean disabled; -- default
memtest=1, mean do 1 test pattern;
...
memtest=17, mean do 17 test patterns.
If you are unsure how to answer this question, answer N.
- Depends on
ARCH_USE_MEMTEST
CONFIG_HYPERV_TESTING Microsoft Hyper-V driver testing
Select this option to enable Hyper-V vmbus testing.
Rust hacking
CONFIG_RUST_DEBUG_ASSERTIONS Debug assertions
Enables rustc's `-Cdebug-assertions` codegen option.
This flag lets you turn `cfg(debug_assertions)` conditional compilation on or off. This can be used to enable extra debugging code in development but not in production. For example, it controls the behavior of the standard library's `debug_assert!` macro.
Note that this will apply to all Rust code, including `core`.
If unsure, say N.
- Depends on
RUST
CONFIG_RUST_OVERFLOW_CHECKS Overflow checks
Enables rustc's `-Coverflow-checks` codegen option.
This flag allows you to control the behavior of runtime integer overflow. When overflow-checks are enabled, a Rust panic will occur on overflow.
Note that this will apply to all Rust code, including `core`.
If unsure, say Y.
- Depends on
RUST
CONFIG_RUST_BUILD_ASSERT_ALLOW Allow unoptimized build-time assertions
Controls how `build_error!` and `build_assert!` are handled during the build.
If calls to them exist in the binary, it may indicate a violated invariant or that the optimizer failed to verify the invariant during compilation.
This should not happen, thus by default the build is aborted. However, as an escape hatch, you can choose Y here to ignore them during build and let the check be carried at runtime (with `panic!` being called if the check fails).
If unsure, say N.
- Depends on
RUST
CONFIG_RUST_KERNEL_DOCTESTS Doctests for the `kernel` crate
This builds the documentation tests of the `kernel` crate as KUnit tests.
For more information on KUnit and unit tests in general, please refer to the KUnit documentation in Documentation/dev-tools/kunit/.
If unsure, say N.
CONFIG_RUST_INLINE_HELPERS Inline C helpers into Rust code (EXPERIMENTAL)
Inlines C helpers into Rust code using Link Time Optimization.
If this option is enabled, C helper functions declared in rust/helpers/ are inlined into Rust code, which is helpful for performance of Rust code. This requires a matching LLVM version for Clang and rustc.
If you are sure that you're using Clang and rustc with matching LLVM versions, say Y. Otherwise say N.
- Depends on
RUST && RUSTC_CLANG_LLVM_COMPATIBLE && EXPERT && (ARM64 || ) && !UML
- arch/alpha/Kconfig:101
- arch/arc/Kconfig:76
- arch/arm/Kconfig:246
- arch/arm64/Kconfig:355
- arch/csky/Kconfig:151
- arch/loongarch/Kconfig:265
- arch/m68k/Kconfig:61
- arch/microblaze/Kconfig:75
- arch/mips/Kconfig:1078
- arch/nios2/Kconfig:37
- arch/parisc/Kconfig:140
- arch/riscv/Kconfig:331
- arch/sh/Kconfig:91
- arch/sparc/Kconfig:194
- arch/um/Kconfig:86
- arch/x86/Kconfig:396
- arch/xtensa/Kconfig:440
- arch/alpha/Kconfig:89
- arch/arc/Kconfig:70
- arch/arm/Kconfig:319
- arch/arm64/Kconfig:278
- arch/csky/Kconfig:160
- arch/hexagon/Kconfig:57
- arch/loongarch/Kconfig:787
- arch/m68k/Kconfig:84
- arch/microblaze/Kconfig:93
- arch/mips/Kconfig:3046
- arch/nios2/Kconfig:69
- arch/openrisc/Kconfig:54
- arch/parisc/Kconfig:106
- arch/powerpc/Kconfig:30
- arch/riscv/Kconfig:292
- arch/s390/Kconfig:2
- arch/sh/mm/Kconfig:4
- arch/sparc/Kconfig:140
- arch/um/Kconfig:52
- arch/x86/Kconfig:356
- arch/xtensa/Kconfig:94
- arch/alpha/Kconfig:465
- arch/arc/Kconfig:167
- arch/arm/Kconfig:910
- arch/arm64/Kconfig:358
- arch/csky/Kconfig:313
- arch/hexagon/Kconfig:104
- arch/loongarch/Kconfig:513
- arch/mips/Kconfig:2700
- arch/openrisc/Kconfig:191
- arch/parisc/Kconfig:314
- arch/powerpc/platforms/Kconfig.cputype:550
- arch/riscv/Kconfig:437
- arch/s390/Kconfig:530
- arch/sh/Kconfig:560
- arch/sparc/Kconfig:158
- arch/um/Kconfig:97
- arch/x86/Kconfig:437
- arch/xtensa/Kconfig:245
- arch/alpha/Kconfig:484
- arch/arc/Kconfig:175
- arch/arm/Kconfig:1063
- arch/arm64/Kconfig:1702
- arch/csky/Kconfig:318
- arch/hexagon/Kconfig:109
- arch/loongarch/Kconfig:542
- arch/m68k/Kconfig.cpu:552
- arch/microblaze/Kconfig:123
- arch/mips/Kconfig:2756
- arch/nios2/Kconfig:72
- arch/openrisc/Kconfig:185
- arch/parisc/Kconfig:367
- arch/powerpc/platforms/Kconfig.cputype:570
- arch/riscv/Kconfig:450
- arch/s390/Kconfig:533
- arch/sh/Kconfig:582
- arch/sparc/Kconfig:180
- arch/um/Kconfig:132
- arch/x86/Kconfig:1037
- arch/xtensa/Kconfig:253
- arch/alpha/Kconfig:116
- arch/arc/Kconfig:82
- arch/arm/Kconfig:222
- arch/arm64/Kconfig:331
- arch/csky/Kconfig:163
- arch/hexagon/Kconfig:69
- arch/loongarch/Kconfig:282
- arch/microblaze/Kconfig:81
- arch/mips/Kconfig:3001
- arch/openrisc/Kconfig:68
- arch/parisc/Kconfig:167
- arch/powerpc/Kconfig:101
- arch/riscv/Kconfig:320
- arch/s390/Kconfig:11
- arch/sh/Kconfig:111
- arch/sparc/Kconfig:125
- arch/um/Kconfig:81
- arch/x86/Kconfig:353
- arch/xtensa/Kconfig:91
- arch/alpha/Kconfig:119
- arch/arc/Kconfig:58
- arch/arm/Kconfig:226
- arch/arm64/Kconfig:338
- arch/csky/Kconfig:113
- arch/hexagon/Kconfig:51
- arch/loongarch/Kconfig:278
- arch/microblaze/Kconfig:84
- arch/mips/Kconfig:2997
- arch/openrisc/Kconfig:71
- arch/parisc/Kconfig:170
- arch/powerpc/Kconfig:105
- arch/riscv/Kconfig:353
- arch/s390/Kconfig:8
- arch/sh/Kconfig:114
- arch/sparc/Kconfig:129
- arch/um/Kconfig:77
- arch/x86/Kconfig:350
- arch/xtensa/Kconfig:88