<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/hwmon/stts751.c, branch v4.19</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>hwmon: (stts751) Fix buffer size passed to snprintf</title>
<updated>2017-10-30T01:36:03+00:00</updated>
<author>
<name>Jean Delvare</name>
<email>jdelvare@suse.de</email>
</author>
<published>2017-09-19T12:59:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=fc483a9bf795ebf49bf0c872d125391d8fee2f3f'/>
<id>fc483a9bf795ebf49bf0c872d125391d8fee2f3f</id>
<content type='text'>
Function snprintf already cares for the terminating NUL at the end of
the string, the caller doesn't need to do it.

Signed-off-by: Jean Delvare &lt;jdelvare@suse.de&gt;
Cc: Andrea Merello &lt;andrea.merello@gmail.com&gt;
Cc: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Function snprintf already cares for the terminating NUL at the end of
the string, the caller doesn't need to do it.

Signed-off-by: Jean Delvare &lt;jdelvare@suse.de&gt;
Cc: Andrea Merello &lt;andrea.merello@gmail.com&gt;
Cc: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (stts751) buffer overrun on wrong chip configuration</title>
<updated>2017-08-13T15:24:08+00:00</updated>
<author>
<name>Anton Vasilyev</name>
<email>vasilyev@ispras.ru</email>
</author>
<published>2017-08-10T16:46:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3be6bd690da0dafa55eb65279fb25297fcfe19d5'/>
<id>3be6bd690da0dafa55eb65279fb25297fcfe19d5</id>
<content type='text'>
If stts751 hw by some reason reports conversion rate bigger then 9:
        ret = i2c_smbus_read_byte_data(priv-&gt;client, STTS751_REG_RATE);
then dereferencing stts751_intervals[priv-&gt;interval] leads to buffer
overrun.

The patch adds sanity check for value stored on chip.

Found by Linux Driver Verification project (linuxtesting.org).

Fixes: 7f07ec0fa17a ("hwmon: new driver for ST stts751 thermal sensor")
Signed-off-by: Anton Vasilyev &lt;vasilyev@ispras.ru&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If stts751 hw by some reason reports conversion rate bigger then 9:
        ret = i2c_smbus_read_byte_data(priv-&gt;client, STTS751_REG_RATE);
then dereferencing stts751_intervals[priv-&gt;interval] leads to buffer
overrun.

The patch adds sanity check for value stored on chip.

Found by Linux Driver Verification project (linuxtesting.org).

Fixes: 7f07ec0fa17a ("hwmon: new driver for ST stts751 thermal sensor")
Signed-off-by: Anton Vasilyev &lt;vasilyev@ispras.ru&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: (stts751) Add OF device ID table</title>
<updated>2017-04-02T14:01:53+00:00</updated>
<author>
<name>Javier Martinez Canillas</name>
<email>javier@osg.samsung.com</email>
</author>
<published>2017-02-24T13:13:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1c1a7b75bf6f705d9f9440dea0e6d682882e3284'/>
<id>1c1a7b75bf6f705d9f9440dea0e6d682882e3284</id>
<content type='text'>
The driver doesn't have a struct of_device_id table but supported devices
are registered via Device Trees. This is working on the assumption that a
I2C device registered via OF will always match a legacy I2C device ID and
that the MODALIAS reported will always be of the form i2c:&lt;device&gt;.

But this could change in the future so the correct approach is to have an
OF device ID table if the devices are registered via OF.

Signed-off-by: Javier Martinez Canillas &lt;javier@osg.samsung.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The driver doesn't have a struct of_device_id table but supported devices
are registered via Device Trees. This is working on the assumption that a
I2C device registered via OF will always match a legacy I2C device ID and
that the MODALIAS reported will always be of the form i2c:&lt;device&gt;.

But this could change in the future so the correct approach is to have an
OF device ID table if the devices are registered via OF.

Signed-off-by: Javier Martinez Canillas &lt;javier@osg.samsung.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>hwmon: new driver for ST stts751 thermal sensor</title>
<updated>2017-02-03T13:32:59+00:00</updated>
<author>
<name>andrea.merello</name>
<email>andrea.merello@gmail.com</email>
</author>
<published>2017-02-02T07:44:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7f07ec0fa17ae6b4acf031d4c20a7da4f3fbc407'/>
<id>7f07ec0fa17ae6b4acf031d4c20a7da4f3fbc407</id>
<content type='text'>
This patch adds a HWMON driver for ST Microelectronics STTS751
temperature sensors.

Thanks-to: LABBE Corentin [for suggestions]
Thanks-to: Guenter Roeck [for suggestion and discussions]
Signed-off-by: Andrea Merello &lt;andrea.merello@gmail.com&gt;
Cc: LABBE Corentin &lt;clabbe.montjoie@gmail.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds a HWMON driver for ST Microelectronics STTS751
temperature sensors.

Thanks-to: LABBE Corentin [for suggestions]
Thanks-to: Guenter Roeck [for suggestion and discussions]
Signed-off-by: Andrea Merello &lt;andrea.merello@gmail.com&gt;
Cc: LABBE Corentin &lt;clabbe.montjoie@gmail.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
