[PATCH v1 2/3] aarch64: Add support for mapping exceptions

Kinsey Moore kinsey.moore at oarcorp.com
Fri Apr 16 23:57:48 UTC 2021


On 4/16/2021 09:00, Gedare Bloom wrote:
> On Wed, Apr 14, 2021 at 9:47 AM Kinsey Moore <kinsey.moore at oarcorp.com> wrote:
>> This adds support for mapping AArch64 machine exceptions to POSIX
>> signals as necessary for running Ada applications.
>> ---
>> <snip>
>> +  kill(getpid(), signal);
> Not just map it, but actually send it. I'm not convinced this design
> is the right way to deal with this problem. In addition to Sebastian's
> suggestion on using a fatal error handler, you may consider a user
> task to handle this. I think that kill() can have quite a large stack
> consumption? It is a very complex call to include in the 'normal'
> exception handling path with a giant switch to turn it on/off.
>
> If you have some analysis or justification for this design, I'd be
> glad to consider it. However, at a glance, it adds kill() to the
> WCET/latency of all synchronous exception handling when this option is
> enabled. Something about this feels off.

My only justification is that it is modeled on similar code in the SPARC 
BSPs (bsps/sparc/shared/gnatcommon.c) to handle these kinds of mappings 
for Ada. I assumed since it was already in place that it was the 
preferred method to accomplish this goal.


Kinsey




More information about the devel mailing list