trace: Correct the relocation handover with buffer overflow
authorSimon Glass <sjg@chromium.org>
Sun, 15 Jan 2023 21:15:50 +0000 (14:15 -0700)
committerTom Rini <trini@konsulko.com>
Sat, 11 Feb 2023 17:22:35 +0000 (12:22 -0500)
commit80f91558a173fe841810ab6a7a0f70b52344ec76
treea27babc0d79b35fd15b4843a4c341fae599f56ba
parent9dd665ad333039a1b4f6c39cec088d7bf7eb787d
trace: Correct the relocation handover with buffer overflow

When the early trace buffer overflows it leaves a gap in the trace buffer
between where the actual data finished and where it would have finished if
there were enough buffer space. This results in corrupted output.

Adjust the logic to resolve this and add a message when the buffer
overflows.

Signed-off-by: Simon Glass <sjg@chromium.org>
lib/trace.c