diff options
author | James Hogan <[email protected]> | 2015-07-27 13:50:21 +0100 |
---|---|---|
committer | Ralf Baechle <[email protected]> | 2015-08-03 09:25:14 +0200 |
commit | 55c723e181ccec30fb5c672397fe69ec35967d97 (patch) | |
tree | 9c165df18002f434fad8f9828982c5b11d6bcc51 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 4ace6139bf23ab4f152ba4207fc10b76cc01d2a5 (diff) |
MIPS: do_mcheck: Fix kernel code dump with EVA
If a machine check exception is raised in kernel mode, user context,
with EVA enabled, then the do_mcheck handler will attempt to read the
code around the EPC using EVA load instructions, i.e. as if the reads
were from user mode. This will either read random user data if the
process has anything mapped at the same address, or it will cause an
exception which is handled by __get_user, resulting in this output:
Code: (Bad address in epc)
Fix by setting the current user access mode to kernel if the saved
register context indicates the exception was taken in kernel mode. This
causes __get_user to use normal loads to read the kernel code.
Signed-off-by: James Hogan <[email protected]>
Cc: Markos Chandras <[email protected]>
Cc: Leonid Yegoshin <[email protected]>
Cc: [email protected]
Cc: <[email protected]> # 3.15+
Patchwork: https://patchwork.linux-mips.org/patch/10777/
Signed-off-by: Ralf Baechle <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions