[PATCH] validation: Check stack of interrupted context
Kinsey Moore
kinsey.moore at oarcorp.com
Fri Sep 22 16:54:05 UTC 2023
On Fri, Sep 22, 2023 at 10:46 AM Kinsey Moore <kinsey.moore at oarcorp.com>
wrote:
> On Fri, Sep 22, 2023 at 7:44 AM Sebastian Huber <
> sebastian.huber at embedded-brains.de> wrote:
>
>> On 21.09.23 16:59, Kinsey Moore wrote:
>> > Ok, thanks! I'll take a look and see what I can find.
>>
>> Thanks, I did run the test case also on riscv and it worked fine in
>> uniprocessor and SMP configurations.
>>
>
> Without the patch on SMP, I'm seeing a hang on "B:RtemsIntrReqRaise" on
> QEMU (latest from RSB). With the patch on SMP, I'm seeing a somewhat
> different assert from inside _Thread_Handler on line 139.
>
> It seems related, so I'll keep looking into it.
>
It looks like the "msr spsel, #" directives are swapped in the wrapper
function that gets the non-interrupt stack pointer. This has the result of
corrupting the interrupt stack with a value from the non-interrupt stack
and leaving the interrupt stack in a state to continue recorrupting the
non-interrupt stack. As you can imagine, this causes some problems.
Swapping the spsel assembly seems to resolve the issue.
Kinsey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20230922/7d3cfe4c/attachment.htm>
More information about the devel
mailing list