mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Feng Tang <feng.tang@linux.alibaba.com>
To: "David Hildenbrand (Arm)" <david@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Petr Mladek <pmladek@suse.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	paulmck@kernel.org, Douglas Anderson <dianders@chromium.org>,
	Thomas Gleixner <tglx@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Vlastimil Babka <vbabka@kernel.org>,
	linux-kernel@vger.kernel.org,
	Ard Biesheuvel <ardb+git@google.com>
Subject: Re: [PATCH v1] kernel: add a simple timer based software watchpoint
Date: Tue, 23 Jun 2026 16:26:31 +0800	[thread overview]
Message-ID: <ajpDNxhOS-6l6LdP@U-2FWC9VHC-2323.local> (raw)
In-Reply-To: <0c39c459-306f-49f5-b08e-e7b9b27b6352@kernel.org>

Hi David,

On Mon, Jun 22, 2026 at 04:13:37PM +0200, David Hildenbrand (Arm) wrote:
> 
> >>> This provides the basic function, and there are more todoes:
> >>>   * add a ftrace mode to do function level monitoring with ftrace hook,
> >>>     which is more accurate timing wise, as suggested by Steven Rostedt
> >>>   * merge the dram/mmio interface to auto detect it's dram or mmio
> >>>   * support runtime changing the address
> >>>   * move the starting point earlier in boot phase
> >>>   * monitor a whole memory region
> >>>   * currently is monitoring 'changing to a value', add support
> >>>     for 'changing from a value'
> >>
> >> That really looks more like the kind of thing you would want to carry as a OOT
> >> hack for your special debugging needs :)
> > 
> > Thanks for the review and bringing up a very good question that whether
> > the patch is worthy!
> > 
> > Personally, I think it is.  
> 
> The problem is that the interface is odd (kernel parameters) and the
> implementation is shaky (what happens if memory does not exist? What happens if
> we unplug memory?).

The concern makes sense to me. 

IIUC, the risk of using this patch is similar to the usage of "/dev/mem".
Currently this kconfig depends on DEBUG_KERNEL, so how about making it 

	"depends on DEBUG_KERNEL && IO_STRICT_DEVMEM" (depends on STRICT_DEVMEM)

and warn clearly it is only for kernel issue debugging and "Use with care!"
in kconfig help text and code comments?

As discussed in RFC patch review, this debug feature is similar to
soft/hard lockup detector and task-hung detector, should I make the control
interface to sysctl interface following them, and reduce the control knobs?
The dram and mmio interfaces can be merged, and 'check_once', 'panic_on_hit'
could be removed if necessary.

How do you think? 

Thanks,
Feng

> I don't think it's a good use of our time to polish all that up and then
> maintain it.
> 
> -- 
> Cheers,
> 
> David

  reply	other threads:[~2026-06-23  8:26 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-22  8:14 Feng Tang
2026-06-22  8:42 ` David Hildenbrand (Arm)
2026-06-22 10:53   ` Thomas Gleixner
2026-06-22 12:45   ` Feng Tang
2026-06-22 14:13     ` David Hildenbrand (Arm)
2026-06-23  8:26       ` Feng Tang [this message]
2026-06-24  9:04         ` Thomas Gleixner
2026-06-24 10:21           ` David Hildenbrand (Arm)
2026-06-24 11:16             ` Feng Tang
2026-06-24 11:12           ` Feng Tang
2026-06-25 21:30             ` Thomas Gleixner
2026-06-26  1:56               ` Feng Tang
2026-06-26  2:57                 ` Feng Tang
2026-06-26  6:50                 ` Feng Tang
2026-06-26  9:16                 ` Thomas Gleixner
2026-06-26 14:33                   ` Feng Tang
2026-06-26 15:31                     ` Thomas Gleixner
2026-06-29  8:35                       ` Feng Tang
2026-06-23 17:26 ` Julian Braha
2026-06-24  2:43   ` Feng Tang

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=ajpDNxhOS-6l6LdP@U-2FWC9VHC-2323.local \
    --to=feng.tang@linux.alibaba.com \
    --cc=akpm@linux-foundation.org \
    --cc=ardb+git@google.com \
    --cc=david@kernel.org \
    --cc=dianders@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@kernel.org \
    --cc=peterz@infradead.org \
    --cc=pmladek@suse.com \
    --cc=rostedt@goodmis.org \
    --cc=tglx@kernel.org \
    --cc=vbabka@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®