]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
drm/amdgpu: Adjust debugfs register access permissions
authorAlex Deucher <alexander.deucher@amd.com>
Wed, 23 Oct 2024 20:37:52 +0000 (16:37 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 5 Nov 2024 15:53:21 +0000 (10:53 -0500)
Regular users shouldn't have read access.

Reviewed-by: Yang Wang <kevinyang.wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit c0cfd2e652553d607b910be47d0cc5a7f3a78641)
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c

index cbef720de779715bf38607c3f5225ba681b578ed..29b45e370885788dbf525394e0f33b834051aba7 100644 (file)
@@ -1648,7 +1648,7 @@ int amdgpu_debugfs_regs_init(struct amdgpu_device *adev)
 
        for (i = 0; i < ARRAY_SIZE(debugfs_regs); i++) {
                ent = debugfs_create_file(debugfs_regs_names[i],
-                                         S_IFREG | 0444, root,
+                                         S_IFREG | 0400, root,
                                          adev, debugfs_regs[i]);
                if (!i && !IS_ERR_OR_NULL(ent))
                        i_size_write(ent->d_inode, adev->rmmio_size);