[Crash-utility] Re: Fix irq_stack_size on ARM64

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Kuan-ying,

On Wed, Jul 17, 2024 at 4:53 PM <kuan-ying.lee@xxxxxxxxxxxxx> wrote:
>
> > Hi Kuan-ying,
> >
> > On Tue, Jul 16, 2024 at 9:12 PM <kuan-ying.lee(a)canonical.com&gt; 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.

If crash can finally get the correct stack size, then I think there is
no need to introduce the IKconfig code to get one, unless we really
encounter the issue and there is no other option than IKconfig.

Thanks,
Tao Liu

>
> > Thanks,
> > Tao Liu
> --
> Crash-utility mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxxxxxx
> To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxxxxxx
> https://${domain_name}/admin/lists/devel.lists.crash-utility.osci.io/
> Contribution Guidelines: https://github.com/crash-utility/crash/wiki
--
Crash-utility mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxxxxxx
https://${domain_name}/admin/lists/devel.lists.crash-utility.osci.io/
Contribution Guidelines: https://github.com/crash-utility/crash/wiki




[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux