linux_dsm_epyc7002/drivers/iio/pressure
Jonathan Cameron 8db4afe163 iio:pressure:ms5611 Fix buffer element alignment
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.
Here there is no data leak possibility so use an explicit structure
on the stack to ensure alignment and nice readable fashion.

The forced alignment of ts isn't strictly necessary in this driver
as the padding will be correct anyway (there isn't any).  However
it is probably less fragile to have it there and it acts as
documentation of the requirement.

Fixes: 713bbb4efb ("iio: pressure: ms5611: Add triggered buffer support")
Reported-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Acked-by: Tomasz Duszynski <tomasz.duszynski@octakon.com>
Cc: <Stable@vger.kernel.org>
2020-07-05 14:22:48 +01:00
..
abp060mg.c
bmp280-core.c iio: bmp280: fix compensation of humidity 2020-05-11 20:19:19 +01:00
bmp280-i2c.c iio: pressure: bmp280: Allow device to be enumerated from ACPI 2019-12-29 15:20:10 +00:00
bmp280-regmap.c
bmp280-spi.c iio: pressure: bmp280: use devm action and remove labels from probe 2019-10-22 11:10:23 +01:00
bmp280.h iio: pressure: bmp280: use devm action and remove labels from probe 2019-10-22 11:10:23 +01:00
cros_ec_baro.c iio: cros_ec: Expose hwfifo_timeout 2020-03-28 22:04:33 +01:00
dlhl60d.c iio: pressure: Add driver for DLH pressure sensors 2019-12-29 15:20:08 +00:00
dps310.c
hid-sensor-press.c iio: hid-sensors: move triggered buffer setup into hid_sensor_setup_trigger 2020-05-10 09:35:53 +01:00
hp03.c
hp206c.c iio: pressure: hp206c: Use get_unaligned_be24() 2020-05-03 09:47:20 +01:00
icp10100.c counter: 104-quad-8: Support Filter Clock Prescaler 2020-03-08 17:28:52 +00:00
Kconfig iio: pressure: icp10100: add driver for InvenSense ICP-101xx 2020-03-08 17:28:52 +00:00
Makefile iio: pressure: icp10100: add driver for InvenSense ICP-101xx 2020-03-08 17:28:52 +00:00
mpl115_i2c.c
mpl115_spi.c
mpl115.c
mpl115.h
mpl3115.c
ms5611_core.c iio:pressure:ms5611 Fix buffer element alignment 2020-07-05 14:22:48 +01:00
ms5611_i2c.c iio: pressure: ms5611: Use get_unaligned_be24() 2020-05-03 09:47:20 +01:00
ms5611_spi.c iio: pressure: ms5611: Use get_unaligned_be24() 2020-05-03 09:47:20 +01:00
ms5611.h
ms5637.c
st_pressure_buffer.c
st_pressure_core.c iio: st_sensors: Drop unneeded explicit castings 2020-03-21 10:26:21 +00:00
st_pressure_i2c.c iio: st_sensors: Make use of device properties 2020-01-13 21:53:39 +00:00
st_pressure_spi.c iio: st_sensors: Make use of device properties 2020-01-13 21:53:39 +00:00
st_pressure.h iio: pressure: st_press: Mark default_press_pdata with __maybe_unused 2019-12-29 15:20:05 +00:00
t5403.c
zpa2326_i2c.c
zpa2326_spi.c
zpa2326.c iio: pressure: zpa2326: handle pm_runtime_get_sync failure 2020-06-14 15:25:04 +01:00
zpa2326.h