Skip to content

Commit 7ab1a49

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: [email protected] Fixes: 8424f2c ("drm/amdgpu/psp: Add vbflash sysfs interface support") Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Mario Limonciello <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 3eb1a3a commit 7ab1a49

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

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

36043604
static const struct bin_attribute psp_vbflash_bin_attr = {
3605-
.attr = {.name = "psp_vbflash", .mode = 0664},
3605+
.attr = {.name = "psp_vbflash", .mode = 0660},
36063606
.size = 0,
36073607
.write = amdgpu_psp_vbflash_write,
36083608
.read = amdgpu_psp_vbflash_read,
36093609
};
36103610

3611-
static DEVICE_ATTR(psp_vbflash_status, 0444, amdgpu_psp_vbflash_status, NULL);
3611+
static DEVICE_ATTR(psp_vbflash_status, 0440, amdgpu_psp_vbflash_status, NULL);
36123612

36133613
int amdgpu_psp_sysfs_init(struct amdgpu_device *adev)
36143614
{

0 commit comments

Comments
 (0)