Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

panic may get ignored and code would continue execution #1413

Open
paulcallen opened this issue Aug 29, 2022 · 2 comments
Open

panic may get ignored and code would continue execution #1413

paulcallen opened this issue Aug 29, 2022 · 2 comments
Labels
area/kernel Area: Kernel

Comments

@paulcallen
Copy link
Member

If access violation has a handler in an application the panic would go to their handler and could be ignored and be returned to the panic function.
This is a real scenario with something like dotnet when it throws exceptions to threads and ignores if it is not stopped in their code.
We should make sure the kernel really exits the kernel when panic is called.
Maybe panic can set the sighandler to default before it raises the exception.
We cannot just call the default handler in all cases where signals was raised from inside the kernel as the dotnet scenario could cause the kernel to shutdown when it should not.

@paulcallen paulcallen added the area/kernel Area: Kernel label Aug 29, 2022
@paulcallen
Copy link
Member Author

the implementation does spin the thread that panicked, but other threads can continue to run which can get the kernel into an even worse state

@paulcallen
Copy link
Member Author

it is possible that even setting the default signal handler is not enough because we really need to shutdown ALL process and ALL threads if possible. However shutting down gracefully may just cause everything to lock up.
Killing all threads from the host may be the best option, maybe having a target function that can cause exit() (if linux target), and calling into the host to call exit on SGX

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/kernel Area: Kernel
Projects
None yet
Development

No branches or pull requests

1 participant