<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/iio/humidity/hts221_buffer.c, branch linux-5.4.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.4.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.4.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2020-07-22T07:32:54Z</updated>
<entry>
<title>iio:humidity:hts221 Fix alignment and data leak issues</title>
<updated>2020-07-22T07:32:54Z</updated>
<author>
<name>Jonathan Cameron</name>
</author>
<published>2020-06-07T15:53:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5a6378911f221b615a55f70070fe742b1900e388'/>
<id>urn:sha1:5a6378911f221b615a55f70070fe742b1900e388</id>
<content type='text'>
commit 5c49056ad9f3c786f7716da2dd47e4488fc6bd25 upstream.

One of a class of bugs pointed out by Lars in a recent review.
iio_push_to_buffers_with_timestamp assumes the buffer used is aligned
to the size of the timestamp (8 bytes).  This is not guaranteed in
this driver which uses an array of smaller elements on the stack.
As Lars also noted this anti pattern can involve a leak of data to
userspace and that indeed can happen here.  We close both issues by
moving to a suitable structure in the iio_priv() data.
This data is allocated with kzalloc so no data can leak
apart from previous readings.

Explicit alignment of ts needed to ensure consistent padding
on all architectures (particularly x86_32 with it's 4 byte alignment
of s64)

Fixes: e4a70e3e7d84 ("iio: humidity: add support to hts221 rh/temp combo device")
Reported-by: Lars-Peter Clausen &lt;lars@metafoo.de&gt;
Acked-by: Lorenzo Bianconi &lt;lorenzo@kernel.org&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Cc: &lt;Stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 177</title>
<updated>2019-05-30T18:29:19Z</updated>
<author>
<name>Thomas Gleixner</name>
</author>
<published>2019-05-28T16:57:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fda8d26e61fc518499ddc78ae74ec1aaa89c4134'/>
<id>urn:sha1:fda8d26e61fc518499ddc78ae74ec1aaa89c4134</id>
<content type='text'>
Based on 1 normalized pattern(s):

  licensed under the gpl 2

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

has been chosen to replace the boilerplate/reference in 135 file(s).

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Allison Randal &lt;allison@lohutok.net&gt;
Reviewed-by: Richard Fontana &lt;rfontana@redhat.com&gt;
Reviewed-by: Alexios Zavras &lt;alexios.zavras@intel.com&gt;
Reviewed-by: Steve Winslow &lt;swinslow@gmail.com&gt;
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190528170026.071193225@linutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>iio: humidity: hts221: add regmap API support</title>
<updated>2018-01-30T18:33:18Z</updated>
<author>
<name>Lorenzo Bianconi</name>
</author>
<published>2018-01-08T22:12:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=621779220bfc5d2f3e3790e491ae9f91372a12e7'/>
<id>urn:sha1:621779220bfc5d2f3e3790e491ae9f91372a12e7</id>
<content type='text'>
Introduce regmap API support to access to i2c/spi bus instead of
using a custom support.
Remove lock mutex since concurrency is already managed by regmap API

