diff mbox series

[SRU,Groovy] hwmon: (amd_energy) modify the visibility of the counters

Message ID 20201125225120.2431479-1-cascardo@canonical.com
State New
Headers show
Series [SRU,Groovy] hwmon: (amd_energy) modify the visibility of the counters | expand

Commit Message

Thadeu Lima de Souza Cascardo Nov. 25, 2020, 10:51 p.m. UTC
From: Naveen Krishna Chatradhi <nchatrad@amd.com>

This patch limits the visibility to owner and groups only for the
energy counters exposed through the hwmon based amd_energy driver.

Cc: stable@vger.kernel.org
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Naveen Krishna Chatradhi <nchatrad@amd.com>
Link: https://lore.kernel.org/r/20201112172159.8781-1-nchatrad@amd.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
(cherry picked from commit 60268b0e8258fdea9a3c9f4b51e161c123571db3)
CVE-2020-12912
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
---
 drivers/hwmon/amd_energy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Kamal Mostafa Nov. 25, 2020, 10:57 p.m. UTC | #1
LGTM.

Acked-by: Kamal Mostafa <kamal@canonical.com>

 -Kamal

On Wed, Nov 25, 2020 at 07:51:20PM -0300, Thadeu Lima de Souza Cascardo wrote:
> From: Naveen Krishna Chatradhi <nchatrad@amd.com>
> 
> This patch limits the visibility to owner and groups only for the
> energy counters exposed through the hwmon based amd_energy driver.
> 
> Cc: stable@vger.kernel.org
> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Naveen Krishna Chatradhi <nchatrad@amd.com>
> Link: https://lore.kernel.org/r/20201112172159.8781-1-nchatrad@amd.com
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> (cherry picked from commit 60268b0e8258fdea9a3c9f4b51e161c123571db3)
> CVE-2020-12912
> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
> ---
>  drivers/hwmon/amd_energy.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/hwmon/amd_energy.c b/drivers/hwmon/amd_energy.c
> index 29603742c858..0dee535e6c85 100644
> --- a/drivers/hwmon/amd_energy.c
> +++ b/drivers/hwmon/amd_energy.c
> @@ -209,7 +209,7 @@ static umode_t amd_energy_is_visible(const void *_data,
>  				     enum hwmon_sensor_types type,
>  				     u32 attr, int channel)
>  {
> -	return 0444;
> +	return 0440;
>  }
>  
>  static int energy_accumulator(void *p)
> -- 
> 2.27.0
> 
> 
> -- 
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
Ian May Nov. 25, 2020, 11:01 p.m. UTC | #2
LGTM

Acked-by: Ian May <ian.may@canonical.com>

On 2020-11-25 19:51:20 , Thadeu Lima de Souza Cascardo wrote:
> From: Naveen Krishna Chatradhi <nchatrad@amd.com>
> 
> This patch limits the visibility to owner and groups only for the
> energy counters exposed through the hwmon based amd_energy driver.
> 
> Cc: stable@vger.kernel.org
> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Naveen Krishna Chatradhi <nchatrad@amd.com>
> Link: https://lore.kernel.org/r/20201112172159.8781-1-nchatrad@amd.com
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> (cherry picked from commit 60268b0e8258fdea9a3c9f4b51e161c123571db3)
> CVE-2020-12912
> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
> ---
>  drivers/hwmon/amd_energy.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/hwmon/amd_energy.c b/drivers/hwmon/amd_energy.c
> index 29603742c858..0dee535e6c85 100644
> --- a/drivers/hwmon/amd_energy.c
> +++ b/drivers/hwmon/amd_energy.c
> @@ -209,7 +209,7 @@ static umode_t amd_energy_is_visible(const void *_data,
>  				     enum hwmon_sensor_types type,
>  				     u32 attr, int channel)
>  {
> -	return 0444;
> +	return 0440;
>  }
>  
>  static int energy_accumulator(void *p)
> -- 
> 2.27.0
> 
> 
> -- 
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
Kleber Souza Nov. 26, 2020, 3:11 p.m. UTC | #3
On 25.11.20 23:51, Thadeu Lima de Souza Cascardo wrote:
> From: Naveen Krishna Chatradhi <nchatrad@amd.com>
> 
> This patch limits the visibility to owner and groups only for the
> energy counters exposed through the hwmon based amd_energy driver.
> 
> Cc: stable@vger.kernel.org
> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Naveen Krishna Chatradhi <nchatrad@amd.com>
> Link: https://lore.kernel.org/r/20201112172159.8781-1-nchatrad@amd.com
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> (cherry picked from commit 60268b0e8258fdea9a3c9f4b51e161c123571db3)
> CVE-2020-12912
> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
> ---
>   drivers/hwmon/amd_energy.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/hwmon/amd_energy.c b/drivers/hwmon/amd_energy.c
> index 29603742c858..0dee535e6c85 100644
> --- a/drivers/hwmon/amd_energy.c
> +++ b/drivers/hwmon/amd_energy.c
> @@ -209,7 +209,7 @@ static umode_t amd_energy_is_visible(const void *_data,
>   				     enum hwmon_sensor_types type,
>   				     u32 attr, int channel)
>   {
> -	return 0444;
> +	return 0440;
>   }
>   
>   static int energy_accumulator(void *p)
> 

Applied to groovy/linux.

Thanks,
Kleber
diff mbox series

Patch

diff --git a/drivers/hwmon/amd_energy.c b/drivers/hwmon/amd_energy.c
index 29603742c858..0dee535e6c85 100644
--- a/drivers/hwmon/amd_energy.c
+++ b/drivers/hwmon/amd_energy.c
@@ -209,7 +209,7 @@  static umode_t amd_energy_is_visible(const void *_data,
 				     enum hwmon_sensor_types type,
 				     u32 attr, int channel)
 {
-	return 0444;
+	return 0440;
 }
 
 static int energy_accumulator(void *p)