From: jsg Date: Thu, 22 Jun 2023 05:14:26 +0000 (+0000) Subject: drm/amd: Tighten permissions on VBIOS flashing attributes X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=b5e4d8baa02ec72f235942335f1bfd7d1f44cc7a;p=openbsd drm/amd: Tighten permissions on VBIOS flashing attributes From Mario Limonciello b69a10df900386871703a4cc3be974485f52ff7c in linux-6.1.y/6.1.35 7ab1a4913d0051cf5196ef7987b5fa42c25e13b6 in mainline linux --- diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_psp.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_psp.c index cdd12fa064d..c8c5c26942a 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_psp.c +++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_psp.c @@ -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) {