<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/Documentation/admin-guide/LSM, branch master</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>ns: allocate the namespace id before the namespace_init hook</title>
<updated>2026-11-11T11:26:08+00:00</updated>
<author>
<name>Christian Brauner</name>
<email>brauner@kernel.org</email>
</author>
<published>2026-10-29T16:40:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=08471914d6bb24493b75bb03701548133d617878'/>
<id>08471914d6bb24493b75bb03701548133d617878</id>
<content type='text'>
Currently the namespace id is allocated only after __ns_common_init()
has called the namespace_init LSM hook. Most namespace types allocate it
in ns_tree_add() right before the namespace is added to the namespace
trees. So the namespace_init hook always sees an id of zero.

The namespace id is the only identifier of a namespace that is never
recycled. A bpf LSM wants to use it to track a namespace from
namespace_init until namespace_free, e.g., by using it as the key into a
map that associates data with the namespace. The inode number doesn't
work for that as it is quickly recycled.

So allocate the id in __ns_common_init() before calling the
namespace_init hook. Every namespace then has its id by the time it is
added to the namespace trees. The initial namespaces still get their
fixed ids, either statically from NS_COMMON_INIT() or for init_net from
ns_common_init(). So ns_tree_add() doesn't need to allocate an id
anymore. Ids are still handed out in creation order so mnt_ns_loop()
keeps working. Mount and ipc namespaces already allocated their id right
after ns_common_init() anyway.

If creating the namespace fails after the id has been allocated the id
is simply never used.

Landlock logs the namespace id when it denies the use of a namespace.
For a denied namespace creation that used to be zero. Now it's the id
that was allocated for the new namespace. That namespace never becomes
visible to userspace but it's the same id that other LSMs see in
namespace_init. Update the Landlock documentation and selftests
accordingly. The selftests can't know the id of a namespace whose
creation was denied so they only check that it isn't zero.

While at it, drop ns_tree_gen_id() as it has no users left.

Reproducer, 100 user and uts namespaces:

  bpftrace -e 'fentry:bpf_lsm_namespace_init {
      @[args.ns-&gt;ns_id ? "set" : "zero"] = count(); }' &amp;
  for i in $(seq 100); do unshare -Uu true; done

  before: @[zero]: 200
  after:  @[set]: 200

Fixes: f675d2e95569 ("lsm: add LSM blob and hooks for namespaces")
Cc: stable@kernel.org # mainline only
Link: https://patch.msgid.link/20261029-work-security-namespace_free-v2-4-65591dbba7b3@kernel.org
Reviewed-by: Mickaël Salaün &lt;mic@digikod.net&gt; # Landlock changes
Signed-off-by: Christian Brauner (Amutable) &lt;brauner@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently the namespace id is allocated only after __ns_common_init()
has called the namespace_init LSM hook. Most namespace types allocate it
in ns_tree_add() right before the namespace is added to the namespace
trees. So the namespace_init hook always sees an id of zero.

The namespace id is the only identifier of a namespace that is never
recycled. A bpf LSM wants to use it to track a namespace from
namespace_init until namespace_free, e.g., by using it as the key into a
map that associates data with the namespace. The inode number doesn't
work for that as it is quickly recycled.

So allocate the id in __ns_common_init() before calling the
namespace_init hook. Every namespace then has its id by the time it is
added to the namespace trees. The initial namespaces still get their
fixed ids, either statically from NS_COMMON_INIT() or for init_net from
ns_common_init(). So ns_tree_add() doesn't need to allocate an id
anymore. Ids are still handed out in creation order so mnt_ns_loop()
keeps working. Mount and ipc namespaces already allocated their id right
after ns_common_init() anyway.

If creating the namespace fails after the id has been allocated the id
is simply never used.

Landlock logs the namespace id when it denies the use of a namespace.
For a denied namespace creation that used to be zero. Now it's the id
that was allocated for the new namespace. That namespace never becomes
visible to userspace but it's the same id that other LSMs see in
namespace_init. Update the Landlock documentation and selftests
accordingly. The selftests can't know the id of a namespace whose
creation was denied so they only check that it isn't zero.

While at it, drop ns_tree_gen_id() as it has no users left.

Reproducer, 100 user and uts namespaces:

  bpftrace -e 'fentry:bpf_lsm_namespace_init {
      @[args.ns-&gt;ns_id ? "set" : "zero"] = count(); }' &amp;
  for i in $(seq 100); do unshare -Uu true; done

  before: @[zero]: 200
  after:  @[set]: 200

