kernel/module/Kconfig

Source file repositories/reference/linux-study-clean/kernel/module/Kconfig

File Facts

System
Linux kernel
Corpus path
kernel/module/Kconfig
Extension
[no extension]
Size
16690 bytes
Lines
464
Domain
Core OS
Bucket
Scheduler, Processes, Timers, Sync, And Syscalls
Inferred role
Core OS: exported/initcall integration point
Status
integration implementation candidate

Why This File Exists

Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.

Dependency Surface

Detected Declarations

Annotated Snippet

# SPDX-License-Identifier: GPL-2.0-only
menuconfig MODULES
	bool "Enable loadable module support"
	modules
	select EXECMEM
	help
	  Kernel modules are small pieces of compiled code which can
	  be inserted in the running kernel, rather than being
	  permanently built into the kernel.  You use the "modprobe"
	  tool to add (and sometimes remove) them.  If you say Y here,
	  many parts of the kernel can be built as modules (by
	  answering M instead of Y where indicated): this is most
	  useful for infrequently used options which are not required
	  for booting.  For more information, see the man pages for
	  modprobe, lsmod, modinfo, insmod and rmmod.

	  If you say Y here, you will need to run "make
	  modules_install" to put the modules under /lib/modules/
	  where modprobe can find them (you may need to be root to do
	  this).

	  If unsure, say Y.

if MODULES

config MODULE_DEBUGFS
	bool

config MODULE_DEBUG
	bool "Module debugging"
	depends on DEBUG_FS
	help
	  Allows you to enable / disable features which can help you debug
	  modules. You don't need these options on production systems.

if MODULE_DEBUG

config MODULE_STATS
	bool "Module statistics"
	depends on DEBUG_FS
	select MODULE_DEBUGFS
	help
	  This option allows you to maintain a record of module statistics.
	  For example, size of all modules, average size, text size, a list
	  of failed modules and the size for each of those. For failed
	  modules we keep track of modules which failed due to either the
	  existing module taking too long to load or that module was already
	  loaded.

	  You should enable this if you are debugging production loads
	  and want to see if userspace or the kernel is doing stupid things
	  with loading modules when it shouldn't or if you want to help
	  optimize userspace / kernel space module autoloading schemes.
	  You might want to do this because failed modules tend to use
	  up significant amount of memory, and so you'd be doing everyone a
	  favor in avoiding these failures proactively.

	  This functionality is also useful for those experimenting with
	  module .text ELF section optimization.

	  If unsure, say N.

config MODULE_DEBUG_AUTOLOAD_DUPS
	bool "Debug duplicate modules with auto-loading"
	help
	  Module autoloading allows in-kernel code to request modules through
	  the *request_module*() API calls. This in turn just calls userspace
	  modprobe. Although modprobe checks to see if a module is already
	  loaded before trying to load a module there is a small time window in
	  which multiple duplicate requests can end up in userspace and multiple

Annotation

Implementation Notes