All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Mickaël Salaün" <mic@digikod.net>
To: James Morris <jmorris@namei.org>,
	Paul Moore <paul@paul-moore.com>,
	"Serge E . Hallyn" <serge@hallyn.com>
Cc: "Mickaël Salaün" <mic@digikod.net>,
	"Alejandro Colomar" <alx.manpages@gmail.com>,
	"Jonathan Corbet" <corbet@lwn.net>,
	"Kees Cook" <keescook@chromium.org>,
	"Michael Kerrisk" <mtk.manpages@gmail.com>,
	linux-doc@vger.kernel.org, linux-security-module@vger.kernel.org
Subject: [PATCH v1] landlock: Explain how to support Landlock
Date: Thu, 12 May 2022 14:08:47 +0200	[thread overview]
Message-ID: <20220512120847.124822-1-mic@digikod.net> (raw)

Let's help users by documenting how to enable and check for Landlock in
the kernel and the running system.  The userspace-api section may not be
the best place for this but it still makes sense to put all the user
documentation at the same place.

Cc: Paul Moore <paul@paul-moore.com>
Signed-off-by: Mickaël Salaün <mic@digikod.net>
Link: https://lore.kernel.org/r/20220512120847.124822-1-mic@digikod.net
---
 Documentation/userspace-api/landlock.rst | 26 ++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/Documentation/userspace-api/landlock.rst b/Documentation/userspace-api/landlock.rst
index 7b4fe6218132..e69dbddcc191 100644
--- a/Documentation/userspace-api/landlock.rst
+++ b/Documentation/userspace-api/landlock.rst
@@ -388,6 +388,32 @@ Starting with the Landlock ABI version 2, it is now possible to securely
 control renaming and linking thanks to the new `LANDLOCK_ACCESS_FS_REFER`
 access right.
 
+Landlock support
+================
+
+Kernel configuration
+--------------------
+
+Landlock can be supported since Linux 5.13 but it must be configured in the
+kernel with `CONFIG_SECURITY_LANDLOCK=y`, and it should be enabled at boot time
+with `CONFIG_LSM=landlock,[...]`.  The `[...]` must be replaced with the list
+of LSMs that may be useful for the running system (see the `CONFIG_LSM` help).
+
+Running system configuration
+----------------------------
+
+If the running kernel doesn't have `landlock` in `CONFIG_LSM`, then we can
+still enable it by adding `lsm=landlock,[...]` to
+Documentation/admin-guide/kernel-parameters.rst. The `[...]` must be replaced
+with the list of LSMs that may be useful for the running system (see the
+`CONFIG_LSM` help).
+
+Running system check
+--------------------
+
+We can check that Landlock is enabled by looking for "landlock: Up and running"
+in kernel logs: `dmesg | grep landlock`
+
 Questions and answers
 =====================
 

base-commit: 67761d8181f0fb9dbd264caa5b6408dbc0d8e86a
-- 
2.36.0


             reply	other threads:[~2022-05-12 12:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-12 12:08 Mickaël Salaün [this message]
2022-05-12 22:03 ` Paul Moore
2022-05-13  9:21   ` Mickaël Salaün

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=20220512120847.124822-1-mic@digikod.net \
    --to=mic@digikod.net \
    --cc=alx.manpages@gmail.com \
    --cc=corbet@lwn.net \
    --cc=jmorris@namei.org \
    --cc=keescook@chromium.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=mtk.manpages@gmail.com \
    --cc=paul@paul-moore.com \
    --cc=serge@hallyn.com \
    --subject='Re: [PATCH v1] landlock: Explain how to support Landlock' \
    /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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.