Fixes: f675d2e95569 ("lsm: add LSM blob and hooks for namespaces")
Cc: stable@kernel.org # mainline only
Link: https://patch.msgid.link/20261029-work-security-namespace_free-v2-4-65591dbba7b3@kernel.org
Reviewed-by: Mickaël Salaün &lt;mic@digikod.net&gt; # Landlock changes
Signed-off-by: Christian Brauner (Amutable) &lt;brauner@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'landlock-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mic/linux</title>
<updated>2026-10-22T19:58:44+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-10-22T19:58:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3815f7d55ae18564f4eac57557479f8b3548af95'/>
<id>3815f7d55ae18564f4eac57557479f8b3548af95</id>
<content type='text'>
Pull Landlock update from Mickaël Salaün:
 "The main change adds composable Landlock controls for namespace types
  and Linux capabilities, thanks to new LSM hooks (merged via the LSM
  tree). A umount race condition is also fixed"

* tag 'landlock-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mic/linux:
  landlock: Fix superblock use-after-free in release_inode()
  selftests/landlock: Fix snprintf truncation checks in test files
  landlock: Add documentation for capability and namespace restrictions
  samples/landlock: Add capability and namespace restriction support
  selftests/landlock: Add capability restriction tests
  selftests/landlock: Add namespace restriction tests
  landlock: Enforce capability restrictions
  landlock: Enforce namespace use restrictions
  landlock: Wrap per-layer access masks in struct layer_config
  landlock: Rename quiet_masks to quiet_access
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull Landlock update from Mickaël Salaün:
 "The main change adds composable Landlock controls for namespace types
  and Linux capabilities, thanks to new LSM hooks (merged via the LSM
  tree). A umount race condition is also fixed"

* tag 'landlock-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mic/linux:
  landlock: Fix superblock use-after-free in release_inode()
  selftests/landlock: Fix snprintf truncation checks in test files
  landlock: Add documentation for capability and namespace restrictions
  samples/landlock: Add capability and namespace restriction support
  selftests/landlock: Add capability restriction tests
  selftests/landlock: Add namespace restriction tests
  landlock: Enforce capability restrictions
  landlock: Enforce namespace use restrictions
  landlock: Wrap per-layer access masks in struct layer_config
  landlock: Rename quiet_masks to quiet_access
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'ipe-pr-20261019' of git://git.kernel.org/pub/scm/linux/kernel/git/wufan/ipe</title>
<updated>2026-10-22T19:55:12+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-10-22T19:55:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=bbc48daecac6c69ccbce4005aa2a681298e2fc7d'/>
<id>bbc48daecac6c69ccbce4005aa2a681298e2fc7d</id>
<content type='text'>
Pull IPE updates from Fan Wu:

 - Fix an extra empty audit record on enforcement changes

   ipe_audit_enforce() started an audit buffer but logged the state
   change with audit_log(), which emits its own record. Ending the
   unused buffer produced an additional empty AUDIT_MAC_STATUS record
   every time the enforcement state was changed.

 - Keep the name and token tables in sync with their enums

   The audit name tables now use designated initializers, so each name
   stays bound to its enum value, and static assertions on the policy
   parser token tables break the build if an enum value is added without
   a matching token.

 - Constify token_default() and correct a comment about policy text
   ownership, with no functional changes

 - Fix an invalid sgid value in an audit event example in the docs

 - Point the docs to the new IPE website and test suite repository

* tag 'ipe-pr-20261019' of git://git.kernel.org/pub/scm/linux/kernel/git/wufan/ipe:
  ipe: update the project and test suite links
  ipe: fix enforcement audit
  ipe: correct policy text ownership comment
  ipe: check parser token table sizes
  ipe: use designated initializers for audit name tables
  ipe: constify token_default()
  ipe: fix invalid sgid value in audit event documentation
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull IPE updates from Fan Wu:

 - Fix an extra empty audit record on enforcement changes

   ipe_audit_enforce() started an audit buffer but logged the state
   change with audit_log(), which emits its own record. Ending the
   unused buffer produced an additional empty AUDIT_MAC_STATUS record
   every time the enforcement state was changed.

 - Keep the name and token tables in sync with their enums

   The audit name tables now use designated initializers, so each name
   stays bound to its enum value, and static assertions on the policy
   parser token tables break the build if an enum value is added without
   a matching token.

 - Constify token_default() and correct a comment about policy text
   ownership, with no functional changes

 - Fix an invalid sgid value in an audit event example in the docs

 - Point the docs to the new IPE website and test suite repository

