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:   Tue, 12 Jul 2022 14:57:48 +0800
From:   Qi Zheng <zhengqi.arch@...edance.com>
To:     arnd@...db.de, catalin.marinas@....com, will@...nel.org
Cc:     linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1 0/2] arm64: run softirqs on the per-CPU IRQ stack



On 2022/7/8 17:49, Qi Zheng wrote:
> Hi all,
> 
> Currently arm64 supports per-CPU IRQ stack, but softirqs are
> still handled in the task context.
> 
> Since any call to local_bh_enable() at any level in the task's
> call stack may trigger a softirq processing run, which could
> potentially cause a task stack overflow if the combined stack
> footprints exceed the stack's size. And we did encounter this
> situation in the real environment:
> 
> Call trace:
>   dump_backtrace+0x0/0x1cc,
>   show_stack+0x14/0x1c,
>   dump_stack+0xc4/0xfc,
>   panic+0x150/0x2c8,
>   panic+0x0/0x2c8,
>   handle_bad_stack+0x11c/0x130,
>   __bad_stack+0x88/0x8c,
>   vsnprintf+0x2c/0x524,
>   vscnprintf+0x38/0x7c,
>   scnprintf+0x6c/0x90,
>   /* ... */
>   __do_softirq+0x1e0/0x370,
>   do_softirq+0x40/0x50,
>   __local_bh_enable_ip+0x8c/0x90,
>   _raw_spin_unlock_bh+0x1c/0x24,
>   /* ... */
>   process_one_work+0x1dc/0x3e4,
>   worker_thread+0x260/0x360,
>   kthread+0x118/0x128,
>   ret_from_fork+0x10/0x18,
> 
> So let's run these softirqs on the IRQ stack as well.
> 
> This series is based on next-20220707.
> 
> Comments and suggestions are welcome.
> 
> Thanks,
> Qi
> 
> RFC: https://lore.kernel.org/lkml/20220707110511.52129-1-zhengqi.arch@bytedance.com/
> 
> Changelog in RFC -> v1:
>   - fix conflicts with commit f2c5092190f2 ("arch/*: Disable softirq stacks on PREEMPT_RT.")
> 
> Qi Zheng (2):
>    arm64: run softirqs on the per-CPU IRQ stack
>    arm64: support HAVE_IRQ_EXIT_ON_IRQ_STACK
> 
>   arch/arm64/Kconfig                 |  2 ++
>   arch/arm64/include/asm/exception.h |  4 +++-
>   arch/arm64/kernel/entry-common.c   | 30 ++++++++++++++++++++----------
>   arch/arm64/kernel/entry.S          |  6 ++++--
>   arch/arm64/kernel/irq.c            | 14 ++++++++++++++
>   5 files changed, 43 insertions(+), 13 deletions(-)
> 

Hi all,

Any other suggestions and comments for this patch set? If not, can
this patch set be merged into some trees for testing? :)

Thanks,
Qi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