<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/powercap/powercap_sys.c, branch v4.14.217</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.14.217</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.14.217'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2020-11-10T20:10:28+00:00</updated>
<entry>
<title>powercap: restrict energy meter to root access</title>
<updated>2020-11-10T20:10:28+00:00</updated>
<author>
<name>Len Brown</name>
<email>len.brown@intel.com</email>
</author>
<published>2020-11-10T21:00:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bab6310b64994ee6ca679d86c90ca24111783516'/>
<id>urn:sha1:bab6310b64994ee6ca679d86c90ca24111783516</id>
<content type='text'>
commit 949dd0104c496fa7c14991a23c03c62e44637e71 upstream.

Remove non-privileged user access to power data contained in
/sys/class/powercap/intel-rapl*/*/energy_uj

Non-privileged users currently have read access to power data and can
use this data to form a security attack. Some privileged
drivers/applications need read access to this data, but don't expose it
to non-privileged users.

For example, thermald uses this data to ensure that power management
works correctly. Thus removing non-privileged access is preferred over
completely disabling this power reporting capability with
CONFIG_INTEL_RAPL=n.

Fixes: 95677a9a3847 ("PowerCap: Fix mode for energy counter")
Signed-off-by: Len Brown &lt;len.brown@intel.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>PowerCap: Fix an error code in powercap_register_zone()</title>
<updated>2017-05-14T11:30:05+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2017-05-10T19:40:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=216c4e9db4c9d1d2a382b42880442dc632cd47d9'/>
<id>urn:sha1:216c4e9db4c9d1d2a382b42880442dc632cd47d9</id>
<content type='text'>
In the current code we accidentally return the successful result from
idr_alloc() instead of a negative error pointer.  The caller is looking
for an error pointer and so it treats the returned value as a valid
pointer.

This one might be a bit serious because if it lets people get around the
kernel's protection for remapping NULL.  I'm not sure.

Fixes: 75d2364ea0ca (PowerCap: Add class driver)
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Reviewed-by: Srinivas Pandruvada &lt;srinivas.pandruvada@linux.intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>powercap: constify powercap_zone_ops and powercap_zone_constraint_ops structures</title>
<updated>2016-01-01T23:29:35+00:00</updated>
<author>
<name>Julia Lawall</name>
<email>Julia.Lawall@lip6.fr</email>
</author>
<published>2015-12-23T21:59:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=600c395bf6c4e44ec831e850d7f93ce53d7373be'/>
<id>urn:sha1:600c395bf6c4e44ec831e850d7f93ce53d7373be</id>
<content type='text'>
The powercap_zone_ops and powercap_zone_constraint_ops structures are never
modified, so declare them as const.

Most of the actual changes adjust indentation to accomodate the const
keyword.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PowerCap: Fix mode for energy counter</title>
<updated>2013-12-05T01:05:48+00:00</updated>
<author>
<name>Srinivas Pandruvada</name>
<email>srinivas.pandruvada@linux.intel.com</email>
</author>
<published>2013-12-04T19:12:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=95677a9a3847de4f37e0f463aeb94aa8d5cccc50'/>
<id>urn:sha1:95677a9a3847de4f37e0f463aeb94aa8d5cccc50</id>
<content type='text'>
As per the documentation of powercap sysfs, energy_uj field is read only,
if it can't be reset. Currently it always allows write but will fail,
if there is no reset callback.
Changing mode field, to read only if there is no reset callback.

Signed-off-by: Srinivas Pandruvada &lt;srinivas.pandruvada@linux.intel.com&gt;
Reported-by: Dirk Brandewie &lt;dirk.j.brandewie@intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PowerCap: Fix build error with option -Werror=format-security</title>
<updated>2013-11-05T01:36:57+00:00</updated>
<author>
<name>Srinivas Pandruvada</name>
<email>srinivas.pandruvada@linux.intel.com</email>
</author>
<published>2013-11-04T16:53:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=08ff4cbe10da402e7c493ac72e298975f62a9e78'/>
<id>urn:sha1:08ff4cbe10da402e7c493ac72e298975f62a9e78</id>
<content type='text'>
Fix compile error with gcc option: -Werror=format-security for
dev_set_name(&amp;control_type-&gt;dev, name).

Changed to dev_set_name(&amp;control_type-&gt;dev, "%s", name).

Signed-off-by: Srinivas Pandruvada &lt;srinivas.pandruvada@linux.intel.com&gt;
Acked-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PowerCap: Convert class code to use dev_groups</title>
<updated>2013-10-25T21:16:31+00:00</updated>
<author>
<name>Thierry Reding</name>
<email>thierry.reding@gmail.com</email>
</author>
<published>2013-10-23T11:37:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9e3410b764b79670a59d6c1ccdcad483b92c058c'/>
<id>urn:sha1:9e3410b764b79670a59d6c1ccdcad483b92c058c</id>
<content type='text'>
The newly added power capping framework uses the obsolete .dev_attrs
field of struct class. However this field will be removed in 3.13, so
convert the code to use the .dev_groups field instead.

Signed-off-by: Thierry Reding &lt;treding@nvidia.com&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PowerCap: Add class driver</title>
<updated>2013-10-16T22:36:06+00:00</updated>
<author>
<name>Srinivas Pandruvada</name>
<email>srinivas.pandruvada@linux.intel.com</email>
</author>
<published>2013-10-11T23:54:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=75d2364ea0cab3a95be3f8d1f8dabd20ac4b1b2a'/>
<id>urn:sha1:75d2364ea0cab3a95be3f8d1f8dabd20ac4b1b2a</id>
<content type='text'>
The power capping framework providing a consistent interface between the
kernel and user space that allows power capping drivers to expose their
settings to user space in a uniform way.
The overall design of the framework is described in the documentation
added by the previous patch in this series.

Signed-off-by: Srinivas Pandruvada &lt;srinivas.pandruvada@linux.intel.com&gt;
Signed-off-by: Jacob Pan &lt;jacob.jun.pan@linux.intel.com&gt;
Reviewed-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
</feed>
