diff options
author | Kees Cook <[email protected]> | 2023-01-27 14:41:29 -0800 |
---|---|---|
committer | Mark Brown <[email protected]> | 2023-01-28 10:51:05 +0000 |
commit | b3bcedc0402fcdc5c8624c433562d9d1882749d8 (patch) | |
tree | f26737954248f6c1ae612a0202792263f728da67 /scripts/gdb/linux/device.py | |
parent | 362e8d0f27c40864b4f8994624409f7b4316d2dd (diff) |
ASoC: kirkwood: Iterate over array indexes instead of using pointer math
Walking the dram->cs array was seen as accesses beyond the first array
item by the compiler. Instead, use the array index directly. This allows
for run-time bounds checking under CONFIG_UBSAN_BOUNDS as well. Seen
with GCC 13 with -fstrict-flex-arrays:
../sound/soc/kirkwood/kirkwood-dma.c: In function
'kirkwood_dma_conf_mbus_windows.constprop':
../sound/soc/kirkwood/kirkwood-dma.c:90:24: warning: array subscript 0 is outside array bounds of 'const struct mbus_dram_window[0]' [-Warray-bounds=]
90 | if ((cs->base & 0xffff0000) < (dma & 0xffff0000)) {
| ~~^~~~~~
Cc: Liam Girdwood <[email protected]>
Cc: Mark Brown <[email protected]>
Cc: Jaroslav Kysela <[email protected]>
Cc: Takashi Iwai <[email protected]>
Cc: [email protected]
Signed-off-by: Kees Cook <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/device.py')
0 files changed, 0 insertions, 0 deletions