From: sashiko-bot@kernel.org
To: "Cai Xinchen" <caixinchen1@huawei.com>
Cc: linux-security-module@vger.kernel.org, bpf@vger.kernel.org
Subject: Re: [PATCH -next 8/9] Documentation/ABI: document the lockdown securityfs file
Date: Tue, 03 Nov 2026 07:59:03 +0000 [thread overview]
Message-ID: <sashiko-outbox-194783@kernel.org> (raw)
In-Reply-To: <20261103082421.3033195-9-caixinchen1@huawei.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Documentation/ABI: securityfs-lockdown omits CONFIG_LSM activation path
--
commit a74113d4e117aa2187671cc1af3e2f7a75da9ede
Author: Cai Xinchen <caixinchen1@huawei.com>
Documentation/ABI: document the lockdown securityfs file
This patch adds ABI documentation for /sys/kernel/security/lockdown and
updates the LOCKDOWN SECURITY MODULE entry in MAINTAINERS.
> diff --git a/Documentation/ABI/testing/securityfs-lockdown b/Documentation/ABI/testing/securityfs-lockdown
> new file mode 100644
> index 0000000000000..490dc607492ce
> --- /dev/null
> +++ b/Documentation/ABI/testing/securityfs-lockdown
> @@ -0,0 +1,41 @@
> +What: /sys/kernel/security/lockdown
> +Date: August 2019
> +KernelVersion: 5.4
> +Contact: linux-security-module@vger.kernel.org
> +Description:
> + The lockdown securityfs file reports and controls the
> + lockdown state of the running kernel. It is provided by
> + the lockdown LSM and is located at
> + /sys/kernel/security/lockdown.
> +
> + The file is present only when CONFIG_SECURITY_LOCKDOWN_LSM is
> + enabled and the lockdown LSM is active: either
> + CONFIG_SECURITY_LOCKDOWN_LSM_EARLY is set, or the LSM is
> + listed in the "lsm=" kernel parameter. Otherwise the node
> + is absent, and userspace must handle its absence.
[Severity: Low]
Can the lockdown LSM also be activated at build time via CONFIG_LSM when
neither CONFIG_SECURITY_LOCKDOWN_LSM_EARLY is set nor the lsm= kernel
parameter is passed?
In security/lsm_init.c, security_init() falls back to lsm_order_builtin
(initialized from CONFIG_LSM) when lsm= is not specified on the command
line:
security/lsm_init.c:security_init() {
...
if (lsm_order_cmdline) {
lsm_order_legacy = NULL;
lsm_order_parse(lsm_order_cmdline, "cmdline");
} else
lsm_order_parse(lsm_order_builtin, "builtin");
...
}
And security/Kconfig includes lockdown in the default CONFIG_LSM list,
which causes security_initcall_core() -> lockdown_secfs_init() to create
/sys/kernel/security/lockdown.
Should this paragraph also mention CONFIG_LSM as one of the ways the
lockdown LSM can be enabled?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261103082421.3033195-1-caixinchen1@huawei.com?part=8
next prev parent reply other threads:[~2026-11-03 7:59 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-03 8:24 [PATCH -next 0/9] lockdown: fix the securityfs interface and add tests Cai Xinchen
2026-11-03 8:24 ` [PATCH -next 1/9] lockdown: Add break in lockdown_write Cai Xinchen
2026-11-03 7:54 ` sashiko-bot
2026-11-03 8:24 ` [PATCH -next 2/9] lockdown: remove useless decrement operation Cai Xinchen
2026-11-03 7:54 ` sashiko-bot
2026-11-03 8:24 ` [PATCH -next 3/9] lockdown: bound the status string with scnprintf Cai Xinchen
2026-11-03 7:54 ` sashiko-bot
2026-11-03 8:24 ` [PATCH -next 4/9] lockdown: select SECURITYFS Cai Xinchen
2026-11-03 7:54 ` sashiko-bot
2026-11-03 8:24 ` [PATCH -next 5/9] lsm: remove unused lockdown audit data Cai Xinchen
2026-11-03 7:55 ` sashiko-bot
2026-11-03 8:24 ` [PATCH -next 6/9] lockdown: drop an unused include and simplify secfs init Cai Xinchen
2026-11-03 7:55 ` sashiko-bot
2026-11-03 8:24 ` [PATCH -next 7/9] lockdown: move lockdown_reasons next to its only user Cai Xinchen
2026-11-03 7:55 ` sashiko-bot
2026-11-03 8:24 ` [PATCH -next 8/9] Documentation/ABI: document the lockdown securityfs file Cai Xinchen
2026-11-03 7:59 ` sashiko-bot [this message]
2026-11-03 8:24 ` [PATCH -next 9/9] selftests/lsm: add lockdown securityfs test Cai Xinchen
2026-11-03 8:02 ` sashiko-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sashiko-outbox-194783@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=caixinchen1@huawei.com \
--cc=linux-security-module@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox