mythril icon indicating copy to clipboard operation
mythril copied to clipboard

Print backtrace on fault/panic

Open ALSchwalm opened this issue 5 years ago • 0 comments

This can generally be done like in redox: https://github.com/redox-os/kernel/blob/d4d14c78c304f1c3ae9628b5305ec3fa342c1409/src/arch/x86_64/interrupt/trace.rs#L10

The trouble is that we currently just map the first 4GB as virtual=physical. This means we have no real way of checking if a particular rbp value is meaningful. So if something corrupts the stack, we may cause a protection fault while attempting to print the stack trace. This can cause an infinite loop as we try to dump the stack trace in the fault handler as well.

I don't see a really good solution here, but one will probably become apparent as we develop a more sophisticate memory mapping scheme.

ALSchwalm avatar Feb 16 '20 21:02 ALSchwalm