s390/ftrace: fix mcount adjustment
Tony Jones reported that the ftrace self tests on s390 do not work: <6>Testing dynamic ftrace ops #1: (0 0 0 0 0) FAILED! <6>Testing tracer irqsoff: <3>failed to start irqsoff tracer <4>.. no entries found ..FAILED! <6>Testing tracer wakeup: <3>failed to start wakeup tracer <4>.. no entries found ..FAILED! <6>Testing tracer function_graph: <4>Failed to init function_graph tracer, init returned -19 <4>FAILED! This happens because we forgot to adjust the instruction pointer that gets passed to the ftrace trace function by MCOUNT_INSN_SIZE. In addition change MCOUNT_INSN_SIZE to the correct value on 31 bit. It only worked so far because the to be patched instruction was identical. Reported-by: Tony Jones <tonyj@suse.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
此提交包含在:
@@ -7,6 +7,7 @@
|
||||
|
||||
#include <linux/linkage.h>
|
||||
#include <asm/asm-offsets.h>
|
||||
#include <asm/ftrace.h>
|
||||
|
||||
.section .kprobes.text, "ax"
|
||||
|
||||
@@ -33,6 +34,7 @@ ENTRY(ftrace_caller)
|
||||
la %r2,0(%r14)
|
||||
st %r0,__SF_BACKCHAIN(%r15)
|
||||
la %r3,0(%r3)
|
||||
ahi %r2,-MCOUNT_INSN_SIZE
|
||||
l %r14,0b-0b(%r1)
|
||||
l %r14,0(%r14)
|
||||
basr %r14,%r14
|
||||
|
新增問題並參考
封鎖使用者