Commit Graph

10 Commits

Author SHA1 Message Date
bb00e3c112 Kernel: Guard against recursive panics
Previously, when we panicked (page-fault for example) while dumping a kernel panic, it would just loop over and over again.

Now, we check if we were already in a panic, and limit the dump:
- No stack trace.
- Only a few registers.
- Only serial (since we can page fault while writing to the framebuffer)

This should make recursive panics much more difficult to achieve.
If we page-fault while writing to console, we don't even see a panic (not even in serial) and eventually triple-fault.
So this patch is actually more user-friendly.
2022-10-18 21:08:21 +02:00
48d68a3e31 Kernel: Switch back to kernel address space on kernel panic 2022-10-18 17:13:43 +02:00
a1146a5ce2 Panic: show panic message on screen 2022-10-16 18:23:33 +02:00
594d79143e Kernel: enable -Wconversion 2022-10-06 17:13:34 +02:00
3fd1b6773d Panic: Only dump stack trace if InitRD is initialized 2022-09-25 17:41:34 +02:00
aee4e55fdd add a proper kernel panic 2022-09-25 16:56:00 +02:00
a2d23efd1b Move files with their headers in include/misc/ into src/misc/ 2022-09-24 21:46:09 +02:00
49ddb47ad4 Reorganize structure 2022-09-21 17:56:53 +02:00
003c730117 Make hang() noreturn 2022-09-06 12:12:55 +02:00
1b727a66ea Ready. Set. Go! 2022-09-05 16:13:51 +02:00