[PATCH] validation: Check stack of interrupted context

Sebastian Huber sebastian.huber at embedded-brains.de
Tue Sep 26 05:59:12 UTC 2023



On 22.09.23 18:54, Kinsey Moore wrote:
> On Fri, Sep 22, 2023 at 10:46 AM Kinsey Moore <kinsey.moore at oarcorp.com 
> <mailto:kinsey.moore at oarcorp.com>> wrote:
> 
>     On Fri, Sep 22, 2023 at 7:44 AM Sebastian Huber
>     <sebastian.huber at embedded-brains.de
>     <mailto: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.

Thanks for having a look at this. I changed the code and now it works.

-- 
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.huber at embedded-brains.de
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/


More information about the devel mailing list