Re: [PATCH] include: sbi_platform: Increase default stack size

Aurelien Jarno <[email protected]>
Newsgroups org.infradead.lists.opensbi
Message-ID <[email protected]>
On 2026-05-24 13:53, Vivian Wang wrote:
> sbi_misaligned_v_ld_emulator() has a local buffer (namely mask) which is
> 8192 bytes in size, so the default stack size is not enough. Double it
> to 16384.
> 
> This stack overflow can be observed by any S-mode software and leads to
> M-mode crash or unexpected behavior, as long as the S-mode software does
> not enable FWFT misaligned delegation [1]. This may be considered a
> temporary fix until further fixes are made to misaligned handling [2].
> 
> Link: https://lore.kernel.org/linux-riscv/nrvt74qnojaubiwjo37ums4lnclu466hovwrhmtbag6f5uhrql@q6msoe2oto4b # [1]
> Link: https://lore.kernel.org/opensbi/[email protected] # [2]
> Signed-off-by: Vivian Wang <[email protected]>
> ---
>  include/sbi/sbi_platform.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Tested-by: Aurelien Jarno <[email protected]>

I can confirm that this fix is required to boot a 7.1-rc6 kernel on a 
CPU with vector instructions (in my case SpacemiT K1).

Regards
Aurelien

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
[email protected]                     http://aurel32.net

-- 
opensbi mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/opensbi
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.