[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20251029172004.a0aca144735f20a6a59d2aa6@kernel.org>
Date: Wed, 29 Oct 2025 17:20:04 +0900
From: Masami Hiramatsu (Google) <mhiramat@...nel.org>
To: Masami Hiramatsu (Google) <mhiramat@...nel.org>
Cc: Catalin Marinas <catalin.marinas@....com>, Will Deacon
<will@...nel.org>, Mark Brown <broonie@...nel.org>, Steven Rostedt
<rostedt@...dmis.org>, Peter Zijlstra <peterz@...radead.org>, Ingo Molnar
<mingo@...nel.org>, x86@...nel.org, Jinchao Wang
<wangjinchao600@...il.com>, Mathieu Desnoyers
<mathieu.desnoyers@...icios.com>, Thomas Gleixner <tglx@...utronix.de>,
Borislav Petkov <bp@...en8.de>, Dave Hansen <dave.hansen@...ux.intel.com>,
"H . Peter Anvin" <hpa@...or.com>, Alexander Shishkin
<alexander.shishkin@...ux.intel.com>, Ian Rogers <irogers@...gle.com>,
linux-kernel@...r.kernel.org, linux-trace-kernel@...r.kernel.org,
linux-doc@...r.kernel.org, linux-perf-users@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, Aishwarya.TCV@....com
Subject: Re: [PATCH v5 6/8] selftests: tracing: Add a basic testcase for
wprobe
On Wed, 29 Oct 2025 11:43:17 +0900
Masami Hiramatsu (Google) <mhiramat@...nel.org> wrote:
> > Hmm, it seems that jiffies related things are updated frequently
> > and it may cause interrupt storm or infinit recursive call.
>
> I added another trace_printk() in el1_watchpt(). It seems el1_watchpt()
> takes too long and there is no time to do any other things.
> (Note the interval shown below is only within the el1_watchpt function,
> and in reality various processes (save/restore registers etc) for
> exception handling will be inserted before and after.)
Forget about this. I found the root cause. The x86 watchpoint exception
happens after the instruction is executed, the arm64 happens before.
Thus what we need is to emulate or do single step the hooked instruction
and restart from the next instruction from the watchpoint exception on
arm64. I thought hw_breakpoint does that, but doesn't. Should we do this
in do_watchpoint() or in user_handler?
Thank you,
--
Masami Hiramatsu (Google) <mhiramat@...nel.org>
Powered by blists - more mailing lists