Message ID | 20230405180250.2046566-3-revest@chromium.org (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
Series | Add ftrace direct call for arm64 | expand |
Context | Check | Description |
---|---|---|
netdev/tree_selection | success | Not a local patch |
bpf/vmtest-bpf-PR | success | PR summary |
bpf/vmtest-bpf-VM_Test-1 | success | Logs for ${{ matrix.test }} on ${{ matrix.arch }} with ${{ matrix.toolchain_full }} |
bpf/vmtest-bpf-VM_Test-2 | success | Logs for ShellCheck |
bpf/vmtest-bpf-VM_Test-3 | success | Logs for build for aarch64 with gcc |
bpf/vmtest-bpf-VM_Test-4 | success | Logs for build for aarch64 with llvm-16 |
bpf/vmtest-bpf-VM_Test-5 | fail | Logs for build for s390x with gcc |
bpf/vmtest-bpf-VM_Test-6 | success | Logs for build for x86_64 with gcc |
bpf/vmtest-bpf-VM_Test-7 | success | Logs for build for x86_64 with llvm-16 |
bpf/vmtest-bpf-VM_Test-8 | success | Logs for set-matrix |
diff --git a/arch/arm64/kernel/ftrace.c b/arch/arm64/kernel/ftrace.c index 758436727fba..432626c866a8 100644 --- a/arch/arm64/kernel/ftrace.c +++ b/arch/arm64/kernel/ftrace.c @@ -195,15 +195,15 @@ int ftrace_update_ftrace_func(ftrace_func_t func) return ftrace_modify_code(pc, 0, new, false); } -static struct plt_entry *get_ftrace_plt(struct module *mod, unsigned long addr) +static struct plt_entry *get_ftrace_plt(struct module *mod) { #ifdef CONFIG_ARM64_MODULE_PLTS struct plt_entry *plt = mod->arch.ftrace_trampolines; - if (addr == FTRACE_ADDR) - return &plt[FTRACE_PLT_IDX]; -#endif + return &plt[FTRACE_PLT_IDX]; +#else return NULL; +#endif } static bool reachable_by_bl(unsigned long addr, unsigned long pc) @@ -270,7 +270,7 @@ static bool ftrace_find_callable_addr(struct dyn_ftrace *rec, if (WARN_ON(!mod)) return false; - plt = get_ftrace_plt(mod, *addr); + plt = get_ftrace_plt(mod); if (!plt) { pr_err("ftrace: no module PLT for %ps\n", (void *)*addr); return false;