Skip to content

Commit 20510f2

Browse files
xjamesmorrisLinus Torvalds
authored andcommitted
security: Convert LSM into a static interface
Convert LSM into a static interface, as the ability to unload a security module is not required by in-tree users and potentially complicates the overall security architecture. Needlessly exported LSM symbols have been unexported, to help reduce API abuse. Parameters for the capability and root_plug modules are now specified at boot. The SECURITY_FRAMEWORK_VERSION macro has also been removed. In a nutshell, there is no safe way to unload an LSM. The modular interface is thus unecessary and broken infrastructure. It is used only by out-of-tree modules, which are often binary-only, illegal, abusive of the API and dangerous, e.g. silently re-vectoring SELinux. [akpm@linux-foundation.org: cleanups] [akpm@linux-foundation.org: USB Kconfig fix] [randy.dunlap@oracle.com: fix LSM kernel-doc] Signed-off-by: James Morris <jmorris@namei.org> Acked-by: Chris Wright <chrisw@sous-sol.org> Cc: Stephen Smalley <sds@tycho.nsa.gov> Cc: "Serge E. Hallyn" <serue@us.ibm.com> Acked-by: Arjan van de Ven <arjan@infradead.org> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 5c3b447 commit 20510f2

11 files changed

Lines changed: 1185 additions & 1056 deletions

File tree

‎Documentation/DocBook/kernel-api.tmpl‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ X!Earch/x86/kernel/mca_32.c
340340

341341
<chapter id="security">
342342
<title>Security Framework</title>
343-
!Esecurity/security.c
343+
!Isecurity/security.c
344344
</chapter>
345345

346346
<chapter id="audit">

‎Documentation/kernel-parameters.txt‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,12 @@ parameter is applicable:
7575
PPT Parallel port support is enabled.
7676
PS2 Appropriate PS/2 support is enabled.
7777
RAM RAM disk support is enabled.
78+
ROOTPLUG The example Root Plug LSM is enabled.
7879
S390 S390 architecture is enabled.
7980
SCSI Appropriate SCSI support is enabled.
8081
A lot of drivers has their options described inside of
8182
Documentation/scsi/.
83+
SECURITY Different security models are enabled.
8284
SELINUX SELinux support is enabled.
8385
SERIAL Serial support is enabled.
8486
SH SuperH architecture is enabled.
@@ -373,6 +375,12 @@ and is between 256 and 4096 characters. It is defined in the file
373375
possible to determine what the correct size should be.
374376
This option provides an override for these situations.
375377

378+
capability.disable=
379+
[SECURITY] Disable capabilities. This would normally
380+
be used only if an alternative security model is to be
381+
configured. Potentially dangerous and should only be
382+
used if you are entirely sure of the consequences.
383+
376384
chandev= [HW,NET] Generic channel device initialisation
377385

378386
checkreqprot [SELINUX] Set initial checkreqprot flag value.
@@ -1539,6 +1547,15 @@ and is between 256 and 4096 characters. It is defined in the file
15391547
Useful for devices that are detected asynchronously
15401548
(e.g. USB and MMC devices).
15411549

1550+
root_plug.vendor_id=
1551+
[ROOTPLUG] Override the default vendor ID
1552+
1553+
root_plug.product_id=
1554+
[ROOTPLUG] Override the default product ID
1555+
1556+
root_plug.debug=
1557+
[ROOTPLUG] Enable debugging output
1558+
15421559
rw [KNL] Mount root device read-write on boot
15431560

15441561
S [KNL] Run init in single mode

0 commit comments

Comments
 (0)