summaryrefslogtreecommitdiff
path: root/kernel/trace/trace.h
diff options
context:
space:
mode:
authorMasami Hiramatsu <mhiramat@kernel.org>2021-09-14 17:42:51 +0300
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2021-10-01 04:24:08 +0300
commitbf094cffea2a6503ce84062f9f0243bef77c58f9 (patch)
treec7e59457f4ff4311b54ad508396d9c21170a57cf /kernel/trace/trace.h
parent7da89495d500d6a1e6fe1019587c3b611c7bd217 (diff)
downloadlinux-bf094cffea2a6503ce84062f9f0243bef77c58f9.tar.xz
x86/kprobes: Fixup return address in generic trampoline handler
In x86, the fake return address on the stack saved by __kretprobe_trampoline() will be replaced with the real return address after returning from trampoline_handler(). Before fixing the return address, the real return address can be found in the 'current->kretprobe_instances'. However, since there is a window between updating the 'current->kretprobe_instances' and fixing the address on the stack, if an interrupt happens at that timing and the interrupt handler does stacktrace, it may fail to unwind because it can not get the correct return address from 'current->kretprobe_instances'. This will eliminate that window by fixing the return address right before updating 'current->kretprobe_instances'. Link: https://lkml.kernel.org/r/163163057094.489837.9044470370440745866.stgit@devnote2 Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Tested-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace.h')
0 files changed, 0 insertions, 0 deletions