All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] sandbox: exception handling
@ 2020-11-11 23:29 Heinrich Schuchardt
  2020-11-11 23:29 ` [PATCH v2 1/4] sandbox: add handler for exceptions Heinrich Schuchardt
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Heinrich Schuchardt @ 2020-11-11 23:29 UTC (permalink / raw)
  To: u-boot

Currently if an exception SIGILL, SIGBUS, SIGSEGV occurs the sandbox
stops execution. This does not match the behavior on other architectures.

Instead print the current program counter and if any the involved UEFI
binaries. Then depending on a customizing system either reset the system
or exit to the OS.

When testing UEFI binaries like the Self Certification Test exceptions may
occur. Without information about the UEFI binary where the exception
was caused it is difficult to analyze the cause.

The exception command is implemented for the sandbox. This command allows
to trigger SIGILL or SIGSEGV.

v2:
	add a customizing switch
	set SA_NODEFER flag for sigaction
	provide a unit test for the exception command

Heinrich Schuchardt (4):
  sandbox: add handler for exceptions
  cmd: sandbox: implement exception command
  efi_selftest: implement exception test for sandbox
  test: unit test for exception command

 arch/Kconfig                                  |  1 +
 arch/sandbox/Kconfig                          |  9 ++++
 arch/sandbox/cpu/os.c                         | 40 ++++++++++++++++++
 arch/sandbox/cpu/start.c                      |  4 ++
 arch/sandbox/lib/interrupts.c                 | 35 ++++++++++++++++
 cmd/Kconfig                                   |  2 +-
 cmd/Makefile                                  |  1 +
 cmd/sandbox/Makefile                          |  3 ++
 cmd/sandbox/exception.c                       | 41 +++++++++++++++++++
 include/os.h                                  | 17 ++++++++
 .../efi_selftest_miniapp_exception.c          |  2 +
 test/py/tests/test_sandbox_exit.py            | 24 +++++++++++
 12 files changed, 178 insertions(+), 1 deletion(-)
 create mode 100644 cmd/sandbox/Makefile
 create mode 100644 cmd/sandbox/exception.c

--
2.28.0

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2020-12-10  0:26 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-11 23:29 [PATCH v2 0/4] sandbox: exception handling Heinrich Schuchardt
2020-11-11 23:29 ` [PATCH v2 1/4] sandbox: add handler for exceptions Heinrich Schuchardt
2020-11-16 23:53   ` Simon Glass
2020-11-19 21:11     ` Heinrich Schuchardt
2020-12-10  0:26     ` Simon Glass
2020-11-11 23:29 ` [PATCH v2 2/4] cmd: sandbox: implement exception command Heinrich Schuchardt
2020-11-11 23:29 ` [PATCH v2 3/4] efi_selftest: implement exception test for sandbox Heinrich Schuchardt
2020-11-16 23:53   ` Simon Glass
2020-11-19 21:12     ` Heinrich Schuchardt
2020-12-10  0:26     ` Simon Glass
2020-11-11 23:29 ` [PATCH v2 4/4] test: unit test for exception command Heinrich Schuchardt
2020-11-16 23:53   ` Simon Glass
2020-12-10  0:26 ` [PATCH v2 2/4] cmd: sandbox: implement " Simon Glass

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.