summaryrefslogtreecommitdiff
path: root/arch/arc/include
diff options
context:
space:
mode:
authorVineet Gupta <vgupta@synopsys.com>2020-05-20 08:28:32 +0300
committerVineet Gupta <vgupta@synopsys.com>2020-06-16 22:56:37 +0300
commit00fdec98d9881bf5173af09aebd353ab3b9ac729 (patch)
tree041616ad6c5cb039d0f236afdc32f965992689cf /arch/arc/include
parentb3a9e3b9622ae10064826dccb4f7a52bd88c7407 (diff)
downloadlinux-00fdec98d9881bf5173af09aebd353ab3b9ac729.tar.xz
ARC: entry: fix potential EFA clobber when TIF_SYSCALL_TRACE
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>
Diffstat (limited to 'arch/arc/include')
0 files changed, 0 insertions, 0 deletions