[PATCH v3 -next 18/18] Documentation: Update landlock doc for metadata rights

sashiko-bot at kernel.org sashiko-bot at kernel.org
Tue Oct 27 15:16:47 UTC 2026


> Update the user space documentation for the new
> LANDLOCK_ACCESS_FS_READ_METADATA and
> LANDLOCK_ACCESS_FS_WRITE_METADATA access rights: add them to the
> example ruleset attributes, extend the ABI version fallback switch
> to remove them for ABI < 13, and document their semantics in a new
> "File metadata" section, including the fact that only explicit
> metadata changes requested by user space are restricted.
> 
> The new section also documents the open-time semantic of both
> rights: metadata accesses requested through an already opened file
> descriptor are granted according to the rights available at open(2)
> time, like for LANDLOCK_ACCESS_FS_TRUNCATE, whereas path-based
> accesses and O_PATH file descriptors are always checked against the
> rights of the calling thread.  The "Rights associated with
> file descriptors" section is updated accordingly.
> 
> Finally, the new section warns that most of the time,
> LANDLOCK_ACCESS_FS_READ_METADATA should be granted together with
> LANDLOCK_ACCESS_FS_READ_FILE and LANDLOCK_ACCESS_FS_READ_DIR:
> programs commonly read metadata alongside file contents and
> directory listings (e.g. with stat(2)) and do not expect such calls
> to fail, while denying only READ_FILE or READ_DIR does not hide
> metadata.
> 
> Signed-off-by: Cai Xinchen <caixinchen1 at huawei.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261027121151.1887650-1-caixinchen1@huawei.com?part=18




More information about the Linux-security-module-archive mailing list