]> git.hungrycats.org Git - linux/commitdiff
drm/amdgpu: Adjust debugfs eviction and IB access permissions
authorAlex Deucher <alexander.deucher@amd.com>
Wed, 23 Oct 2024 20:39:36 +0000 (16:39 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 14 Nov 2024 12:15:15 +0000 (13:15 +0100)
commit f790a2c494c4ef587eeeb9fca20124de76a1646f upstream.

Users should not be able to run these.

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

index 06ab6066da61a8d0f8ad38e2fc9df39ded1f62e9..3cca3f07f34db7aefdc466af31b05e8ed09f1f46 100644 (file)
@@ -2009,11 +2009,11 @@ int amdgpu_debugfs_init(struct amdgpu_device *adev)
        amdgpu_securedisplay_debugfs_init(adev);
        amdgpu_fw_attestation_debugfs_init(adev);
 
-       debugfs_create_file("amdgpu_evict_vram", 0444, root, adev,
+       debugfs_create_file("amdgpu_evict_vram", 0400, root, adev,
                            &amdgpu_evict_vram_fops);
-       debugfs_create_file("amdgpu_evict_gtt", 0444, root, adev,
+       debugfs_create_file("amdgpu_evict_gtt", 0400, root, adev,
                            &amdgpu_evict_gtt_fops);
-       debugfs_create_file("amdgpu_test_ib", 0444, root, adev,
+       debugfs_create_file("amdgpu_test_ib", 0400, root, adev,
                            &amdgpu_debugfs_test_ib_fops);
        debugfs_create_file("amdgpu_vm_info", 0444, root, adev,
                            &amdgpu_debugfs_vm_info_fops);