Re: [PATCH v1] kernel: add a simple timer based software watchpoint

From: Thomas Gleixner

Date: Fri Jun 26 2026 - 11:34:24 EST


On Fri, Jun 26 2026 at 22:33, Feng Tang wrote:
> As HW jtag debugger is expensive and not generally available for
> software developer, also many production hardware don't have their
> jtag interface open for security reason, I think monitoring the
> abnormal changes to dram/mmio is convenient for debugging memory
> corruption issues. Could you help to give some suggestion on
> how to redesign this? Many thanks!

If you can reproduce in a VM, you have qemu + gdb, which allows you
even to debug the BIOS.

If it's bare metal you can use kgdb or perf events. All of those allow
you to set watchpoints, data breakpoints etc.

If you end up with no hit on a watch/breakpoint then you're lost in that
case as you can't debug the BIOS w/o a hardware debugger, but that's not
any different than with your magic hack.

The tools are all there you just have to use them correctly, no?

Thanks,

tglx