MIPS: Minor EVA related unwind fixes
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 4 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | MIPS: Don't unwind to user mode with EVAarch/ | +1 | 3 replies | |
| 2/2 | MIPS: Avoid using unwind_stack() with usermodearch/ | +1 | 1 reply |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2] MIPS: Minor EVA related unwind fixes
Here are a couple of minor EVA related stack unwind fixes, which prevent the use of unwind_stack() (which unwinds using kallsyms knowledge of where kernel functions begin and end) to unwind userland code, particularly where the PC is a valid kernel address, which could happen innocently with EVA due to the overlapped user/kernel address spaces.
Note that unwind_stack() is defensive enough that it shouldn't do any harm, so I've only tagged stable back to v3.15, when EVA was added and it could conceivably happen under normal operation.
A rough audit shows no other uses of __kernel_text_address() in relation to possibly user mode register contexts.
The first patch fixes unwind_stack() itself not to unwind through an exception frame if it represents the user register context, preventing itself being called with that context next.
The second patch fixes show_backtrace() to fall back to raw backtrace for user mode register contexts, rather than using unwind_stack(). This is used on certain faults which can be triggered by userland (namely unaligned accesses when reporting is enabled in debugfs).
James Hogan (2):
MIPS: Don't unwind to user mode with EVA
MIPS: Avoid using unwind_stack() with usermode
arch/mips/kernel/process.c | 2 +- arch/mips/kernel/traps.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
2.4.10