Minchan Kim 8fa655a3a0 tracing: Fix alignment of static buffer
With 5.9 kernel on ARM64, I found ftrace_dump output was broken but
it had no problem with normal output "cat /sys/kernel/debug/tracing/trace".

With investigation, it seems coping the data into temporal buffer seems to
break the align binary printf expects if the static buffer is not aligned
with 4-byte. IIUC, get_arg in bstr_printf expects that args has already
right align to be decoded and seq_buf_bprintf says ``the arguments are saved
in a 32bit word array that is defined by the format string constraints``.
So if we don't keep the align under copy to temporal buffer, the output
will be broken by shifting some bytes.

This patch fixes it.

Link: https://lkml.kernel.org/r/20201125225654.1618966-1-minchan@kernel.org

Cc: <stable@vger.kernel.org>
Fixes: 8e99cf91b99bb ("tracing: Do not allocate buffer in trace_find_next_entry() in atomic")
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
2020-11-30 21:43:07 -05:00
..
2020-10-23 10:06:38 -07:00
2020-09-11 09:33:54 -07:00
2020-10-17 15:05:30 -06:00
2020-11-01 11:08:17 -08:00
\n
2020-08-06 19:29:51 -07:00
2020-08-26 09:10:39 -04:00
2020-08-04 14:20:26 -07:00
2020-06-03 13:06:42 -07:00
2020-10-18 09:27:10 -07:00
2020-10-16 11:11:19 -07:00
2020-11-01 11:08:17 -08:00
2020-08-12 10:58:02 -07:00
2020-10-22 13:13:57 -07:00
2020-10-22 13:08:57 -07:00
2020-10-16 11:11:22 -07:00
2020-10-18 09:27:10 -07:00
2020-07-01 12:09:13 +03:00
2020-07-27 14:31:12 -04:00
2019-12-18 18:07:31 +01:00
2020-06-04 19:06:24 -07:00
2020-07-07 11:58:59 -05:00
2020-05-09 13:57:12 +02:00