Repository navigation
Commit 9fcb2ce
Handle MIPS Linux reserved-instruction exception
Same class of crash as the ARM/ARM64 fix: MIPS Linux only hooked the
syscall exception, so any other CPU exception reached the unhandled-interrupt
dispatcher and raised QlErrorCoreHook.
In examples/shellcode_run.py the rootfs-less MIPS shellcode runs past its
denied execve into the trailing "/bin/sh" string, which decodes as a
reserved instruction (exception 20) -- delivered as SIGILL on a real kernel.
Hook the reserved-instruction exception and route it through the existing
hook_cpu_exception handler. Add a small EXCP enum to mips_const so the
syscall and reserved-instruction codes are named rather than magic numbers.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 0626c1b commit 9fcb2ce
2 files changed
Lines changed: 14 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
8 | 17 | | |
9 | 18 | | |
10 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
71 | | - | |
| 72 | + | |
| 73 | + | |
72 | 74 | | |
73 | 75 | | |
74 | 76 | | |
| |||
149 | 151 | | |
150 | 152 | | |
151 | 153 | | |
152 | | - | |
| 154 | + | |
| 155 | + | |
153 | 156 | | |
154 | 157 | | |
155 | 158 | | |
| |||
0 commit comments