[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <7a2379cf-c1cf-46af-9172-334d2b9b88d5@www.fastmail.com>
Date: Tue, 20 Sep 2022 09:17:45 +0200
From: "Arnd Bergmann" <arnd@...db.de>
To: guoren <guoren@...nel.org>
Cc: "Palmer Dabbelt" <palmer@...osinc.com>,
"Thomas Gleixner" <tglx@...utronix.de>,
"Peter Zijlstra" <peterz@...radead.org>,
"Andy Lutomirski" <luto@...nel.org>,
"Conor.Dooley" <conor.dooley@...rochip.com>,
Heiko Stübner <heiko@...ech.de>,
"Jisheng Zhang" <jszhang@...nel.org>, lazyparser@...il.com,
falcon@...ylab.org, "Huacai Chen" <chenhuacai@...nel.org>,
"Anup Patel" <apatel@...tanamicro.com>,
"Atish Patra" <atishp@...shpatra.org>,
"Palmer Dabbelt" <palmer@...belt.com>,
"Paul Walmsley" <paul.walmsley@...ive.com>,
"Sebastian Andrzej Siewior" <bigeasy@...utronix.de>,
Linux-Arch <linux-arch@...r.kernel.org>,
linux-kernel@...r.kernel.org, linux-riscv@...ts.infradead.org,
"Guo Ren" <guoren@...ux.alibaba.com>,
"Andreas Schwab" <schwab@...e.de>
Subject: Re: [PATCH V4 8/8] riscv: Add config of thread stack size
On Tue, Sep 20, 2022, at 2:46 AM, Guo Ren wrote:
> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
> index dfe600f3526c..8def456f328c 100644
> --- a/arch/riscv/Kconfig
> +++ b/arch/riscv/Kconfig
> @@ -442,6 +442,16 @@ config IRQ_STACKS
> Add independent irq & softirq stacks for percpu to prevent
> kernel stack
> overflows. We may save some memory footprint by disabling IRQ_STACKS.
>
> +config THREAD_SIZE
> + int "Kernel stack size (in bytes)" if EXPERT
> + range 4096 65536
> + default 8192 if 32BIT && !KASAN
> + default 32768 if 64BIT && KASAN
> + default 16384
> + help
> + Specify the Pages of thread stack size (from 4KB to 64KB), which also
> + affects irq stack size, which is equal to thread stack size.
I still think this should be guarded in a way that prevents
setting the stack to smaller than default values unless VMAP_STACK
is set as well.
Arnd
Powered by blists - more mailing lists