[PATCH v2 1/4] sandbox: add handler for exceptions

Heinrich Schuchardt xypron.debian at gmx.de
Thu Nov 19 22:11:12 CET 2020


On 17.11.20 00:53, Simon Glass wrote:
> Hi Heinrich,
>
> On Wed, 11 Nov 2020 at 16:30, Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
>>
>> Add a handler for SIGILL, SIGBUS, SIGSEGV.
>>
>> When an exception occurs print the program counter and the loaded
>> UEFI binaries and reset the system if CONFIG_SANDBOX_CRASH_RESET=y
>> or exit to the OS otherwise.
>>
>> Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
>> ---
>> v2:
>>         add a customizing switch
>>         set SA_NODEFER flag for sigaction
>> ---
>>  arch/sandbox/Kconfig          |  9 ++++++++
>>  arch/sandbox/cpu/os.c         | 40 +++++++++++++++++++++++++++++++++++
>>  arch/sandbox/cpu/start.c      |  4 ++++
>>  arch/sandbox/lib/interrupts.c | 35 ++++++++++++++++++++++++++++++
>>  include/os.h                  | 17 +++++++++++++++
>>  5 files changed, 105 insertions(+)
>
> Reviewed-by: Simon Glass <sjg at chromium.org>
>
> Do you think a command-line flag might be useful too/instead?
>

For my needs the CONFIG flag is enough.

I could not find the mail for patch 2/4 in my inbox.
I have tested on aarch64 that the exception work here too.

Best regards

Heinrich


More information about the U-Boot mailing list