From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
To: "Masami Hiramatsu (Google)" <mhiramat@kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>,
Shuah Khan <skhan@linuxfoundation.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
linux-kselftest@vger.kernel.org
Subject: Re: [PATCH v1 4/4] selftests/ftrace: Add persistent ring buffer testcases
Date: Mon, 10 Aug 2026 23:17:27 +0900 [thread overview]
Message-ID: <20260810231727.caafe1c947ad3f113bb991b9@kernel.org> (raw)
In-Reply-To: <178635446219.380779.14935908214040944426.stgit@devnote2>
On Mon, 10 Aug 2026 18:34:22 +0900
"Masami Hiramatsu (Google)" <mhiramat@kernel.org> wrote:
> +
> +# Check if BOOT1_MARKER is in boot_map/trace (indicates second boot)
> +if grep -q "BOOT1_MARKER" "$TRACEDIR/instances/boot_map/trace" 2>/dev/null; then
Sashiko commented:
> Could this test logic lead to an infinite reboot loop if the primary trace
> instance is cleared?
Yes, but the test framework will stop because timeout monitors it.
> If the boot_map instance is cleared on boot (for example, if boot events were
> enabled to start a fresh trace), the marker would be missing from boot_map on
> the second boot.
This can happen if KASLR changes the address.
> The script would assume it is the first boot, write the marker, and reboot
> repeatedly until the QEMU timeout is reached.
> Should this check use the backup instance instead
> (e.g., "$TRACEDIR/instances/backup/trace") to detect the second boot?
No, since the backup instance is always be allocated.
OK, so let's give bigger alignment option so that in most case it will not
change the address.
Thank you,
--
Masami Hiramatsu (Google) <mhiramat@kernel.org>
next prev parent reply other threads:[~2026-08-10 14:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-10 9:33 [PATCH v1 0/4] selftests/ftrace: Add a boottime tracing test framework Masami Hiramatsu (Google)
2026-08-10 9:33 ` [PATCH v1 1/4] selftests/ftrace: Add generic boot " Masami Hiramatsu (Google)
2026-08-10 9:34 ` [PATCH v1 2/4] selftests/ftrace: Add boot-time tracing testcases Masami Hiramatsu (Google)
2026-08-10 9:34 ` [PATCH v1 3/4] selftests/ftrace: Add kernel cmdline " Masami Hiramatsu (Google)
2026-08-10 9:34 ` [PATCH v1 4/4] selftests/ftrace: Add persistent ring buffer testcases Masami Hiramatsu (Google)
2026-08-10 14:17 ` Masami Hiramatsu [this message]
2026-08-10 14:53 ` [PATCH v1 0/4] selftests/ftrace: Add a boottime tracing test framework Steven Rostedt
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=20260810231727.caafe1c947ad3f113bb991b9@kernel.org \
--to=mhiramat@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=rostedt@goodmis.org \
--cc=skhan@linuxfoundation.org \
/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