Skip to content

Commit fe56c6e

Browse files
superm1alexdeucher
authored andcommitted
drm/amd: Tighten permissions on VBIOS flashing attributes
Non-root users shouldn't be able to try to trigger a VBIOS flash or query the flashing status. This should be reserved for users with the appropriate permissions. Cc: stable@vger.kernel.org Fixes: 8424f2c ("drm/amdgpu/psp: Add vbflash sysfs interface support") Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 3537d6a commit fe56c6e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3671,13 +3671,13 @@ static ssize_t amdgpu_psp_vbflash_status(struct device *dev,
36713671
}
36723672

36733673
static const struct bin_attribute psp_vbflash_bin_attr = {
3674-
.attr = {.name = "psp_vbflash", .mode = 0664},
3674+
.attr = {.name = "psp_vbflash", .mode = 0660},
36753675
.size = 0,
36763676
.write = amdgpu_psp_vbflash_write,
36773677
.read = amdgpu_psp_vbflash_read,
36783678
};
36793679

3680-
static DEVICE_ATTR(psp_vbflash_status, 0444, amdgpu_psp_vbflash_status, NULL);
3680+
static DEVICE_ATTR(psp_vbflash_status, 0440, amdgpu_psp_vbflash_status, NULL);
36813681

36823682
int amdgpu_psp_sysfs_init(struct amdgpu_device *adev)
36833683
{

0 commit comments

Comments
 (0)