-
Notifications
You must be signed in to change notification settings - Fork 72
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
Net: Implement deferred panic #314
Comments
Nov 23, 2022 (which was before we implemented kprobe self-test via 26f36ed) Without deferred panic yet, testing with
whereas the full messages would be:
followed by a backtrace. As to deferred panic, I am wondering whether we should limit that to LKRG-induced panics or maybe hook into the kernel's panic code (or something it calls) and similarly defer non-LKRG panics (only the final stopping/rebooting, but not the messages). For example, we could have a wait-until-sent-or-timeout loop in a callback we'd register with |
Nov 28, 2022
I've just experimented with this. First, by code review those callbacks are made too late for us - after shutdown of SMP, whereas we'd want our network sending code to run on another CPU because the one panic'ing is in an unsuitable state (was already in an unknown state, and is further modified by the panic in progress). Second, in my testing the callback is somehow not called at all - which I couldn't figure out yet. |
After test-implementing #336 and repeating the
... and that's where it ends, even though locally the messages included the full backtrace. That's an improvement in what got through! But I didn't even test without trying to fix #336 on this specific setup, so I don't know what caused the improvement. |
Tried this again without the #336 fix, got:
So much of this is random, but this newer kernel is in general more lucky in getting some info through than the older one was during my testing in 2022. |
Nov 10, 2022
When LKRG decides to panic the kernel and we have networking enabled, the panic should be deferred until after we've at least tried sending the message out.
However, in such configuration we should probably apply the previous level of enforcement (where applicable) right away, so that switching from that level to panic obviously does not weaken security. For example, kill the task right away (where applicable), then send the message that we're about to panic the kernel, then actually panic.
The text was updated successfully, but these errors were encountered: