
Hi Heinrich,
On Wed, 11 Nov 2020 at 16:30, Heinrich Schuchardt xypron.glpk@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@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@chromium.org
Do you think a command-line flag might be useful too/instead?