lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <a4e33e0da39e0644dd2579ba0ef3c1482f14ae68.camel@physik.fu-berlin.de>
Date: Sat, 25 Jan 2025 18:54:50 +0100
From: John Paul Adrian Glaubitz <glaubitz@...sik.fu-berlin.de>
To: Feng Tang <feng.tang@...el.com>
Cc: akpm@...ux-foundation.org, bristot@...hat.com, bsegall@...gle.com, 
	dietmar.eggemann@....com, juri.lelli@...hat.com,
 linux-kernel@...r.kernel.org, 	mgorman@...e.de, mingo@...hat.com,
 peterz@...radead.org, rostedt@...dmis.org, 	vbabka@...e.cz,
 vincent.guittot@...aro.org, vschneid@...hat.com, 	sparclinux@...r.kernel.org
Subject: Re: sched/debug: Dump end of stack when detected corrupted

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@...sik.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