linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/16] IIO: Enable runtime checks on buffers size and related.
@ 2025-08-02 16:44 Jonathan Cameron
  2025-08-02 16:44 ` [PATCH 01/16] iio: light: as73211: Ensure buffer holes are zeroed Jonathan Cameron
                   ` (16 more replies)
  0 siblings, 17 replies; 45+ messages in thread
From: Jonathan Cameron @ 2025-08-02 16:44 UTC (permalink / raw)
  To: linux-iio, David Lechner, Nuno Sá, Andy Shevchenko
  Cc: Mudit Sharma, Jiri Kosina, Srinivas Pandruvada, Javier Carrasco,
	Matti Vaittinen, Abhash Jha, Astrid Rost, Mårten Lindahl,
	Gwendal Grignou, Christian Eggers, Jonathan Cameron

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

Main aim here is to switch almost all of the light drivers over to
iio_push_to_buffers_with_ts() to provide runtime checking that we aren't
copying from beyond the provided buffers.

A couple of bugs showed up whilst doing these conversions that should be
back ported (patches 1 and 2).

Various other cases benefit from conversion from arrays to structures
and putting the temporary storage on the stack. Given these cases are
a little more complex, they are done as one or more patch per driver.

The cases that were just a simple change of function call from
iio_push_to_buffers_with_timestamp() are grouped together in the
final patch as not much to say about them and if we do a patch per
driver this and related sets will be unnecessarily long!

If people would prefer I split that up that would be fine.

Jonathan


Jonathan Cameron (16):
  iio: light: as73211: Ensure buffer holes are zeroed
  iio: light: vcnl4035: Fix endianness vs data placement in buffer
    issue.
  iio: light: as73211: Use iio_push_to_buffers_with_ts() to allow source
    size runtime check
  iio: light: vcnl4035: Use a structure to make buffer arrangement
    explicit.
  iio: light: vcnl4035: Use iio_push_to_buffers_with_ts() to allow
    runtime source buffer size check.
  iio: light: acpi-als: Use a structure for layout of data to push to
    buffer.
  iio: light: acpi-als: Use iio_push_to_buffers_with_ts() to allow
    runtime source size check
  iio: light: adjd_s311: Use iio_push_to_buffers_with_ts() to allow
    source size runtime check
  iio: light: isl29125: Use iio_push_to_buffers_with_ts() to allow
    source size runtime check
  iio: light: max44000: Use iio_push_to_buffers_with_ts() to allow
    source size runtime check
  iio: light: st_uvis25: Use iio_push_to_buffers_with_ts() to allow
    source size runtime check
  iio: light: tcs3414: Use iio_push_to_buffers_with_ts() to allow source
    size runtime check
  iio: light: tcs3472: Use iio_push_to_buffers_with_ts() to allow source
    size runtime check
  iio: light: vcnl4000: Use a structure to make buffer arrangement
    explicit.
  iio: light: vl6180: Use iio_push_to_buffers_with_ts() to allow source
    size runtime check
  iio: light: Simple conversions to iio_push_to_buffers_with_ts()

 drivers/iio/light/acpi-als.c       | 19 ++++++-------------
 drivers/iio/light/adjd_s311.c      | 12 ++++++------
 drivers/iio/light/as73211.c        |  5 +++--
 drivers/iio/light/bh1745.c         |  4 ++--
 drivers/iio/light/hid-sensor-als.c |  5 +++--
 drivers/iio/light/isl29125.c       | 14 +++++++-------
 drivers/iio/light/ltr501.c         |  4 ++--
 drivers/iio/light/max44000.c       | 18 +++++++++---------
 drivers/iio/light/opt4060.c        |  2 +-
 drivers/iio/light/rohm-bu27034.c   |  3 ++-
 drivers/iio/light/rpr0521.c        |  4 ++--
 drivers/iio/light/si1145.c         |  5 +++--
 drivers/iio/light/st_uvis25.h      |  5 -----
 drivers/iio/light/st_uvis25_core.c | 12 +++++++++---
 drivers/iio/light/tcs3414.c        | 15 ++++++++-------
 drivers/iio/light/tcs3472.c        | 14 +++++++-------
 drivers/iio/light/vcnl4000.c       | 11 +++++++----
 drivers/iio/light/vcnl4035.c       | 13 +++++++++----
 drivers/iio/light/veml6030.c       |  2 +-
 drivers/iio/light/vl6180.c         | 14 +++++++-------
 20 files changed, 94 insertions(+), 87 deletions(-)