* tag 'ipe-pr-20261019' of git://git.kernel.org/pub/scm/linux/kernel/git/wufan/ipe:
  ipe: update the project and test suite links
  ipe: fix enforcement audit
  ipe: correct policy text ownership comment
  ipe: check parser token table sizes
  ipe: use designated initializers for audit name tables
  ipe: constify token_default()
  ipe: fix invalid sgid value in audit event documentation
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'lsm-pr-20261016' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm</title>
<updated>2026-10-21T06:04:07+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-10-21T06:04:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a804c5742bff224d4cb4d25dd383554d598be32b'/>
<id>a804c5742bff224d4cb4d25dd383554d598be32b</id>
<content type='text'>
Pull lsm updates from Paul Moore:

 - Add LSM hooks, object blobs, and audit records for namespaces

   Add the necessary bits to enable LSMs to enforce access controls on
   the management of various kernel namespaces. While this pull request
   does not contain any in-tree users of these hooks, the Landlock pull
   request for Linux v7.4 will include Landlock support and the next
   merge window will likely include SELinux support as well. Considering
   the development behind these hooks, I expect that BPF LSM developers
   will also be making use of the namespace hooks, if they haven't
   already.

 - Update the inode LSM hooks to include mount idmaps

   This allows LSMs to incorporate the mount ID mapping into their
   access control decisions. While there are no current in-tree users of
   this, it was requested by those developing BPF LSM programs and this
   pull request includes a BPF LSM selftest.

 - Preserve the full 32-bit ioctl command in LSM audit records

   Previously only the low 16 bits were logged, ignoring the direction
   and size information in the upper 16 bits. The pull request also
   includes a Landlock based selftest to verify the full 32-bit ioctl
   value.

 - Ensure we don't call security_backing_file_free() multiple times

   Thankfully we don't have a problem with the current code base, but we
   want to fix this behavior now before it becomes a problem.

 - Clarify that only the current task may access current-&gt;cred

   The current code is a bit misleading around safely accessing the cred
   field in a task struct. Through comment and code corrections, this
   pull request clarifies that only the task itself may access its cred
   field.

 - Add SLAB_NO_MERGE to the credential object cache

   Harden the credential cache by ensuring credential objects live on
   dedicated slab pages.

 - Make use of safe memory zero'ing in the LSM Rust bindings

 - Update the docs for the current behavior of /sys/kernel/security/lsm

 - Update the docs for CONFIG_LSM and the "lsm=" command line option

 - Remove unnecessary code

* tag 'lsm-pr-20261016' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm:
  lsm: remove redundant NULL check in security_init()
  selftests/landlock: Check full ioctl commands in audit records
  lsm: Preserve full ioctl commands in audit records
  doc: fix LSM ordering description for /sys/kernel/security/lsm
  doc: describe CONFIG_LSM and lsm= as the selection mechanism
  selftests/bpf: verify mount idmaps reach inode hooks
  lsm: expose mount idmaps to inode hooks
  rust: lsm: replace `core::mem::zeroed` with `pin_init::zeroed`
  cred: prevent slab cache merging for cred_jar
  lsm: don't call security_backing_file_free() multiple times
  lsm: delete duplicate assignment in lsm_prepare()
  lsm: update the BUILD_BUG_ON() in audit_log_lsm_data()
  lsm: add LSM_AUDIT_DATA_NS for namespace audit records
  lsm: add LSM blob and hooks for namespaces
  ns: Free anonymous mount namespaces via ns_common_free()
  cred: clarify that task_struct::cred is only for the current task
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull lsm updates from Paul Moore:

 - Add LSM hooks, object blobs, and audit records for namespaces

   Add the necessary bits to enable LSMs to enforce access controls on
   the management of various kernel namespaces. While this pull request
   does not contain any in-tree users of these hooks, the Landlock pull
   request for Linux v7.4 will include Landlock support and the next
   merge window will likely include SELinux support as well. Considering
   the development behind these hooks, I expect that BPF LSM developers
   will also be making use of the namespace hooks, if they haven't
   already.

 - Update the inode LSM hooks to include mount idmaps

   This allows LSMs to incorporate the mount ID mapping into their
   access control decisions. While there are no current in-tree users of
   this, it was requested by those developing BPF LSM programs and this
   pull request includes a BPF LSM selftest.

 - Preserve the full 32-bit ioctl command in LSM audit records

   Previously only the low 16 bits were logged, ignoring the direction
   and size information in the upper 16 bits. The pull request also
   includes a Landlock based selftest to verify the full 32-bit ioctl
   value.

 - Ensure we don't call security_backing_file_free() multiple times

   Thankfully we don't have a problem with the current code base, but we
   want to fix this behavior now before it becomes a problem.

 - Clarify that only the current task may access current-&gt;cred

   The current code is a bit misleading around safely accessing the cred
   field in a task struct. Through comment and code corrections, this
   pull request clarifies that only the task itself may access its cred
   field.

 - Add SLAB_NO_MERGE to the credential object cache

   Harden the credential cache by ensuring credential objects live on
   dedicated slab pages.

 - Make use of safe memory zero'ing in the LSM Rust bindings

 - Update the docs for the current behavior of /sys/kernel/security/lsm

 - Update the docs for CONFIG_LSM and the "lsm=" command line option

 - Remove unnecessary code

