[PATCH] include: sbi_platform: Increase default stack size
Vivian Wang
wangruikang at iscas.ac.cn
Mon May 25 20:26:27 PDT 2026
On 5/25/26 21:23, Anirudh Srinivasan wrote:
> Hi Vivian,
>
> On Sun, May 24, 2026 at 12:53 AM Vivian Wang <wangruikang at iscas.ac.cn> 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/20260210094044.72591-1-ganboing@gmail.com # [2]
>> Signed-off-by: Vivian Wang <wangruikang at iscas.ac.cn>
> There was a similar patch [1] from few days ago that makes this a
> Kconfig option. Either option would work to fix the bug I encountered.
Ah, oops, I definitely missed that. Thanks for the pointer.
> Wondering what the maintainers think about how to proceed with this.
>
> [1] https://lore.kernel.org/opensbi/VI0P192MB3062735A6194BB6DA72083499E002@VI0P192MB3062.EURP192.PROD.OUTLOOK.COM/T/#u
I would appreciate guidance from the maintainers on this as well.
Thanks,
Vivian "dramforever" Wang
More information about the opensbi
mailing list