Skip to content

IIO: Enable runtime checks on buffers size and related.

Jonathan Cameron linux-iio 1 version Applied

Status from this message: Applied

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest16 patches 28 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/16iio: light: as73211: Ensure buffer holes are zeroeddrivers/iio/light/as73211.c+1 -11 reply
2/16iio: light: vcnl4035: Fix endianness vs data placement in buffer issue.drivers/iio/light/vcnl4035.c+3 -13 replies
3/16iio: light: as73211: Use iio_push_to_buffers_with_ts() to allow source size runtime checkdrivers/iio/light/as73211.c+2 -10 replies
4/16iio: light: vcnl4035: Use a structure to make buffer arrangement explicit.drivers/iio/light/vcnl4035.c+6 -31 reply
5/16iio: light: vcnl4035: Use iio_push_to_buffers_with_ts() to allow runtime source buffer size check.drivers/iio/light/vcnl4035.c+2 -22 replies
6/16iio: light: acpi-als: Use a structure for layout of data to push to buffer.drivers/iio/light/acpi-als.c+6 -132 replies
7/16iio: light: acpi-als: Use iio_push_to_buffers_with_ts() to allow runtime source size checkdrivers/iio/light/acpi-als.c+1 -11 reply
8/16iio: light: adjd_s311: Use iio_push_to_buffers_with_ts() to allow source size runtime checkdrivers/iio/light/adjd_s311.c+6 -62 replies
9/16iio: light: isl29125: Use iio_push_to_buffers_with_ts() to allow source size runtime checkdrivers/iio/light/isl29125.c+7 -72 replies
10/16iio: light: max44000: Use iio_push_to_buffers_with_ts() to allow source size runtime checkdrivers/iio/light/max44000.c+9 -93 replies
11/16iio: light: st_uvis25: Use iio_push_to_buffers_with_ts() to allow source size runtime checkdrivers/iio/light/st_uvis25.h drivers/iio/light/st_uvis25_core.c+9 -82 replies
12/16iio: light: tcs3414: Use iio_push_to_buffers_with_ts() to allow source size runtime checkdrivers/iio/light/tcs3414.c+8 -71 reply
13/16iio: light: tcs3472: Use iio_push_to_buffers_with_ts() to allow source size runtime checkdrivers/iio/light/tcs3472.c+7 -71 reply
14/16iio: light: vcnl4000: Use a structure to make buffer arrangement explicit.drivers/iio/light/vcnl4000.c+6 -32 replies
15/16iio: light: vl6180: Use iio_push_to_buffers_with_ts() to allow source size runtime checkdrivers/iio/light/vl6180.c+7 -71 reply
16/16iio: light: Simple conversions to iio_push_to_buffers_with_ts()drivers/iio/light/bh1745.c drivers/iio/light/hid-sensor-als.c drivers/iio/light/ltr501.c +6 more+18 -153 replies

Reviews trailers per patch

10 of 16 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchAndy ShevchenkoMatti VaittinenMårten LindahlSrinivas Pandruvada
SeriesR-b
1/16R-b
2/16R-b
3/16
4/16R-b
5/16R-b
6/16
7/16
8/16R-b
9/16R-b
10/16R-b
11/16R-b
12/16
13/16
14/16R-b
15/16
16/16R-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v1 thread

Cover letter [PATCH 00/16] IIO: Enable runtime checks on buffers size and related.

From: Jonathan Cameron <[email protected]>

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(-)
Signature · 1 line
2.50.1