* tag 'lsm-pr-20261016' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm:
  lsm: remove redundant NULL check in security_init()
  selftests/landlock: Check full ioctl commands in audit records
  lsm: Preserve full ioctl commands in audit records
  doc: fix LSM ordering description for /sys/kernel/security/lsm
  doc: describe CONFIG_LSM and lsm= as the selection mechanism
  selftests/bpf: verify mount idmaps reach inode hooks
  lsm: expose mount idmaps to inode hooks
  rust: lsm: replace `core::mem::zeroed` with `pin_init::zeroed`
  cred: prevent slab cache merging for cred_jar
  lsm: don't call security_backing_file_free() multiple times
  lsm: delete duplicate assignment in lsm_prepare()
  lsm: update the BUILD_BUG_ON() in audit_log_lsm_data()
  lsm: add LSM_AUDIT_DATA_NS for namespace audit records
  lsm: add LSM blob and hooks for namespaces
  ns: Free anonymous mount namespaces via ns_common_free()
  cred: clarify that task_struct::cred is only for the current task
</pre>
</div>
</content>
</entry>
<entry>
<title>landlock: Add documentation for capability and namespace restrictions</title>
<updated>2026-10-20T14:47:22+00:00</updated>
<author>
<name>Mickaël Salaün</name>
<email>mic@digikod.net</email>
</author>
<published>2026-10-14T08:27:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5d2c5cd87ab806aa1fbf04e8ef46f6db7f252954'/>
<id>5d2c5cd87ab806aa1fbf04e8ef46f6db7f252954</id>
<content type='text'>
Document the two new Landlock permission categories, introduced with ABI
12, in the userspace API guide, admin guide, trace-event guide, UAPI
comments, and kernel security documentation.

The kernel security documentation generalizes the existing per-object
access-rights framing into three restriction models (handled_access_*,
handled_permissions, scoped) and states criteria for choosing among
them, so future permission or scope additions have a documented place to
land.

Cc: Christian Brauner &lt;brauner@kernel.org&gt;
Cc: Günther Noack &lt;gnoack@google.com&gt;
Cc: Paul Moore &lt;paul@paul-moore.com&gt;
Cc: Serge E. Hallyn &lt;serge@hallyn.com&gt;
Link: https://patch.msgid.link/20261014082718.1435842-9-mic@digikod.net
Signed-off-by: Mickaël Salaün &lt;mic@digikod.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Document the two new Landlock permission categories, introduced with ABI
12, in the userspace API guide, admin guide, trace-event guide, UAPI
comments, and kernel security documentation.

The kernel security documentation generalizes the existing per-object
access-rights framing into three restriction models (handled_access_*,
handled_permissions, scoped) and states criteria for choosing among
them, so future permission or scope additions have a documented place to
land.

Cc: Christian Brauner &lt;brauner@kernel.org&gt;
Cc: Günther Noack &lt;gnoack@google.com&gt;
Cc: Paul Moore &lt;paul@paul-moore.com&gt;
Cc: Serge E. Hallyn &lt;serge@hallyn.com&gt;
Link: https://patch.msgid.link/20261014082718.1435842-9-mic@digikod.net
Signed-off-by: Mickaël Salaün &lt;mic@digikod.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ipe: update the project and test suite links</title>
<updated>2026-10-20T00:21:22+00:00</updated>
<author>
<name>Fan Wu</name>
<email>wufan@kernel.org</email>
</author>
<published>2026-10-03T02:51:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e2f08fadb48509c239e47cdaf81438c162395932'/>
<id>e2f08fadb48509c239e47cdaf81438c162395932</id>
<content type='text'>
IPE now has a project website at https://ipe-lsm.org/, and its
integration tests are maintained in the Integrity-Policy-Enforcement/ci
repository.

