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]
Date: Thu, 14 Mar 2024 09:42:05 -0400
From: Pasha Tatashin <pasha.tatashin@...een.com>
To: Christophe Leroy <christophe.leroy@...roup.eu>
Cc: "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>, "jpoimboe@...nel.org" <jpoimboe@...nel.org>, 
	"kent.overstreet@...ux.dev" <kent.overstreet@...ux.dev>, "peterz@...radead.org" <peterz@...radead.org>, 
	"nphamcs@...il.com" <nphamcs@...il.com>, 
	"cerasuolodomenico@...il.com" <cerasuolodomenico@...il.com>, "surenb@...gle.com" <surenb@...gle.com>, 
	"lizhijian@...itsu.com" <lizhijian@...itsu.com>, "willy@...radead.org" <willy@...radead.org>, 
	"shakeel.butt@...ux.dev" <shakeel.butt@...ux.dev>, "vbabka@...e.cz" <vbabka@...e.cz>, 
	"ziy@...dia.com" <ziy@...dia.com>, 
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, "linux-mm@...ck.org" <linux-mm@...ck.org>
Subject: Re: [PATCH] vmstat: Keep count of the maximum page reached by the
 kernel stack

On Thu, Mar 14, 2024 at 4:19 AM Christophe Leroy
<christophe.leroy@...roup.eu> wrote:
>
>
>
> Le 13/03/2024 à 04:34, Pasha Tatashin a écrit :
> > CONFIG_DEBUG_STACK_USAGE provides a mechanism to know the minimum amount
> > of memory that was left in stack. Every time the new anti-record is
> > reached a message is printed to the console.
> >
> > However, this is not useful to know how much each page within stack was
> > actually used. Provide a mechanism to count the number of time each
> > stack page was reached throughout the live of the stack:
>
> by "this is not useful to know ", you mean "this does not allow us to
> know" ?

Yes, bad wording from my side, I will change it to you suggestion in
the next version.

>
> >
> >       $
> >       kstack_page_1 19974
> >       kstack_page_2 94
> >       kstack_page_3 0
> >       kstack_page_4 0
>
> That's probably only usefull when THREAD_SIZE is larger than PAGE_SIZE.

That is right, if THREAD_SIZE <= PAGE_SIZE, only "kstack_page_1" would
be filled.

>
> On powerpc 8xx, THREAD_SIZE is 8k by default and PAGE_SIZE can be either
> 4k or 16k.

With THREAD_SIZE == 8K, and  PAGE_SIZE = 4K
There will be  two counters in /proc/vmstat, something like this:

kstack_page_1 XXX
kstack_page_2 YYY

With THREAD_SIZE=16K, and PAGE_SIZE = 16K
There will be two counters, but one will always be zero:

kstack_page_1 XXX
kstack_page_2 0

Thanks,
Pasha

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