sparclinux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
To: Feng Tang <feng.tang@intel.com>
Cc: akpm@linux-foundation.org, bristot@redhat.com,
	bsegall@google.com,  dietmar.eggemann@arm.com,
	juri.lelli@redhat.com, linux-kernel@vger.kernel.org,
		mgorman@suse.de, mingo@redhat.com, peterz@infradead.org,
	rostedt@goodmis.org, 	vbabka@suse.cz, vincent.guittot@linaro.org,
	vschneid@redhat.com, 	sparclinux@vger.kernel.org
Subject: Re: sched/debug: Dump end of stack when detected corrupted
Date: Sat, 25 Jan 2025 18:54:50 +0100	[thread overview]
Message-ID: <a4e33e0da39e0644dd2579ba0ef3c1482f14ae68.camel@physik.fu-berlin.de> (raw)
In-Reply-To: <Ztrr10sxYvQQGonC@feng-clx.sh.intel.com>

Hi Feng,

On Fri, 2024-09-06 at 19:47 +0800, Feng Tang wrote:
> Hi Andrian,
> 
> On Fri, Sep 06, 2024 at 10:45:46AM +0200, John Paul Adrian Glaubitz wrote:
> > Hi Feng,
> > 
> > > -	if (task_stack_end_corrupted(prev))
> > > +	if (task_stack_end_corrupted(prev)) {
> > > +		unsigned long *ptr = end_of_stack(prev);
> > > +
> > > +		/* Dump 16 ulong words around the corruption point */
> > > +#ifdef CONFIG_STACK_GROWSUP
> > > +		ptr -= 15;
> > > +#endif
> > > +		print_hex_dump(KERN_ERR, "Corrupted Stack: ",
> > > +			DUMP_PREFIX_ADDRESS, 16, 1, ptr, 16 * sizeof(*ptr), 1);
> > > +
> > 
> > I would recommend determining the buffer element size with sizeof(unsigned long) for
> > better readability and using "true" instead of "1" to set the value of the ascii
> > parameter to print_hex_dump(), see [1]. Otherwise looks good to me.
> 
> Thanks for the review! Yes, I can make that change.
> 
> > Reviewed-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
> > 
> > PS: Please CC me for a potential v3.
> 
> Sure.

I was just remembering this patch. Any chance you can put out a V3, so
I can review it and someone can hopefully pick it up in the right tree?

Thanks,
Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

      reply	other threads:[~2025-01-25 17:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20231219032254.96685-1-feng.tang@intel.com>
2024-09-03 16:33 ` sched/debug: Dump end of stack when detected corrupted John Paul Adrian Glaubitz
2024-09-04  2:59   ` Feng Tang
2024-09-06  8:45 ` John Paul Adrian Glaubitz
2024-09-06 11:47   ` Feng Tang
2025-01-25 17:54     ` John Paul Adrian Glaubitz [this message]

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=a4e33e0da39e0644dd2579ba0ef3c1482f14ae68.camel@physik.fu-berlin.de \
    --to=glaubitz@physik.fu-berlin.de \
    --cc=akpm@linux-foundation.org \
    --cc=bristot@redhat.com \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=feng.tang@intel.com \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=sparclinux@vger.kernel.org \
    --cc=vbabka@suse.cz \
    --cc=vincent.guittot@linaro.org \
    --cc=vschneid@redhat.com \
    /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;
as well as URLs for NNTP newsgroup(s).