Re: [PATCH] scripts: decode_stacktrace: preserve input while reading lines
From: Sasha Levin
Date: Tue Nov 03 2026 - 14:11:49 EST
On Tue, Nov 03, 2026 at 05:42:03PM +0100, Hamdy Abou El Anein wrote:
>Plain read strips leading and trailing whitespace and interprets
>backslashes before the decoder sees a line. It also drops a final line
>without a newline. This loses log text and defeats the alignment
>preservation in handle_line().
>
>Read with an empty IFS and -r, and process a nonempty final fragment.
One optional follow-up: debuginfod_get_vmlinux() takes the build ID with ${1##*
}, so trailing whitespace after the build ID now gives an empty ID and the
lookup fails. The kernel never prints that, since the build ID always ends the
line, so it only matters for logs edited after the fact.
Acked-by: Sasha Levin <sashal@xxxxxxxxxx>
--
Thanks,
Sasha