From: Shuah Khan <skhan@linuxfoundation.org>
To: Steven Rostedt <rostedt@goodmis.org>, Hui Wang <hui.wang@canonical.com>
Cc: mhiramat@kernel.org, mathieu.desnoyers@efficios.com,
pjw@kernel.org, linux-trace-kernel@vger.kernel.org,
shuah@kernel.org, wangfushuai@baidu.com,
linux-kselftest@vger.kernel.org,
Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH 2/2] selftests/ftrace: Account for 8-byte aligned trace_marker_raw events
Date: Wed, 17 Jun 2026 17:19:23 -0600 [thread overview]
Message-ID: <602d46d6-0ca1-4f05-8cfd-a6007aff560b@linuxfoundation.org> (raw)
In-Reply-To: <20260608125049.092d4543@fedora>
On 6/8/26 10:50, Steven Rostedt wrote:
> On Sun, 7 Jun 2026 15:24:31 +0800
> Hui Wang <hui.wang@canonical.com> wrote:
>
>> 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 <hui.wang@canonical.com>
>
> 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/
I applied the above to linux-kselftest next - will send it up later
this week to for Linux 7.2-rc1
thanks,
-- Shuah
prev parent reply other threads:[~2026-06-17 23:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-07 7:24 [PATCH 0/2] ring-buffer: Fix forced 8-byte alignment event length Hui Wang
2026-06-07 7:24 ` [PATCH 1/2] ring-buffer: Fix event length with forced 8-byte alignment Hui Wang
2026-06-08 9:02 ` Masami Hiramatsu
2026-06-08 16:52 ` Steven Rostedt
2026-06-09 4:22 ` Hui Wang
2026-06-10 16:17 ` Steven Rostedt
2026-06-07 7:24 ` [PATCH 2/2] selftests/ftrace: Account for 8-byte aligned trace_marker_raw events Hui Wang
2026-06-08 9:17 ` Masami Hiramatsu
2026-06-08 14:51 ` Hui Wang
2026-06-08 16:50 ` Steven Rostedt
2026-06-17 23:19 ` Shuah Khan [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=602d46d6-0ca1-4f05-8cfd-a6007aff560b@linuxfoundation.org \
--to=skhan@linuxfoundation.org \
--cc=hui.wang@canonical.com \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=pjw@kernel.org \
--cc=rostedt@goodmis.org \
--cc=shuah@kernel.org \
--cc=wangfushuai@baidu.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox