On Wed, 29 Oct 2025 11:43:17 +0900 Masami Hiramatsu (Google) <[email protected]> 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) <[email protected]>
