drm/amd: Tighten permissions on VBIOS flashing attributes
authorjsg <jsg@openbsd.org>
Thu, 22 Jun 2023 05:14:26 +0000 (05:14 +0000)
committerjsg <jsg@openbsd.org>
Thu, 22 Jun 2023 05:14:26 +0000 (05:14 +0000)
From Mario Limonciello
b69a10df900386871703a4cc3be974485f52ff7c in linux-6.1.y/6.1.35
7ab1a4913d0051cf5196ef7987b5fa42c25e13b6 in mainline linux

sys/dev/pci/drm/amd/amdgpu/amdgpu_psp.c

index cdd12fa..c8c5c26 100644 (file)
@@ -3626,14 +3626,14 @@ static ssize_t amdgpu_psp_vbflash_status(struct device *dev,
 
 #ifdef notyet
 static const struct bin_attribute psp_vbflash_bin_attr = {
-       .attr = {.name = "psp_vbflash", .mode = 0664},
+       .attr = {.name = "psp_vbflash", .mode = 0660},
        .size = 0,
        .write = amdgpu_psp_vbflash_write,
        .read = amdgpu_psp_vbflash_read,
 };
 #endif
 
-static DEVICE_ATTR(psp_vbflash_status, 0444, amdgpu_psp_vbflash_status, NULL);
+static DEVICE_ATTR(psp_vbflash_status, 0440, amdgpu_psp_vbflash_status, NULL);
 
 int amdgpu_psp_sysfs_init(struct amdgpu_device *adev)
 {