[PATCH v2 3/3] landlock: Document LANDLOCK_RESTRICT_SELF_NO_NEW_PRIVS
Justin Suess <[email protected]> Fri, 17 Jul 2026 18:03:19 -0400
| Newsgroups | org.kernel.vger.linux-security-module,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
Document atomically setting no_new_privs with ruleset enforcement, following the same compatibility section style as previous ABI additions. Signed-off-by: Justin Suess <[email protected]> --- Documentation/userspace-api/landlock.rst | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Documentation/userspace-api/landlock.rst b/Documentation/userspace-api/landlock.rst index 5a63d4476c1c..ec87d35f4715 100644 --- a/Documentation/userspace-api/landlock.rst +++ b/Documentation/userspace-api/landlock.rst @@ -8,7 +8,7 @@ Landlock: unprivileged access control ===================================== :Author: Mickaël Salaün -:Date: June 2026 +:Date: July 2026 The goal of Landlock is to enable restriction of ambient rights (e.g. global filesystem or network access) for a set of processes. Because Landlock @@ -789,6 +789,18 @@ when at least one sys_landlock_add_rule() call is made for it with the ``LANDLOCK_ADD_RULE_QUIET`` flag, additional add-rule calls for the same object without this flag do not clear it. +Atomic no_new_privs (ABI < 11) +------------------------------ + +Starting with the Landlock ABI version 11, sys_landlock_restrict_self() +accepts the ``LANDLOCK_RESTRICT_SELF_NO_NEW_PRIVS`` flag, which sets the +no_new_privs attribute of the calling thread atomically with the enforcement +of the ruleset: no_new_privs is set if and only if the call succeeds. This +removes the need for a prior :manpage:`prctl(2)` ``PR_SET_NO_NEW_PRIVS`` +call, and with it the ``CAP_SYS_ADMIN`` requirement. When combined with +``LANDLOCK_RESTRICT_SELF_TSYNC``, no_new_privs is set on all threads of the +process. + .. _kernel_support: Kernel support -- 2.54.0