aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
diff options
context:
space:
mode:
authorStefan Berger <[email protected]>2024-02-23 17:25:07 +0000
committerMimi Zohar <[email protected]>2024-04-09 21:14:57 +0000
commitfaf994811e0548df854e5fd946f3094725fcd9b5 (patch)
tree9c4c4d4924aa816038e46fee1d4a4e455cb87174 /drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
parentevm: Implement per signature type decision in security_inode_copy_up_xattr (diff)
downloadkernel-faf994811e0548df854e5fd946f3094725fcd9b5.tar.gz
kernel-faf994811e0548df854e5fd946f3094725fcd9b5.zip
evm: Use the metadata inode to calculate metadata hash
Changes to file attributes (mode bits, uid, gid) on the lower layer are not taken into account when d_backing_inode() is used when a file is accessed on the overlay layer and this file has not yet been copied up. This is because d_backing_inode() does not return the real inode of the lower layer but instead returns the backing inode which in this case holds wrong file attributes. Further, when CONFIG_OVERLAY_FS_METACOPY is enabled and a copy-up is triggered due to file metadata changes, then the metadata are held by the backing inode while the data are still held by the real inode. Therefore, use d_inode(d_real(dentry, D_REAL_METADATA)) to get to the file's metadata inode and use it to calculate the metadata hash with. Co-developed-by: Mimi Zohar <[email protected]> Signed-off-by: Stefan Berger <[email protected]> Acked-by: Amir Goldstein <[email protected]> Signed-off-by: Mimi Zohar <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_object.c')
0 files changed, 0 insertions, 0 deletions