stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] hwmon: amd_energy: modify the visibility of the counters
@ 2020-11-12 17:21 Naveen Krishna Chatradhi
  2020-11-12 17:24 ` Guenter Roeck
  0 siblings, 1 reply; 9+ messages in thread
From: Naveen Krishna Chatradhi @ 2020-11-12 17:21 UTC (permalink / raw)
  To: linux-hwmon; +Cc: naveenkrishna.ch, Naveen Krishna Chatradhi, stable

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>
---
 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 d06597303d5a..3197cda7bcd9 100644
--- a/drivers/hwmon/amd_energy.c
+++ b/drivers/hwmon/amd_energy.c
@@ -171,7 +171,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.17.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread
* [PATCH] hwmon: amd_energy: modify the visibility of the counters
@ 2020-11-09  9:07 Naveen Krishna Chatradhi
  0 siblings, 0 replies; 9+ messages in thread
From: Naveen Krishna Chatradhi @ 2020-11-09  9:07 UTC (permalink / raw)
  To: security; +Cc: naveenkrishna.ch, Naveen Krishna Chatradhi, stable

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>
---
 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 d06597303d5a..3197cda7bcd9 100644
--- a/drivers/hwmon/amd_energy.c
+++ b/drivers/hwmon/amd_energy.c
@@ -171,7 +171,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.17.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-11-22 18:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-12 17:21 [PATCH] hwmon: amd_energy: modify the visibility of the counters Naveen Krishna Chatradhi
2020-11-12 17:24 ` Guenter Roeck
2020-11-13 13:58   ` Salvatore Bonaccorso
2020-11-13 14:47     ` Guenter Roeck
2020-11-22  6:56     ` Chatradhi, Naveen Krishna
2020-11-22 13:30       ` Guenter Roeck
2020-11-22 16:42         ` Chatradhi, Naveen Krishna
2020-11-22 18:09           ` Guenter Roeck
  -- strict thread matches above, loose matches on Subject: below --
2020-11-09  9:07 Naveen Krishna Chatradhi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).