Re: [PATCH] firmware: dmi: Fix permissions of product_family

2017-06-01 Thread Mika Westerberg
On Thu, Jun 01, 2017 at 03:09:26PM +0200, Jean Delvare wrote:
> This is not sensitive information like serial numbers, we can allow
> all users to read it.
> 
> Fix odd alignment while we're here.
> 
> Signed-off-by: Jean Delvare 
> Fixes: c61872c9833d ("firmware: dmi: Add DMI_PRODUCT_FAMILY identification 
> string")
> Cc: Dmitry Torokhov 
> Cc: Mika Westerberg 

Reviewed-by: Mika Westerberg 


Re: [PATCH] firmware: dmi: Fix permissions of product_family

2017-06-01 Thread Andy Shevchenko
On Thu, Jun 1, 2017 at 4:09 PM, Jean Delvare  wrote:
> This is not sensitive information like serial numbers, we can allow
> all users to read it.
>
> Fix odd alignment while we're here.

Reviewed-by: Andy Shevchenko 


>
> Signed-off-by: Jean Delvare 
> Fixes: c61872c9833d ("firmware: dmi: Add DMI_PRODUCT_FAMILY identification 
> string")
> Cc: Dmitry Torokhov 
> Cc: Mika Westerberg 
> Cc: Andy Shevchenko 
> Cc: Linus Walleij 
> ---
>  drivers/firmware/dmi-id.c |4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> --- linux-4.11.orig/drivers/firmware/dmi-id.c   2017-06-01 13:49:59.933485745 
> +0200
> +++ linux-4.11/drivers/firmware/dmi-id.c2017-06-01 14:43:58.205186555 
> +0200
> @@ -47,7 +47,7 @@ DEFINE_DMI_ATTR_WITH_SHOW(product_name,
>  DEFINE_DMI_ATTR_WITH_SHOW(product_version, 0444, DMI_PRODUCT_VERSION);
>  DEFINE_DMI_ATTR_WITH_SHOW(product_serial,  0400, DMI_PRODUCT_SERIAL);
>  DEFINE_DMI_ATTR_WITH_SHOW(product_uuid,0400, 
> DMI_PRODUCT_UUID);
> -DEFINE_DMI_ATTR_WITH_SHOW(product_family,  0400, DMI_PRODUCT_FAMILY);
> +DEFINE_DMI_ATTR_WITH_SHOW(product_family,  0444, DMI_PRODUCT_FAMILY);
>  DEFINE_DMI_ATTR_WITH_SHOW(board_vendor,0444, 
> DMI_BOARD_VENDOR);
>  DEFINE_DMI_ATTR_WITH_SHOW(board_name,  0444, DMI_BOARD_NAME);
>  DEFINE_DMI_ATTR_WITH_SHOW(board_version,   0444, DMI_BOARD_VERSION);
> @@ -192,7 +192,7 @@ static void __init dmi_id_init_attr_tabl
> ADD_DMI_ATTR(product_version,   DMI_PRODUCT_VERSION);
> ADD_DMI_ATTR(product_serial,DMI_PRODUCT_SERIAL);
> ADD_DMI_ATTR(product_uuid,  DMI_PRODUCT_UUID);
> -   ADD_DMI_ATTR(product_family,  DMI_PRODUCT_FAMILY);
> +   ADD_DMI_ATTR(product_family,DMI_PRODUCT_FAMILY);
> ADD_DMI_ATTR(board_vendor,  DMI_BOARD_VENDOR);
> ADD_DMI_ATTR(board_name,DMI_BOARD_NAME);
> ADD_DMI_ATTR(board_version, DMI_BOARD_VERSION);
>
>
> --
> Jean Delvare
> SUSE L3 Support



-- 
With Best Regards,
Andy Shevchenko


[PATCH] firmware: dmi: Fix permissions of product_family

2017-06-01 Thread Jean Delvare
This is not sensitive information like serial numbers, we can allow
all users to read it.

Fix odd alignment while we're here.

Signed-off-by: Jean Delvare 
Fixes: c61872c9833d ("firmware: dmi: Add DMI_PRODUCT_FAMILY identification 
string")
Cc: Dmitry Torokhov 
Cc: Mika Westerberg 
Cc: Andy Shevchenko 
Cc: Linus Walleij 
---
 drivers/firmware/dmi-id.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- linux-4.11.orig/drivers/firmware/dmi-id.c   2017-06-01 13:49:59.933485745 
+0200
+++ linux-4.11/drivers/firmware/dmi-id.c2017-06-01 14:43:58.205186555 
+0200
@@ -47,7 +47,7 @@ DEFINE_DMI_ATTR_WITH_SHOW(product_name,
 DEFINE_DMI_ATTR_WITH_SHOW(product_version, 0444, DMI_PRODUCT_VERSION);
 DEFINE_DMI_ATTR_WITH_SHOW(product_serial,  0400, DMI_PRODUCT_SERIAL);
 DEFINE_DMI_ATTR_WITH_SHOW(product_uuid,0400, DMI_PRODUCT_UUID);
-DEFINE_DMI_ATTR_WITH_SHOW(product_family,  0400, DMI_PRODUCT_FAMILY);
+DEFINE_DMI_ATTR_WITH_SHOW(product_family,  0444, DMI_PRODUCT_FAMILY);
 DEFINE_DMI_ATTR_WITH_SHOW(board_vendor,0444, DMI_BOARD_VENDOR);
 DEFINE_DMI_ATTR_WITH_SHOW(board_name,  0444, DMI_BOARD_NAME);
 DEFINE_DMI_ATTR_WITH_SHOW(board_version,   0444, DMI_BOARD_VERSION);
@@ -192,7 +192,7 @@ static void __init dmi_id_init_attr_tabl
ADD_DMI_ATTR(product_version,   DMI_PRODUCT_VERSION);
ADD_DMI_ATTR(product_serial,DMI_PRODUCT_SERIAL);
ADD_DMI_ATTR(product_uuid,  DMI_PRODUCT_UUID);
-   ADD_DMI_ATTR(product_family,  DMI_PRODUCT_FAMILY);
+   ADD_DMI_ATTR(product_family,DMI_PRODUCT_FAMILY);
ADD_DMI_ATTR(board_vendor,  DMI_BOARD_VENDOR);
ADD_DMI_ATTR(board_name,DMI_BOARD_NAME);
ADD_DMI_ATTR(board_version, DMI_BOARD_VERSION);


-- 
Jean Delvare
SUSE L3 Support