diff options
author | Mark Rutland <[email protected]> | 2016-06-13 11:15:14 +0100 |
---|---|---|
committer | Will Deacon <[email protected]> | 2016-06-14 15:02:33 +0100 |
commit | c5cea06be060f38e5400d796e61cfc8c36e52924 (patch) | |
tree | 6674a1d439e46f034d5f26b86bef4998076714fa /tools/perf/scripts/python/call-graph-from-postgresql.py | |
parent | 5edb56491d4812c42175980759da53388e5d86f5 (diff) |
arm64: fix dump_instr when PAN and UAO are in use
If the kernel is set to show unhandled signals, and a user task does not
handle a SIGILL as a result of an instruction abort, we will attempt to
log the offending instruction with dump_instr before killing the task.
We use dump_instr to log the encoding of the offending userspace
instruction. However, dump_instr is also used to dump instructions from
kernel space, and internally always switches to KERNEL_DS before dumping
the instruction with get_user. When both PAN and UAO are in use, reading
a user instruction via get_user while in KERNEL_DS will result in a
permission fault, which leads to an Oops.
As we have regs corresponding to the context of the original instruction
abort, we can inspect this and only flip to KERNEL_DS if the original
abort was taken from the kernel, avoiding this issue. At the same time,
remove the redundant (and incorrect) comments regarding the order
dump_mem and dump_instr are called in.
Cc: Catalin Marinas <[email protected]>
Cc: James Morse <[email protected]>
Cc: Robin Murphy <[email protected]>
Cc: <[email protected]> #4.6+
Signed-off-by: Mark Rutland <[email protected]>
Reported-by: Vladimir Murzin <[email protected]>
Tested-by: Vladimir Murzin <[email protected]>
Fixes: 57f4959bad0a154a ("arm64: kernel: Add support for User Access Override")
Signed-off-by: Will Deacon <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-postgresql.py')
0 files changed, 0 insertions, 0 deletions