mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-05 19:31:57 -04:00
ANDROID: arm64: Fix the address of ftrace_call compiled with CFI_CLANG
When CONFIG_CFI_CLANG and CONFIG_DYNAMIC_FTRACE are enabled, LLVM will generate a jump function named ftrace_call.cfi_jt for ftrace_call, which makes "&ftrace_call" in ftrace_update_ftrace_func() actually the address of ftrace_call.cfi_jt. As a result, the tracer can't be really enabled through runtime modification. Use __va_function() to get the actual address of ftrace_call to fix the issue. Bug: 184105181 Signed-off-by: Ben Dai <ben.dai@unisoc.com> Change-Id: Ic9272cd4ab447b3b145d8e397e5c9010c49f7a12
This commit is contained in:
parent
e06e6248a2
commit
c69129daaf
1 changed files with 1 additions and 1 deletions
|
|
@ -55,7 +55,7 @@ int ftrace_update_ftrace_func(ftrace_func_t func)
|
|||
unsigned long pc;
|
||||
u32 new;
|
||||
|
||||
pc = (unsigned long)&ftrace_call;
|
||||
pc = (unsigned long)__va_function(ftrace_call);
|
||||
new = aarch64_insn_gen_branch_imm(pc, (unsigned long)func,
|
||||
AARCH64_INSN_BRANCH_LINK);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue