From: Jinchao Wang <wangjinchao600@gmail.com>
To: Masami Hiramatsu <mhiramat@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Thomas Gleixner <tglx@kernel.org>,
Steven Rostedt <rostedt@goodmis.org>,
x86@kernel.org
Cc: Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
"H . Peter Anvin" <hpa@zytor.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Ian Rogers <irogers@google.com>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Tony Luck <tony.luck@intel.com>,
linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
linux-perf-users@vger.kernel.org, linux-edac@vger.kernel.org,
Jinchao Wang <wangjinchao600@gmail.com>
Subject: [PATCH 0/3] hw_breakpoint: Fix and simplify local address updates for wprobe
Date: Sun, 26 Jul 2026 20:22:29 +0800 [thread overview]
Message-ID: <cover.1785067572.git.wangjinchao600@gmail.com> (raw)
In-Reply-To: <178476143000.26117.9810509272687580410.stgit@devnote2>
Hi Masami,
While reviewing wprobe v10, I prepared three patches to fix and simplify
the HWBP support required by wprobe.
This series is based on linux-trace/probes/for-next, the same base used by
wprobe v10. It is intended to replace patches 5-7 in v10, so it should not
be applied on top of topic/wprobe-v2.
Patch 1 fixes the x86 HWBP slot and DR7 races when an operation is
interrupted by an NMI.
Patch 2 adds arch_modify_local_hw_breakpoint_addr(), which updates only
the watched address of an installed breakpoint on the local CPU.
Patch 3 adds the matching generic modify_local_hw_breakpoint_addr() API.
It keeps the original patch structure and Masami's authorship, while
removing attribute parsing, type/length updates and rollback.
With the address-only interface, the install/uninstall refactoring in the
old patch 5 is no longer needed.
I can take care of follow-up maintenance related to fast local HWBP
watched-address updates.
The patches passed checkpatch and the relevant x86_32 and x86_64 object
builds.
Jinchao Wang (2):
x86/hw_breakpoints: Make DR7 updates NMI safe
x86/hw_breakpoints: Add arch_modify_local_hw_breakpoint_addr() API
Masami Hiramatsu (Google) (1):
HWBP: Add modify_local_hw_breakpoint_addr() API
arch/Kconfig | 8 ++
arch/x86/Kconfig | 1 +
arch/x86/include/asm/debugreg.h | 36 ++++++---
arch/x86/include/asm/hw_breakpoint.h | 2 +
arch/x86/kernel/cpu/mce/core.c | 20 +++--
arch/x86/kernel/hw_breakpoint.c | 114 ++++++++++++++++-----------
arch/x86/kernel/nmi.c | 10 ++-
arch/x86/kernel/traps.c | 10 ++-
include/linux/hw_breakpoint.h | 6 ++
kernel/events/hw_breakpoint.c | 30 +++++++
10 files changed, 166 insertions(+), 71 deletions(-)
base-commit: 1a416ae446afa42d2d8500ce25bd61c564508721
--
2.53.0
next prev parent reply other threads:[~2026-07-26 12:22 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-22 23:02 [PATCH v10 00/11] tracing: wprobe: x86: Add wprobe for watchpoint Masami Hiramatsu (Google)
2026-07-22 23:02 ` [PATCH v10 01/11] tracing: wprobe: Add watchpoint probe event based on hardware breakpoint Masami Hiramatsu (Google)
2026-07-22 23:32 ` sashiko-bot
2026-07-22 23:02 ` [PATCH v10 02/11] x86: hw_breakpoint: Add a kconfig to clarify when a breakpoint fires Masami Hiramatsu (Google)
2026-07-22 23:11 ` sashiko-bot
2026-07-23 18:34 ` Steven Rostedt
2026-07-22 23:03 ` [PATCH v10 03/11] selftests: tracing: Add a basic testcase for wprobe Masami Hiramatsu (Google)
2026-07-22 23:03 ` [PATCH v10 04/11] selftests: tracing: Add syntax " Masami Hiramatsu (Google)
2026-07-22 23:03 ` [PATCH v10 05/11] x86/hw_breakpoint: Unify breakpoint install/uninstall Masami Hiramatsu (Google)
2026-07-22 23:26 ` sashiko-bot
2026-07-22 23:03 ` [PATCH v10 06/11] x86/hw_breakpoint: Add arch_reinstall_hw_breakpoint Masami Hiramatsu (Google)
2026-07-22 23:25 ` sashiko-bot
2026-07-22 23:03 ` [PATCH v10 07/11] HWBP: Add modify_wide_hw_breakpoint_local() API Masami Hiramatsu (Google)
2026-07-26 12:22 ` Jinchao Wang [this message]
2026-07-26 12:22 ` [PATCH 1/3] x86/hw_breakpoints: Make DR7 updates NMI safe Jinchao Wang
2026-07-26 12:22 ` [PATCH 2/3] x86/hw_breakpoints: Add arch_modify_local_hw_breakpoint_addr() API Jinchao Wang
2026-07-26 12:34 ` sashiko-bot
2026-07-26 12:22 ` [PATCH 3/3] HWBP: Add modify_local_hw_breakpoint_addr() API Jinchao Wang
2026-07-26 12:27 ` Jinchao Wang
2026-07-26 12:35 ` sashiko-bot
2026-07-22 23:04 ` [PATCH v10 08/11] tracing: wprobe: Add wprobe event trigger Masami Hiramatsu (Google)
2026-07-22 23:29 ` sashiko-bot
2026-07-22 23:04 ` [PATCH v10 09/11] selftests: ftrace: Add wprobe trigger testcase Masami Hiramatsu (Google)
2026-07-22 23:24 ` sashiko-bot
2026-07-22 23:04 ` [PATCH v10 10/11] tracing/wprobe: Support BTF typecast in fetchargs Masami Hiramatsu (Google)
2026-07-22 23:04 ` [PATCH v10 11/11] tracing/wprobe: Support BTF typecast in wprobe trigger command Masami Hiramatsu (Google)
2026-07-22 23:31 ` sashiko-bot
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=cover.1785067572.git.wangjinchao600@gmail.com \
--to=wangjinchao600@gmail.com \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=irogers@google.com \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tglx@kernel.org \
--cc=tony.luck@intel.com \
--cc=x86@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.