Hi Kuan-ying,
On Tue, Jul 16, 2024 at 9:12 PM <kuan-ying.lee(a)canonical.com> wrote:
Interesting, if it does then we should encounter the same crash issue.
Anyway I think we should get it fixed as well. Could you please post
the patch?
Hi Tao,
After digging into the code, I found that initially we were initializing the normal stack
size to an incorrect value, but after task_init(), it gets set to the correct value.
arm64_init() -> machdep->stacksize = ARM64_STACK_SIZE;
task_init() will set tasksize as follows.
| } else if (VALID_SIZE(thread_union) &&
| ((len = SIZE(thread_union)) != STACKSIZE())) {
| machdep->stacksize = len;
and irq_stack_size also set to the correct size on my side.
| /*
| * Determining the IRQ_STACK_SIZE is tricky, but for now
| * 4.14 kernel has:
| *
| * #define IRQ_STACK_SIZE THREAD_SIZE
| *
| * and finding a solid usage of THREAD_SIZE is hard, but:
| *
| * union thread_union {
| * ...
| * unsigned long stack[THREAD_SIZE/sizeof(long)];
| * };
| */
| if (MEMBER_EXISTS("thread_union", "stack")) {
| if ((sz = MEMBER_SIZE("thread_union", "stack")) > 0)
| ms->irq_stack_size = sz;
I cannot reproduce Yeping's issue with kernel-6.10.0-rc6 on my side, but I still can
post a patch based on Yeping's patch to initialize the stacksize based on kconfig
right from the beginning.
> Thanks,
> Tao Liu