[PATCH v2 -next 02/18] LSM: pass struct path to the inode_setsecctx hook

sashiko-bot at kernel.org sashiko-bot at kernel.org
Thu Oct 15 12:28:54 UTC 2026


> The inode_setsecctx hook and its security_inode_setsecctx() caller
> in fs/nfsd operate on a dentry even though both have a struct path
> available.  The SELinux and Smack implementations write the label
> through __vfs_setxattr_locked(), whose idmap argument they hardcode
> to &nop_mnt_idmap.
> 
> Switch the hook to take a const struct path so that the upcoming
> conversion of the xattr helpers to struct path can be reflected
> directly in the implementations.  For now the implementations keep
> passing &nop_mnt_idmap together with path->dentry to
> __vfs_setxattr_locked(), preserving the current behavior; they will
> be switched to pass the path itself once the xattr helpers take one.
> 
> Assisted-by: opencode: glm-5.3
> Signed-off-by: Cai Xinchen <caixinchen1 at huawei.com>

Sashiko has reviewed this patch and found no issues. It looks great!

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




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