]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
landlock: Document fallocate(2) as another truncation corner case
authorGünther Noack <gnoack@google.com>
Wed, 1 Apr 2026 15:09:10 +0000 (17:09 +0200)
committerMickaël Salaün <mic@digikod.net>
Tue, 7 Apr 2026 16:51:11 +0000 (18:51 +0200)
commit3457a5ccacd34fdd5ebd3a4745e721b5a1239690
tree21edc37e6b8af438f9f9dc908824494182dcfcd5
parentd1b2ab221d37f32cf1a796fc0ba3b8f9fc8458fa
landlock: Document fallocate(2) as another truncation corner case

Reinforce the already stated policy that LANDLOCK_ACCESS_FS_TRUNCATE should
always go hand in hand with LANDLOCK_ACCESS_FS_WRITE_FILE, as their
meanings and enforcement overlap in counterintuitive ways.

On many common file systems, fallocate(2) offers a way to shorten files as
long as the file is opened for writing, side-stepping the
LANDLOCK_ACCESS_FS_TRUNCATE right.

Assisted-by: Gemini-CLI:gemini-3.1
Signed-off-by: Günther Noack <gnoack@google.com>
Link: https://lore.kernel.org/r/20260401150911.1038072-1-gnoack@google.com
Signed-off-by: Mickaël Salaün <mic@digikod.net>
Documentation/userspace-api/landlock.rst