diff options
author | Vineet Gupta <vgupta@synopsys.com> | 2020-05-19 22:28:32 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-07-16 08:13:33 +0200 |
commit | 1c2952b4f8a5ac9e24d5a065e384b1d8a6de5a1d (patch) | |
tree | 4f43ce21271a2162638c5976db0090b6b7deeb88 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | a211f79afb987b489410bc573d44c055ba548425 (diff) | |
download | linux-stable-1c2952b4f8a5ac9e24d5a065e384b1d8a6de5a1d.tar.gz linux-stable-1c2952b4f8a5ac9e24d5a065e384b1d8a6de5a1d.tar.bz2 linux-stable-1c2952b4f8a5ac9e24d5a065e384b1d8a6de5a1d.zip |
ARC: entry: fix potential EFA clobber when TIF_SYSCALL_TRACE
commit 00fdec98d9881bf5173af09aebd353ab3b9ac729 upstream.
Trap handler for syscall tracing reads EFA (Exception Fault Address),
in case strace wants PC of trap instruction (EFA is not part of pt_regs
as of current code).
However this EFA read is racy as it happens after dropping to pure
kernel mode (re-enabling interrupts). A taken interrupt could
context-switch, trigger a different task's trap, clobbering EFA for this
execution context.
Fix this by reading EFA early, before re-enabling interrupts. A slight
side benefit is de-duplication of FAKE_RET_FROM_EXCPN in trap handler.
The trap handler is common to both ARCompact and ARCv2 builds too.
This just came out of code rework/review and no real problem was reported
but is clearly a potential problem specially for strace.
Cc: <stable@vger.kernel.org>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions