Re: [PATCH] PCI/sysfs: Fix read permissions for VPD attributes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 28, 2024 at 10:05:33AM +0200, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro@xxxxxxxxxx>
> 
> The Virtual Product Data (VPD) attribute is not readable by regular
> user without root permissions. Such restriction is not really needed,
> as data presented in that VPD is not sensitive at all.
> 
> This change aligns the permissions of the VPD attribute to be accessible
> for read by all users, while write being restricted to root only.
> 
> Cc: stable@xxxxxxxxxxxxxxx
> Fixes: d93f8399053d ("PCI/sysfs: Convert "vpd" to static attribute")
> Signed-off-by: Leon Romanovsky <leonro@xxxxxxxxxx>

Applied to pci/vpd for v6.13, thanks!

> ---
> I added stable@ as it was discovered during our hardware ennoblement
> and it is important to be picked by distributions too.
> ---
>  drivers/pci/vpd.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/vpd.c b/drivers/pci/vpd.c
> index e4300f5f304f..2537685cac90 100644
> --- a/drivers/pci/vpd.c
> +++ b/drivers/pci/vpd.c
> @@ -317,7 +317,7 @@ static ssize_t vpd_write(struct file *filp, struct kobject *kobj,
>  
>  	return ret;
>  }
> -static BIN_ATTR(vpd, 0600, vpd_read, vpd_write, 0);
> +static BIN_ATTR_RW(vpd, 0);
>  
>  static struct bin_attribute *vpd_attrs[] = {
>  	&bin_attr_vpd,
> -- 
> 2.46.2
> 




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux