Re: [PATCH v3 -next 00/18] landlock: Add READ_METADATA and WRITE_METADATA access rights
From: Christian Brauner
Date: Tue Nov 10 2026 - 12:07:31 EST
On Tue, Oct 27, 2026 at 08:11:33PM +0800, Cai Xinchen wrote:
> - The idmap is passed separately from the struct path again, instead
> of being derived from path->mnt inside the helpers and the hooks.
> As Christian explains in his review of patch 1, the idmap must be
> taken of the mount at the time it was checked and passed down to
> the filesystem so that the VFS and the filesystem are guaranteed
> to see the same idmap.
This regresses AT_EMPTY_PATH. fchmodat2(), fchownat() and utimensat()
with an empty path now go through CLASS(fd) which is fdget() and that
refuses O_PATH file descriptors. IOW, this is very very broken.
Please also go through Sashiko's review of v3 (cf. [1]). The new struct
file arguments need __nullable or bpf programs can dereference NULL,
and the ntfs3 stream setattr and overlayfs fileattr paths that bypass
the hooks need treatment.
[1]: https://sashiko.dev/#/patchset/20261027121151.1887650-1-caixinchen1%40huawei.com
--