Point the admin guide to the website, and point the test suite link in
the developer documentation to the new repository.

Assisted-by: LLM
Signed-off-by: Fan Wu &lt;wufan@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
IPE now has a project website at https://ipe-lsm.org/, and its
integration tests are maintained in the Integrity-Policy-Enforcement/ci
repository.

Point the admin guide to the website, and point the test suite link in
the developer documentation to the new repository.

Assisted-by: LLM
Signed-off-by: Fan Wu &lt;wufan@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ipe: fix invalid sgid value in audit event documentation</title>
<updated>2026-10-20T00:21:22+00:00</updated>
<author>
<name>Manuel Ebner</name>
<email>manuelebner@mailbox.org</email>
</author>
<published>2026-09-02T15:29:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=edf43c031902787117822b23324cf08ccc023bf6'/>
<id>edf43c031902787117822b23324cf08ccc023bf6</id>
<content type='text'>
The audit event example in the IPE documentation contains 'sgid=)',
which is not a valid Set Group ID value. Fix it to use 'sgid=0'.

Fixes: ac6731870ed9 ("documentation: add IPE documentation")
Signed-off-by: Manuel Ebner &lt;manuelebner@mailbox.org&gt;
Reviewed-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Signed-off-by: Fan Wu &lt;wufan@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The audit event example in the IPE documentation contains 'sgid=)',
which is not a valid Set Group ID value. Fix it to use 'sgid=0'.

