Skip to content

Commit 504f231

Browse files
keesJonathan Corbet
authored andcommitted
doc: ReSTify and split LSM.txt
The existing LSM.txt file covered both usage and development, so split this into two files, one under admin-guide and one under kernel development. Cc: James Morris <james.l.morris@oracle.com> Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
1 parent f00f85a commit 504f231

5 files changed

Lines changed: 22 additions & 18 deletions

File tree

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
Linux Security Module framework
2-
-------------------------------
1+
===========================
2+
Linux Security Module Usage
3+
===========================
34

45
The Linux Security Module (LSM) framework provides a mechanism for
56
various security checks to be hooked by new kernel extensions. The name
67
"module" is a bit of a misnomer since these extensions are not actually
78
loadable kernel modules. Instead, they are selectable at build-time via
89
CONFIG_DEFAULT_SECURITY and can be overridden at boot-time via the
9-
"security=..." kernel command line argument, in the case where multiple
10+
``"security=..."`` kernel command line argument, in the case where multiple
1011
LSMs were built into a given kernel.
1112

1213
The primary users of the LSM interface are Mandatory Access Control
@@ -19,23 +20,12 @@ in the core functionality of Linux itself.
1920
Without a specific LSM built into the kernel, the default LSM will be the
2021
Linux capabilities system. Most LSMs choose to extend the capabilities
2122
system, building their checks on top of the defined capability hooks.
22-
For more details on capabilities, see capabilities(7) in the Linux
23+
For more details on capabilities, see ``capabilities(7)`` in the Linux
2324
man-pages project.
2425

2526
A list of the active security modules can be found by reading
26-
/sys/kernel/security/lsm. This is a comma separated list, and
27+
``/sys/kernel/security/lsm``. This is a comma separated list, and
2728
will always include the capability module. The list reflects the
2829
order in which checks are made. The capability module will always
2930
be first, followed by any "minor" modules (e.g. Yama) and then
3031
the one "major" module (e.g. SELinux) if there is one configured.
31-
32-
Based on https://lkml.org/lkml/2007/10/26/215,
33-
a new LSM is accepted into the kernel when its intent (a description of
34-
what it tries to protect against and in what cases one would expect to
35-
use it) has been appropriately documented in Documentation/security/.
36-
This allows an LSM's code to be easily compared to its goals, and so
37-
that end users and distros can make a more informed decision about which
38-
LSMs suit their requirements.
39-
40-
For extensive documentation on the available LSM hook interfaces, please
41-
see include/linux/security.h.

‎Documentation/admin-guide/index.rst‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ configure specific aspects of kernel behavior to your liking.
6161
java
6262
ras
6363
pm/index
64+
LSM/index
6465

6566
.. only:: subproject and html
6667

‎Documentation/security/00-INDEX‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
00-INDEX
22
- this file.
3-
LSM.txt
4-
- description of the Linux Security Module framework.
53
SELinux.txt
64
- how to get started with the SELinux security enhancement.
75
Smack.txt

‎Documentation/security/LSM.rst‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
=================================
2+
Linux Security Module Development
3+
=================================
4+
5+
Based on https://lkml.org/lkml/2007/10/26/215,
6+
a new LSM is accepted into the kernel when its intent (a description of
7+
what it tries to protect against and in what cases one would expect to
8+
use it) has been appropriately documented in ``Documentation/security/LSM``.
9+
This allows an LSM's code to be easily compared to its goals, and so
10+
that end users and distros can make a more informed decision about which
11+
LSMs suit their requirements.
12+
13+
For extensive documentation on the available LSM hook interfaces, please
14+
see ``include/linux/lsm_hooks.h``.

‎Documentation/security/index.rst‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ Security Documentation
77

88
credentials
99
IMA-templates
10+
LSM
1011
self-protection
1112
tpm/index

0 commit comments

Comments
 (0)