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] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 17 Nov 2018 18:36:12 +0530
From:   Pintu Agarwal <pintu.ping@...il.com>
To:     Valdis Kletnieks <valdis.kletnieks@...edu>
Cc:     open list <linux-kernel@...r.kernel.org>,
        linux-arm-kernel@...ts.infradead.org,
        Russell King - ARM Linux <linux@...linux.org.uk>,
        kernelnewbies@...nelnewbies.org,
        Jungseok Lee <jungseoklee85@...il.com>,
        catalin.marinas@....com, will.deacon@....com,
        Takahiro Akashi <takahiro.akashi@...aro.org>,
        mark.rutland@....com, Sungjinn Chung <barami97@...il.com>
Subject: Re: [ARM64] Printing IRQ stack usage information

On Sat, Nov 17, 2018 at 12:02 AM <valdis.kletnieks@...edu> wrote:
>
> On Fri, 16 Nov 2018 23:13:48 +0530, Pintu Agarwal said:
> > On Fri, Nov 16, 2018 at 10:16 PM <valdis.kletnieks@...edu> wrote:
>
> > > Congrats. You just re-invented DEBUG_STACK_USAGE, which just keeps a high-water mark
> > > for stack usage.
> >
> > So, you mean to say, my implementation is good enough to get the
> > irq_stack usage, from the interrupt handler ?
>
> No - your code doesn't keep a high-water mark (which should probably be
> hooked into the IRQ exit code.
>
> > But my concern is that if I dump it from irq handler, I will get
> > information only for the current cpu.
> > How do I store and get the information for all the cpu from the boot time ?
>
> Make the high-water mark a per-cpu variable.
>
> > From where do I call my dump_irq_stack_info() [some where during the
> > entry/exit part of the irq handler], so that I could dump information
> > for all the handler at boot time itself ?
>
> No, you don't do a dump-stack during entry/exit.  You just maintain a high-water
> value in the exit,

Which is the right place to keep track of this
high-water-irq-stack-usage (per_cpu)
in arch/arm64/* ?

> and then you create a /proc/something or similar that when
> read does a 'foreach CPU do print_high_water_irq'.
>
Ok got it.

> > Like I would to capture these information:
> > - What was the name of the handler ?
> > - Which cpu was executing it ?
> > - How much irq stack (max value, same like high water mark) were used
> > at that time ?
>
> First, do the easy part and find out if you even *care* once you see actual
> numbers.  If your IRQ stack is 8K but you never use more than 2500 bytes,
> do you *really* care about the name of the handler anymore?
>

Hmm, yes, getting the name of the handler is not so important in the first run.

> Also, see the code for /proc/interrupts to see how it keeps track of the
> interrupts per CPU - maybe all you need to do is change each entry from
> a 'count' to 'count, highwater'.

Ok thanks, thats a good pointer.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