From: sashiko-bot@kernel.org
To: "Masami Hiramatsu (Google)" <mhiramat@kernel.org>
Cc: linux-trace-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org
Subject: Re: [PATCH v21 09/11] selftests: tracing: Add wprobe trigger testcases
Date: Tue, 01 Dec 2026 14:25:14 +0000 [thread overview]
Message-ID: <sashiko-outbox-243475@kernel.org> (raw)
In-Reply-To: <20261130020252.32126-10-mhiramat@kernel.org>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] selftests: tracing: 8-byte wprobe length in trigger tests
fails on 32-bit x86
--
commit 263b18d5d77d66080ad14fc5ce05d30f64979439
Author: Masami Hiramatsu (Google) <mhiramat@kernel.org>
selftests: tracing: Add wprobe trigger testcases
This commit adds ftrace selftests for set_wprobe and clear_wprobe event
triggers, covering basic trigger operations, CPU hotplug transitions, and
trigger syntax error logging.
Link: https://lore.kernel.org/all/59637b96946653393a7ad3c7de094094796b39c2.1785067572.git.wangjinchao600@gmail.com/
> diff --git a/tools/testing/selftests/ftrace/test.d/trigger/trigger-wprobe-hotplug.tc b/tools/testing/selftests/ftrace/test.d/trigger/trigger-wprobe-hotplug.tc
> new file mode 100644
> index 0000000000000..1847a39431054
> --- /dev/null
> +++ b/tools/testing/selftests/ftrace/test.d/trigger/trigger-wprobe-hotplug.tc
> @@ -0,0 +1,150 @@
[ ... ]
> +:;: "Add a wprobe event used by trigger" ;:
> +echo 'w:watch rw@-1:8 address=$addr value=$value' > dynamic_events
[ ... ]
> diff --git a/tools/testing/selftests/ftrace/test.d/trigger/trigger-wprobe.tc b/tools/testing/selftests/ftrace/test.d/trigger/trigger-wprobe.tc
> new file mode 100644
> index 0000000000000..f130bf589f7c0
> --- /dev/null
> +++ b/tools/testing/selftests/ftrace/test.d/trigger/trigger-wprobe.tc
> @@ -0,0 +1,157 @@
[ ... ]
> +:;: "Add a wprobe event used by trigger" ;:
> +echo 'w:watch rw@-1:8 address=$addr value=$value' > dynamic_events
[ ... ]
> +:;: "Verify dynamic_events preserves -1 spec and spec-based removal works" ;:
> +if ! grep -q '^w:wprobes/watch rw@-1:8 ' dynamic_events; then
> + fail "dynamic_events did not preserve rw@-1:8 after trigger teardown"
> +fi
> +echo '!w:wprobes/watch rw@-1:8 address=$addr value=$value' >> dynamic_events
[Severity: Medium]
Will using an 8-byte watchpoint length (rw@-1:8) cause trigger-wprobe.tc
and trigger-wprobe-hotplug.tc to fail on 32-bit x86?
On 32-bit x86, CONFIG_WPROBE_TRIGGERS is enabled because X86 selects
HAVE_MODIFY_LOCAL_HW_BREAKPOINT_ADDR. When set_wprobe:watch:timer is
registered, wprobe_trigger_cmd_parse() enables the watchpoint with
HW_BREAKPOINT_LEN_8, which arch_build_bp_info() rejects with -EOPNOTSUPP
on 32-bit x86 CPUs without X86_FEATURE_BPEXT.
Even when X86_FEATURE_BPEXT is present, struct foo_timer_data places
struct timer_list timer right after the 4-byte const char *name pointer,
so both timer and timer+16 are only 4-byte aligned and fail the 8-byte
alignment check in trace_wprobe_is_valid_addr(). Using rw@-1:4 (as in
trigger-wprobe-syntax-errors.tc) avoids both issues while still matching
mod_timer() accesses on 32-bit and 64-bit kernels.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261130020252.32126-1-mhiramat@kernel.org?part=9
next prev parent reply other threads:[~2026-12-01 14:25 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-30 2:02 [PATCH v21 00/11] tracing: wprobe: x86: Add wprobe for watchpoint Masami Hiramatsu (Google)
2026-11-30 2:02 ` [PATCH v21 01/11] x86/hw_breakpoints: Add arch_modify_local_hw_breakpoint_addr() API Masami Hiramatsu (Google)
2026-11-30 2:02 ` [PATCH v21 02/11] HWBP: Add modify_local_hw_breakpoint_addr() API Masami Hiramatsu (Google)
2026-11-30 2:02 ` [PATCH v21 03/11] perf/hw_breakpoint: Add register_wide_hw_breakpoint_cpuslocked() API Masami Hiramatsu (Google)
2026-11-30 2:02 ` [PATCH v21 04/11] tracing/wprobe: Add wprobe (watchpoint probe) trace event support Masami Hiramatsu (Google)
2026-11-30 2:02 ` [PATCH v21 05/11] x86: hw_breakpoint: Add a kconfig to clarify when a breakpoint fires Masami Hiramatsu (Google)
2026-12-01 14:21 ` sashiko-bot
2026-11-30 2:02 ` [PATCH v21 06/11] selftests: tracing: Add a basic testcase for wprobe Masami Hiramatsu (Google)
2026-11-30 2:02 ` [PATCH v21 07/11] selftests: tracing: Add syntax " Masami Hiramatsu (Google)
2026-11-30 2:03 ` [PATCH v21 08/11] tracing/wprobe: Add set_wprobe and clear_wprobe event triggers Masami Hiramatsu (Google)
2026-12-01 14:31 ` sashiko-bot
2026-11-30 2:03 ` [PATCH v21 09/11] selftests: tracing: Add wprobe trigger testcases Masami Hiramatsu (Google)
2026-12-01 14:25 ` sashiko-bot [this message]
2026-11-30 2:03 ` [PATCH v21 10/11] tracing/wprobe: Support BTF typecast in fetchargs Masami Hiramatsu (Google)
2026-11-30 2:03 ` [PATCH v21 11/11] tracing/wprobe: Support BTF struct offset resolution in set_wprobe trigger Masami Hiramatsu (Google)
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=sashiko-outbox-243475@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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