Thread (11 messages) 11 messages, 4 authors, 6d ago

Re: [PATCH 2/2] selftests/ftrace: Account for 8-byte aligned trace_marker_raw events

From: Shuah Khan <skhan@linuxfoundation.org>
Date: 2026-06-17 23:19:26
Also in: linux-kselftest

On 6/8/26 10:50, Steven Rostedt wrote:
On Sun,  7 Jun 2026 15:24:31 +0800
Hui Wang [off-list ref] wrote:
quoted
trace_marker_raw.tc assumes that the raw marker payload length
reported in trace_pipe is the result of int((id + 3) / 4) * 4, but
that is not true on kernels with CONFIG_HAVE_64BIT_ALIGNED_ACCESS
enabled.

With forced 8-byte alignment, the ring buffer event forces 8-byte
alignment. The event length is stored in array[0], the payload data
and id are placed in a struct raw_data_entry which is stored starting
at array[1]. In this case, the printed payload data length is 8*N+4
bytes.

To make the testcase pass in this case, add a kconfig_enabled() helper
and use it to detect CONFIG_HAVE_64BIT_ALIGNED_ACCESS so
trace_marker_raw.tc can calculate the expected length correctly.

Assisted-by: Copilot:gpt-5.5
Signed-off-by: Hui Wang <redacted>
NACK

Let's not change the kernel for a broken test. Also this has already
been fixed but appears not to be applied yet.

Shuah, can you please apply the below fix.

   https://lore.kernel.org/all/20260601023251.1916483-1-dtcccc@linux.alibaba.com/ (local)
I applied the above to linux-kselftest next - will send it up later
this week to for Linux 7.2-rc1

thanks,
-- Shuah
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help