-- 
2.50.1


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

end of thread, other threads:[~2025-08-16 15:00 UTC | newest]

Thread overview: 45+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-02 16:44 [PATCH 00/16] IIO: Enable runtime checks on buffers size and related Jonathan Cameron
2025-08-02 16:44 ` [PATCH 01/16] iio: light: as73211: Ensure buffer holes are zeroed Jonathan Cameron
2025-08-04  6:39   ` Matti Vaittinen
2025-08-02 16:44 ` [PATCH 02/16] iio: light: vcnl4035: Fix endianness vs data placement in buffer issue Jonathan Cameron
2025-08-03 19:16   ` Andy Shevchenko
2025-08-16 14:46     ` Jonathan Cameron
2025-08-04  6:38   ` Matti Vaittinen
2025-08-02 16:44 ` [PATCH 03/16] iio: light: as73211: Use iio_push_to_buffers_with_ts() to allow source size runtime check Jonathan Cameron
2025-08-02 16:44 ` [PATCH 04/16] iio: light: vcnl4035: Use a structure to make buffer arrangement explicit Jonathan Cameron
2025-08-04  6:52   ` Matti Vaittinen
2025-08-02 16:44 ` [PATCH 05/16] iio: light: vcnl4035: Use iio_push_to_buffers_with_ts() to allow runtime source buffer size check Jonathan Cameron
2025-08-04  6:57   ` Matti Vaittinen
2025-08-16 14:48     ` Jonathan Cameron
2025-08-02 16:44 ` [PATCH 06/16] iio: light: acpi-als: Use a structure for layout of data to push to buffer Jonathan Cameron
2025-08-03 19:24   ` Andy Shevchenko
2025-08-16 14:50     ` Jonathan Cameron
2025-08-02 16:44 ` [PATCH 07/16] iio: light: acpi-als: Use iio_push_to_buffers_with_ts() to allow runtime source size check Jonathan Cameron
2025-08-16 14:52   ` Jonathan Cameron
2025-08-02 16:44 ` [PATCH 08/16] iio: light: adjd_s311: Use iio_push_to_buffers_with_ts() to allow source size runtime check Jonathan Cameron
2025-08-04  7:04   ` Matti Vaittinen
2025-08-16 14:52     ` Jonathan Cameron
2025-08-02 16:44 ` [PATCH 09/16] iio: light: isl29125: " Jonathan Cameron
2025-08-04  7:06   ` Matti Vaittinen
2025-08-16 14:52     ` Jonathan Cameron
2025-08-02 16:44 ` [PATCH 10/16] iio: light: max44000: " Jonathan Cameron
2025-08-03 19:26   ` Andy Shevchenko
2025-08-16 14:55     ` Jonathan Cameron
2025-08-04  7:08   ` Matti Vaittinen
2025-08-02 16:44 ` [PATCH 11/16] iio: light: st_uvis25: " Jonathan Cameron
2025-08-04  7:09   ` Matti Vaittinen
2025-08-16 14:56     ` Jonathan Cameron
2025-08-02 16:44 ` [PATCH 12/16] iio: light: tcs3414: " Jonathan Cameron
2025-08-16 14:57   ` Jonathan Cameron
2025-08-02 16:44 ` [PATCH 13/16] iio: light: tcs3472: " Jonathan Cameron
2025-08-16 14:58   ` Jonathan Cameron
2025-08-02 16:44 ` [PATCH 14/16] iio: light: vcnl4000: Use a structure to make buffer arrangement explicit Jonathan Cameron
2025-08-04  7:00   ` Mårten Lindahl
2025-08-16 14:59     ` Jonathan Cameron
2025-08-02 16:44 ` [PATCH 15/16] iio: light: vl6180: Use iio_push_to_buffers_with_ts() to allow source size runtime check Jonathan Cameron
2025-08-16 14:59   ` Jonathan Cameron
2025-08-02 16:44 ` [PATCH 16/16] iio: light: Simple conversions to iio_push_to_buffers_with_ts() Jonathan Cameron
2025-08-04  8:01   ` Matti Vaittinen
2025-08-04 13:29   ` srinivas pandruvada
2025-08-16 15:00     ` Jonathan Cameron
2025-08-03 19:43 ` [PATCH 00/16] IIO: Enable runtime checks on buffers size and related Andy Shevchenko

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).