Signed-off-by: Lorenzo Bianconi &lt;lorenzo.bianconi@redhat.com&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: humidity: hts221: remove trailing whitespace from a comment</title>
<updated>2018-01-30T18:33:16Z</updated>
<author>
<name>Lorenzo Bianconi</name>
</author>
<published>2018-01-08T22:12:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b62c4a96a6627793b2ac2ad3530e37a1cec29559'/>
<id>urn:sha1:b62c4a96a6627793b2ac2ad3530e37a1cec29559</id>
<content type='text'>
Signed-off-by: Lorenzo Bianconi &lt;lorenzo.bianconi@redhat.com&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio:humidity: drop assign iio_info.driver_module and iio_trigger_ops.owner</title>
<updated>2017-08-22T20:30:20Z</updated>
<author>
<name>Jonathan Cameron</name>
</author>
<published>2017-07-23T16:25:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=13a8c6c2a1138309dcf7744cb4db7aea54d8085a'/>
<id>urn:sha1:13a8c6c2a1138309dcf7744cb4db7aea54d8085a</id>
<content type='text'>
The equivalent of both of these are now done via macro magic when
the relevant register calls are made.  The actual structure
elements will shortly go away.

Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
Reviewed-by: Lars-Peter Clausen &lt;lars@metafoo.de&gt;
</content>
</entry>
<entry>
<title>iio: humidity: hts221: move drdy enable logic in hts221_trig_set_state()</title>
<updated>2017-07-25T19:03:04Z</updated>
<author>
<name>Lorenzo Bianconi</name>
</author>
<published>2017-07-17T17:39:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f3f0ae16f0ce2a11067b958c7cf2a48c32ea6d60'/>
<id>urn:sha1:f3f0ae16f0ce2a11067b958c7cf2a48c32ea6d60</id>
<content type='text'>
Move data-ready configuration in hts221_buffer.c since it is only related
to trigger logic

Signed-off-by: Lorenzo Bianconi &lt;lorenzo.bianconi@st.com&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: humidity: hts221: support open drain mode</title>
<updated>2017-07-25T19:00:47Z</updated>
<author>
<name>Lorenzo Bianconi</name>
</author>
<published>2017-07-17T17:39:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9251f7aaa53c0315c45ee000461002f971f01ea0'/>
<id>urn:sha1:9251f7aaa53c0315c45ee000461002f971f01ea0</id>
<content type='text'>
Add open drain support in order to share requested IRQ line between
hts221 device and other peripherals

Signed-off-by: Lorenzo Bianconi &lt;lorenzo.bianconi@st.com&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: humidity: hts221: support active-low interrupts</title>
<updated>2017-07-22T20:21:46Z</updated>
<author>
<name>Lorenzo Bianconi</name>
</author>
<published>2017-07-17T17:39:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e7b4b45e1e1f22585cfc986b1c5c99e124def10e'/>
<id>urn:sha1:e7b4b45e1e1f22585cfc986b1c5c99e124def10e</id>
<content type='text'>
Add support for active low interrupts (IRQF_TRIGGER_LOW and
IRQF_TRIGGER_FALLING). Configure the device as active high or low
according to the requested irq line.

Signed-off-by: Lorenzo Bianconi &lt;lorenzo.bianconi@st.com&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: humidity: hts221: squash hts221_power_on/off in hts221_set_enable</title>
<updated>2017-07-22T20:20:48Z</updated>
<author>
<name>Lorenzo Bianconi</name>
</author>
<published>2017-07-17T17:39:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e3e25446a3d2d1beb2443b65a919e59a060182d5'/>
<id>urn:sha1:e3e25446a3d2d1beb2443b65a919e59a060182d5</id>
<content type='text'>
Signed-off-by: Lorenzo Bianconi &lt;lorenzo.bianconi@st.com&gt;
Signed-off-by: Jonathan Cameron &lt;Jonathan.Cameron@huawei.com&gt;
</content>
</entry>
<entry>
<title>iio: humidity: hts221: Remove unnecessary cast on void pointer</title>
<updated>2017-04-02T08:50:32Z</updated>
<author>
<name>simran singhal</name>
</author>
<published>2017-04-01T14:14:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7ae6df68d68ed1d68d6bac11edc332da67108d8f'/>
<id>urn:sha1:7ae6df68d68ed1d68d6bac11edc332da67108d8f</id>
<content type='text'>
The following Coccinelle script was used to detect this:
@r@
expression x;
void* e;
type T;
identifier f;
@@
(
  *((T *)e)
|
  ((T *)x)[...]
|
  ((T*)x)-&gt;f
|
- (T*)
  e
)

Signed-off-by: simran singhal &lt;singhalsimran0@gmail.com&gt;
Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
</content>
</entry>
</feed>
