Skip to content

spi: Fix data corruption, uninitialised data leaks and bounds checks

Lee Jones imx linux-arm-kernel linux-spi lkml stable 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest10 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10spi: fsl-cpm: Map the zero page's address, not its struct pagedrivers/spi/spi-fsl-cpm.c+2 -10 replies
2/10spi: bcm2835: Store native chip-select GPIO descriptor per devicedrivers/spi/spi-bcm2835.c+9 -90 replies
3/10spi: ch341: Limit transfers to the hardware packet sizedrivers/spi/spi-ch341.c+6 -00 replies
4/10spi: sprd-adi: Do not copy uninitialised data to rx_buf on read failuredrivers/spi/spi-sprd-adi.c+2 -10 replies
5/10spi: topcliff-pch: Advance tx_buf between DMA chunksdrivers/spi/spi-topcliff-pch.c+5 -00 replies
6/10spi: cadence-quadspi: Bound chip select against f_pdata array sizedrivers/spi/spi-cadence-quadspi.c+5 -34 replies
7/10spi: cadence-xspi: Zero the tail word in m_iowriteq()drivers/spi/spi-cadence-xspi.c+1 -10 replies
8/10spi: fsl-qspi: Propagate clock errors from fsl_qspi_select_mem()drivers/spi/spi-fsl-qspi.c+17 -90 replies
9/10spi: cadence-xspi: Advance tx pointer between Marvell b0 chunksdrivers/spi/spi-cadence-xspi.c+2 -00 replies
10/10spi: cadence-xspi: Skip tail read for qword-aligned Marvell b0 receivesdrivers/spi/spi-cadence-xspi.c+3 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/10] spi: Fix data corruption, uninitialised data leaks and bounds checks

These issues were reported by Sashiko.

The series is based on spi/for-7.5, since patch 5 relies on the following commit, which is not yet in Linus's tree:

3515e312e096 ("spi: topcliff-pch: clamp DMA bpw_len by bytes not words")

Witold, patch 10 is derived from the TX-only accounting in the Marvell b0 path, so confirmation that it matches the hardware's READ_DATA behaviour would be appreciated.

Cc Anton Vorontsov <[email protected]>
Cc Baolin Wang <[email protected]>
Cc Bartosz Golaszewski <[email protected]>
Cc Boris Brezillon <[email protected]>
Cc Broadcom internal kernel review list <[email protected]>
Cc Chris Boot <[email protected]>
Cc Chunyan Zhang <[email protected]>
Cc Dhruva Gole <[email protected]>
Cc Felix Gu <[email protected]>
Cc Florian Fainelli <[email protected]>
Cc Foon Tan <[email protected]>
Cc Frieder Schrempf <[email protected]>
Cc Gabor Juhos <[email protected]>
Cc Giulio Benetti <[email protected]>
Cc Graham Moore <[email protected]>
Cc Grant Likely <[email protected]>
Cc Han Xu <[email protected]>
Cc Jayshri Pawar <[email protected]>
Cc Jisheng Zhang <[email protected]>
Cc Johan Hovold <[email protected]>
Cc Johannes Thumshirn <[email protected]>
Cc Konrad Kociolek <[email protected]>
Cc Linus Walleij <[email protected]>
Cc Mark Brown <[email protected]>
Cc Murugan R <[email protected]>
Cc Orson Zhai <[email protected]>
Cc Parshuram Thombare <[email protected]>
Cc Pratyush Yadav <[email protected]>
Cc Ray Jui <[email protected]>
Cc Scott Branden <[email protected]>
Cc Suresh Gupta <[email protected]>
Cc "Théo Lebrun" <[email protected]>
Cc Tomoya MORINAGA <[email protected]>
Cc Vignesh Raghavendra <[email protected]>
Cc Weibin Liu <[email protected]>
Cc Witold Sadowski <[email protected]>
Cc Yogesh Gaur <[email protected]>

Lee Jones (10):
spi: fsl-cpm: Map the zero page's address, not its struct page
spi: bcm2835: Store native chip-select GPIO descriptor per device
spi: ch341: Limit transfers to the hardware packet size
spi: sprd-adi: Do not copy uninitialised data to rx_buf on read
failure
spi: topcliff-pch: Advance tx_buf between DMA chunks
spi: cadence-quadspi: Bound chip select against f_pdata array size
spi: cadence-xspi: Zero the tail word in m_iowriteq()
spi: fsl-qspi: Propagate clock errors from fsl_qspi_select_mem()
spi: cadence-xspi: Advance tx pointer between Marvell b0 chunks
spi: cadence-xspi: Skip tail read for qword-aligned Marvell b0
receives

 drivers/spi/spi-bcm2835.c         | 18 +++++++++---------
 drivers/spi/spi-cadence-quadspi.c |  8 +++++---
 drivers/spi/spi-cadence-xspi.c    |  8 ++++++--
 drivers/spi/spi-ch341.c           |  6 ++++++
 drivers/spi/spi-fsl-cpm.c         |  3 ++-
 drivers/spi/spi-fsl-qspi.c        | 26 +++++++++++++++++---------
 drivers/spi/spi-sprd-adi.c        |  3 ++-
 drivers/spi/spi-topcliff-pch.c    |  5 +++++
 8 files changed, 52 insertions(+), 25 deletions(-)

base-commit: 9b2d7c8736a6fd27ceda93bd67529758c139e24f

Signature · 1 line
2.56.1.708.g77570a6a1d-goog