Fixes: ac6731870ed9 ("documentation: add IPE documentation")
Signed-off-by: Manuel Ebner &lt;manuelebner@mailbox.org&gt;
Reviewed-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Signed-off-by: Fan Wu &lt;wufan@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>loadpin: Fix stale KEXEC_VERIFY_SIG reference in documentation</title>
<updated>2026-09-15T19:36:38+00:00</updated>
<author>
<name>Karl Mehltretter</name>
<email>kmehltretter@gmail.com</email>
</author>
<published>2026-09-05T01:36:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=eb0b0d222a832b6ec851e56d4922a775ac762955'/>
<id>eb0b0d222a832b6ec851e56d4922a775ac762955</id>
<content type='text'>
Commit 99d5cadfde2b ("kexec_file: split KEXEC_VERIFY_SIG into KEXEC_SIG
and KEXEC_SIG_FORCE") removed CONFIG_KEXEC_VERIFY_SIG but left the
LoadPin documentation pointing at it. Refer to CONFIG_KEXEC_SIG instead.

While at it, clean up the grammar of the sentence.

Fixes: 99d5cadfde2b ("kexec_file: split KEXEC_VERIFY_SIG into KEXEC_SIG and KEXEC_SIG_FORCE")
Assisted-by: LLM
Signed-off-by: Karl Mehltretter &lt;kmehltretter@gmail.com&gt;
Reviewed-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
Message-ID: &lt;20260905013655.58665-1-kmehltretter@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit 99d5cadfde2b ("kexec_file: split KEXEC_VERIFY_SIG into KEXEC_SIG
and KEXEC_SIG_FORCE") removed CONFIG_KEXEC_VERIFY_SIG but left the
LoadPin documentation pointing at it. Refer to CONFIG_KEXEC_SIG instead.

While at it, clean up the grammar of the sentence.

Fixes: 99d5cadfde2b ("kexec_file: split KEXEC_VERIFY_SIG into KEXEC_SIG and KEXEC_SIG_FORCE")
Assisted-by: LLM
Signed-off-by: Karl Mehltretter &lt;kmehltretter@gmail.com&gt;
Reviewed-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
Message-ID: &lt;20260905013655.58665-1-kmehltretter@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>doc: fix LSM ordering description for /sys/kernel/security/lsm</title>
<updated>2026-09-11T22:09:29+00:00</updated>
<author>
<name>Lincoln Wallace</name>
<email>locnnil0@gmail.com</email>
</author>
<published>2026-07-14T01:38:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7dfacee94c9cac9e62149791f91ce7777d6d870e'/>
<id>7dfacee94c9cac9e62149791f91ce7777d6d870e</id>
<content type='text'>
The LSM usage document states that the capability module will always
be first in /sys/kernel/security/lsm, followed by any "minor" modules
and then the one "major" module.

This does not match the current LSM infrastructure:

 - When CONFIG_SECURITY_LOCKDOWN_LSM_EARLY is enabled, lockdown is
   initialized as an early LSM, before all other modules including
   capability, and appears first in the list.

 - The integrity modules (e.g. IMA and EVM) register with
   LSM_ORDER_LAST and are always placed at the end of the list,
   regardless of the position of the major module.

 - The relative order of the remaining modules is not fixed by the
   framework; it follows CONFIG_LSM or the "lsm=" kernel command
   line parameter.

Rewrite the paragraph to describe the actual ordering: lockdown
first when early lockdown is enabled, capability otherwise,
integrity modules at the end, and the remaining modules in the
configured order.

Signed-off-by: Lincoln Wallace &lt;locnnil0@gmail.com&gt;
[PM: subject tweak]
Signed-off-by: Paul Moore &lt;paul@paul-moore.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The LSM usage document states that the capability module will always
be first in /sys/kernel/security/lsm, followed by any "minor" modules
and then the one "major" module.

This does not match the current LSM infrastructure:

 - When CONFIG_SECURITY_LOCKDOWN_LSM_EARLY is enabled, lockdown is
   initialized as an early LSM, before all other modules including
   capability, and appears first in the list.

 - The integrity modules (e.g. IMA and EVM) register with
   LSM_ORDER_LAST and are always placed at the end of the list,
   regardless of the position of the major module.

 - The relative order of the remaining modules is not fixed by the
   framework; it follows CONFIG_LSM or the "lsm=" kernel command
   line parameter.

Rewrite the paragraph to describe the actual ordering: lockdown
first when early lockdown is enabled, capability otherwise,
integrity modules at the end, and the remaining modules in the
configured order.

Signed-off-by: Lincoln Wallace &lt;locnnil0@gmail.com&gt;
[PM: subject tweak]
Signed-off-by: Paul Moore &lt;paul@paul-moore.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>doc: describe CONFIG_LSM and lsm= as the selection mechanism</title>
<updated>2026-09-11T22:09:29+00:00</updated>
<author>
<name>Lincoln Wallace</name>
<email>locnnil0@gmail.com</email>
</author>
<published>2026-07-14T01:38:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5a06263597a8b7b528d92999cf654667f61d92a7'/>
<id>5a06263597a8b7b528d92999cf654667f61d92a7</id>
<content type='text'>
The LSM usage document states that security modules are selectable at
build time via CONFIG_DEFAULT_SECURITY and can be overridden at boot
time via the "security=..." kernel command line argument.

CONFIG_DEFAULT_SECURITY no longer exists: LSMs are enabled via
CONFIG_LSM, an ordered list of the LSMs to initialize, which can be
overridden at boot time with the "lsm=" parameter. The "security="
parameter remains as a deprecated way to choose a legacy "major"
security module, and is ignored when "lsm=" is specified; see commit
89a9684ea158 ("LSM: Ignore "security=" when "lsm=" is specified").

Update the paragraph to describe CONFIG_LSM and "lsm=" as the current
selection mechanism, keeping "security=" documented as the deprecated
legacy option, matching the wording in kernel-parameters.txt.

Signed-off-by: Lincoln Wallace &lt;locnnil0@gmail.com&gt;
[PM: subject tweak, dropped refs to earlier rejected revisions]
Signed-off-by: Paul Moore &lt;paul@paul-moore.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The LSM usage document states that security modules are selectable at
build time via CONFIG_DEFAULT_SECURITY and can be overridden at boot
time via the "security=..." kernel command line argument.

CONFIG_DEFAULT_SECURITY no longer exists: LSMs are enabled via
CONFIG_LSM, an ordered list of the LSMs to initialize, which can be
overridden at boot time with the "lsm=" parameter. The "security="
parameter remains as a deprecated way to choose a legacy "major"
security module, and is ignored when "lsm=" is specified; see commit
89a9684ea158 ("LSM: Ignore "security=" when "lsm=" is specified").

Update the paragraph to describe CONFIG_LSM and "lsm=" as the current
selection mechanism, keeping "security=" documented as the deprecated
legacy option, matching the wording in kernel-parameters.txt.

Signed-off-by: Lincoln Wallace &lt;locnnil0@gmail.com&gt;
[PM: subject tweak, dropped refs to earlier rejected revisions]
Signed-off-by: Paul Moore &lt;paul@paul-moore.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
