Mythril's panic_handler will currently spin in halt:
|
loop { |
|
unsafe { |
|
// Try to at least keep CPU from running at 100% |
|
asm!("hlt", options(nostack, nomem)); |
|
} |
|
} |
I think it would be worthwhile to allow mythril to use the isa-debug-exit device to cause QEMU to exit with an error code if mythril panics. However @dlrobertson mentioned that he would like to see this configurable.
The following commit will allow qemu to exit on panic, but my question is about how to make it configurable:
sruffell@912f08c
Currently, this can be turned on and off by adding/removing -device isa-debug-exit on the QEMU command-line but was there another idea about how to configure this? Should the mythril.cfg file have an option that would control whether the panic handler even tries to do the port IO to the isa-debug-exit device?
Mythril's panic_handler will currently spin in halt:
mythril/mythril/src/error.rs
Lines 138 to 143 in af161a4
I think it would be worthwhile to allow mythril to use the isa-debug-exit device to cause QEMU to exit with an error code if mythril panics. However @dlrobertson mentioned that he would like to see this configurable.
The following commit will allow qemu to exit on panic, but my question is about how to make it configurable:
sruffell@912f08c
Currently, this can be turned on and off by adding/removing
-device isa-debug-exiton the QEMU command-line but was there another idea about how to configure this? Should the mythril.cfg file have an option that would control whether the panic handler even tries to do the port IO to the isa-debug-exit device?