Loadable kernel module

LKMs are typically used to add support for new hardware (as device drivers) and/or filesystems, or for adding system calls.

When the functionality provided by an LKM is no longer required, it can be unloaded in order to free memory and other resources.

[citation needed] Loadable kernel modules in Linux are loaded (and unloaded) by the modprobe command.

In emergency cases, when the system fails to boot due to e.g. broken modules, specific modules can be enabled or disabled by modifying the kernel boot parameters list (for example, if using GRUB, by pressing 'e' in the GRUB start menu, then editing the kernel parameter line).

The Linux maintainers tolerate the distribution of proprietary modules (such as NVIDIA GPU drivers),[citation needed] but allow only GNU General Public License (GPL) modules to merge to kernel tree of mainline Linux kernel.

Loading a proprietary or non-GPL-compatible module will set a 'taint' flag[6][7] in the running kernel—meaning that any problems or bugs experienced will be less likely to be investigated by the maintainers.

NLMs may reside in any valid search path assigned on the NetWare server, and they have .NLM as the file name extension.

Most kernel modules live in subdirectories under /kernel; those not considered necessary to boot the system to the point that init can start are often (but not always) found in /usr/kernel.

In an attempt to combat those problems, symbol versioning data is placed within the .modinfo section of loadable ELF modules.

Other operating systems, such as Solaris, FreeBSD, macOS, and Windows keep the kernel API and ABI relatively stable, thus avoiding this problem.

Userspace initiated kernel module loading is only possible from the Trusted Path when the system is running with the Immutable Global Zone feature enabled.