Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at v4.11-rc3 41 lines 2.1 kB view raw
1Linux Security Module framework 2------------------------------- 3 4The Linux Security Module (LSM) framework provides a mechanism for 5various security checks to be hooked by new kernel extensions. The name 6"module" is a bit of a misnomer since these extensions are not actually 7loadable kernel modules. Instead, they are selectable at build-time via 8CONFIG_DEFAULT_SECURITY and can be overridden at boot-time via the 9"security=..." kernel command line argument, in the case where multiple 10LSMs were built into a given kernel. 11 12The primary users of the LSM interface are Mandatory Access Control 13(MAC) extensions which provide a comprehensive security policy. Examples 14include SELinux, Smack, Tomoyo, and AppArmor. In addition to the larger 15MAC extensions, other extensions can be built using the LSM to provide 16specific changes to system operation when these tweaks are not available 17in the core functionality of Linux itself. 18 19Without a specific LSM built into the kernel, the default LSM will be the 20Linux capabilities system. Most LSMs choose to extend the capabilities 21system, building their checks on top of the defined capability hooks. 22For more details on capabilities, see capabilities(7) in the Linux 23man-pages project. 24 25A list of the active security modules can be found by reading 26/sys/kernel/security/lsm. This is a comma separated list, and 27will always include the capability module. The list reflects the 28order in which checks are made. The capability module will always 29be first, followed by any "minor" modules (e.g. Yama) and then 30the one "major" module (e.g. SELinux) if there is one configured. 31 32Based on https://lkml.org/lkml/2007/10/26/215, 33a new LSM is accepted into the kernel when its intent (a description of 34what it tries to protect against and in what cases one would expect to 35use it) has been appropriately documented in Documentation/security/. 36This allows an LSM's code to be easily compared to its goals, and so 37that end users and distros can make a more informed decision about which 38LSMs suit their requirements. 39 40For extensive documentation on the available LSM hook interfaces, please 41see include/linux/security.h.