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: <CAD=FV=UvwopskN3J_dhHsna143uG=Dh0YO=NO+9DHX-a4t7+RA@mail.gmail.com>
Date: Thu, 20 Jun 2024 15:26:43 -0700
From: Doug Anderson <dianders@...omium.org>
To: Jinjie Ruan <ruanjinjie@...wei.com>
Cc: catalin.marinas@....com, will@...nel.org, mark.rutland@....com, 
	swboyd@...omium.org, sumit.garg@...aro.org, frederic@...nel.org, 
	scott@...amperecomputing.com, misono.tomohiro@...itsu.com, 
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] arm64: smp: Fix missing IPI statistics

Hi,

On Wed, Jun 19, 2024 at 11:31 PM Jinjie Ruan <ruanjinjie@...wei.com> wrote:
>
> commit 83cfac95c018 ("genirq: Allow interrupts to be excluded from
> /proc/interrupts") is to avoid IPIs appear twice in /proc/interrupts.
> But the commit 331a1b3a836c ("arm64: smp: Add arch support for backtrace
> using pseudo-NMI") and commit 2f5cd0c7ffde("arm64: kgdb: Implement
> kgdb_roundup_cpus() to enable pseudo-NMI roundup") set CPU_BACKTRACE and
> KGDB_ROUNDUP IPIs "IRQ_HIDDEN" flag but not show them in
> arch_show_interrupts(), which cause the interrupt kstat_irqs accounting
> is missing in display.
>
> Before this patch, CPU_BACKTRACE and KGDB_ROUNDUP IPIs are missing:
>         / # cat /proc/interrupts
>                    CPU0       CPU1       CPU2       CPU3
>          11:        466        600        309        332     GICv3  27 Level     arch_timer
>          13:         24          0          0          0     GICv3  33 Level     uart-pl011
>          15:         64          0          0          0     GICv3  78 Edge      virtio0
>          16:          0          0          0          0     GICv3  79 Edge      virtio1
>          17:          0          0          0          0     GICv3  34 Level     rtc-pl031
>          18:          3          3          3          3     GICv3  23 Level     arm-pmu
>          19:          0          0          0          0 9030000.pl061   3 Edge      GPIO Key Poweroff
>         IPI0:         7         14          9         26       Rescheduling interrupts
>         IPI1:       354         93        233        255       Function call interrupts
>         IPI2:         0          0          0          0       CPU stop interrupts
>         IPI3:         0          0          0          0       CPU stop (for crash dump) interrupts
>         IPI4:         0          0          0          0       Timer broadcast interrupts
>         IPI5:         1          0          0          0       IRQ work interrupts
>         Err:          0
>
> After this pacth, CPU_BACKTRACE and KGDB_ROUNDUP IPIs are displayed:
>         / # cat /proc/interrupts
>                    CPU0       CPU1       CPU2       CPU3
>          11:        393        281        532        449     GICv3  27 Level     arch_timer
>          13:         15          0          0          0     GICv3  33 Level     uart-pl011
>          15:         64          0          0          0     GICv3  78 Edge      virtio0
>          16:          0          0          0          0     GICv3  79 Edge      virtio1
>          17:          0          0          0          0     GICv3  34 Level     rtc-pl031
>          18:          2          2          2          2     GICv3  23 Level     arm-pmu
>          19:          0          0          0          0 9030000.pl061   3 Edge      GPIO Key Poweroff
>         IPI0:        11         19          4         23       Rescheduling interrupts
>         IPI1:       279        347        222         72       Function call interrupts
>         IPI2:         0          0          0          0       CPU stop interrupts
>         IPI3:         0          0          0          0       CPU stop (for crash dump) interrupts
>         IPI4:         0          0          0          0       Timer broadcast interrupts
>         IPI5:         1          0          0          1       IRQ work interrupts
>         IPI6:         0          0          0          0       CPU backtrace interrupts
>         IPI7:         0          0          0          0       KGDB roundup interrupts
>         Err:          0
>
> Fixes: 331a1b3a836c ("arm64: smp: Add arch support for backtrace using pseudo-NMI")
> Signed-off-by: Jinjie Ruan <ruanjinjie@...wei.com>
> Suggested-by: Doug Anderson <dianders@...omium.org>
> ---
> v2:
> - Report them in arch_show_interrupts().
> - Add suggested-by.
> - Update the commit message.
> ---
>  arch/arm64/kernel/smp.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)

Personally I don't find a ton of value in having the "CPU backtrace
interrupts" and "KGDB roundup interrupts" reported, but I agree that
if someone does find value in having them reported that this is the
best way. I guess that means a light:

Reviewed-by: Douglas Anderson <dianders@...omium.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