[PATCH -next -v4 15/17] selftests/landlock: Add tests for metadata access rights

sashiko-bot at kernel.org sashiko-bot at kernel.org
Tue Nov 17 15:12:39 UTC 2026


> Add layout1 and layout2_overlay tests for the two new rights:
> unhandled_metadata, write_metadata, read_metadata, fileattr,
> fileattr_write_only, metadata_open_time and metadata_transfer.  They
> cover the metadata system calls, the fileattr interfaces, the open-time
> semantic and the transfer of file descriptors between processes.
> 
> The file descriptor-based checks reopen their files after the ruleset is
> enforced, so that the rights come from the rules rather than from
> descriptors opened before the sandbox, and the chown(2) no-op tests use
> the effective group ID so that they also pass as non-root.
> 
> The fallback syscall numbers for file_getattr(2) and file_setattr(2) are
> overridden on alpha and MIPS, which do not use the generic numbers.
> 
> 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/20261117150542.1169451-1-caixinchen1@huawei.com?part=15




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