summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-sqlite.py
diff options
context:
space:
mode:
authorBreno Leitao <leitao@debian.org>2024-10-04 15:53:59 +0300
committerMark Brown <broonie@kernel.org>2024-11-01 17:48:52 +0300
commitf399051ec1ff02e74ae5c2517aed2cc486fd005b (patch)
treecb6766c0c31cf201e588e382ef83367a3841a03b /tools/perf/scripts/python/export-to-sqlite.py
parente36eba413b8e841e9e36e93188d82674ec7c79d1 (diff)
downloadlinux-f399051ec1ff02e74ae5c2517aed2cc486fd005b.tar.xz
spi: tegra210-quad: Avoid shift-out-of-bounds
A shift-out-of-bounds issue was identified by UBSAN in the tegra_qspi_fill_tx_fifo_from_client_txbuf() function. UBSAN: shift-out-of-bounds in drivers/spi/spi-tegra210-quad.c:345:27 shift exponent 32 is too large for 32-bit type 'u32' (aka 'unsigned int') Call trace: tegra_qspi_start_cpu_based_transfer The problem arises when shifting the contents of tx_buf left by 8 times the value of i, which can exceed 4 and result in an exponent larger than 32 bits. Resolve this by restrict the value of i to be less than 4, preventing the shift operation from overflowing. Signed-off-by: Breno Leitao <leitao@debian.org> Fixes: 921fc1838fb0 ("spi: tegra210-quad: Add support for Tegra210 QSPI controller") Link: https://patch.msgid.link/20241004125400.1791089-1-leitao@debian.org Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions