diff options
| author | Beleswar Padhi <b-padhi@ti.com> | 2026-10-01 01:31:58 +0530 |
|---|---|---|
| committer | Jassi Brar <jassisinghbrar@gmail.com> | 2026-10-11 19:50:51 -0500 |
| commit | 645ae2edd5597501b4af3837a644877fbe194227 (patch) | |
| tree | baac166ce05c1b821ed5c39745808177dc5cabc0 /tools/perf/scripts/python/stackcollapse.py | |
| parent | bbf7f0d6162fc68af1fc0c7ad1c5e35a3e64010a (diff) | |
mailbox: ti-msgmgr: Read exact number of trailing message bytes
ti_msgmgr_send_data() copies the message to the data registers in u32
units. This has been harmless so far because the clients (TI-SCI)
always passed its preallocated message buffer, which is sized to the
maximum message size (60 or 64 bytes, a multiple of 4), so the extra
bytes read were still within the buffer. But, with a later TI-SCI
update, the message size can be varying now and not guaranteed to be a
multiple of 4, which would trigger KASAN out-of-bounds reports.
Therefore, memcpy() only the trailing bytes into a zeroed u32 before
writing it to the register. This is at most 3 bytes, so the overhead
is negligible.
Fixes: aace66b170ce ("mailbox: Introduce TI message manager driver")
Signed-off-by: Beleswar Padhi <b-padhi@ti.com>
Acked-by: Andrew Davis <afd@ti.com>
Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
