Skip to content

Commit 16023b0

Browse files
committed
landlock: Slightly improve documentation and fix spelling
Now that we have more than one ABI version, make limitation explanation more consistent by replacing "ABI 1" with "ABI < 2". This also indicates which ABIs support such past limitation. Improve documentation consistency by not using contractions. Fix spelling in fs.c . Cc: Paul Moore <paul@paul-moore.com> Signed-off-by: Mickaël Salaün <mic@digikod.net> Reviewed-by: Günther Noack <gnoack3000@gmail.com> Link: https://lore.kernel.org/r/20220923154207.3311629-3-mic@digikod.net
1 parent 903cfe8 commit 16023b0

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

Documentation/security/landlock.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Landlock LSM: kernel documentation
77
==================================
88

99
:Author: Mickaël Salaün
10-
:Date: May 2022
10+
:Date: September 2022
1111

1212
Landlock's goal is to create scoped access-control (i.e. sandboxing). To
1313
harden a whole system, this feature should be available to any process,
@@ -49,7 +49,7 @@ Filesystem access rights
4949
------------------------
5050

5151
All access rights are tied to an inode and what can be accessed through it.
52-
Reading the content of a directory doesn't imply to be allowed to read the
52+
Reading the content of a directory does not imply to be allowed to read the
5353
content of a listed inode. Indeed, a file name is local to its parent
5454
directory, and an inode can be referenced by multiple file names thanks to
5555
(hard) links. Being able to unlink a file only has a direct impact on the

Documentation/userspace-api/landlock.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Landlock: unprivileged access control
88
=====================================
99

1010
:Author: Mickaël Salaün
11-
:Date: May 2022
11+
:Date: September 2022
1212

1313
The goal of Landlock is to enable to restrict ambient rights (e.g. global
1414
filesystem access) for a set of processes. Because Landlock is a stackable
@@ -170,7 +170,7 @@ It is recommended setting access rights to file hierarchy leaves as much as
170170
possible. For instance, it is better to be able to have ``~/doc/`` as a
171171
read-only hierarchy and ``~/tmp/`` as a read-write hierarchy, compared to
172172
``~/`` as a read-only hierarchy and ``~/tmp/`` as a read-write hierarchy.
173-
Following this good practice leads to self-sufficient hierarchies that don't
173+
Following this good practice leads to self-sufficient hierarchies that do not
174174
depend on their location (i.e. parent directories). This is particularly
175175
relevant when we want to allow linking or renaming. Indeed, having consistent
176176
access rights per directory enables to change the location of such directory
@@ -380,8 +380,8 @@ by the Documentation/admin-guide/cgroup-v1/memory.rst.
380380
Previous limitations
381381
====================
382382

383-
File renaming and linking (ABI 1)
384-
---------------------------------
383+
File renaming and linking (ABI < 2)
384+
-----------------------------------
385385

386386
Because Landlock targets unprivileged access controls, it needs to properly
387387
handle composition of rules. Such property also implies rules nesting.
@@ -410,7 +410,7 @@ contains `CONFIG_LSM=landlock,[...]` with `[...]` as the list of other
410410
potentially useful security modules for the running system (see the
411411
`CONFIG_LSM` help).
412412

413-
If the running kernel doesn't have `landlock` in `CONFIG_LSM`, then we can
413+
If the running kernel does not have `landlock` in `CONFIG_LSM`, then we can
414414
still enable it by adding ``lsm=landlock,[...]`` to
415415
Documentation/admin-guide/kernel-parameters.rst thanks to the bootloader
416416
configuration.

security/landlock/fs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,7 @@ static inline access_mask_t maybe_remove(const struct dentry *const dentry)
712712
* allowed accesses in @layer_masks_dom.
713713
*
714714
* This is similar to check_access_path_dual() but much simpler because it only
715-
* handles walking on the same mount point and only check one set of accesses.
715+
* handles walking on the same mount point and only checks one set of accesses.
716716
*
717717
* Returns:
718718
* - true if all the domain access rights are allowed for @dir;

0 commit comments

Comments
 (0)