* [PATCH] arm64: ftrace: fix ifdeffery
@ 2019-12-06 13:01 Mark Rutland
2019-12-06 13:29 ` Catalin Marinas
0 siblings, 1 reply; 2+ messages in thread
From: Mark Rutland @ 2019-12-06 13:01 UTC (permalink / raw)
To: linux-arm-kernel, catalin.marinas, will
Cc: Mark Rutland, Amit Daniel Kachhap, Torsten Duwe, Ard Biesheuvel
When I tweaked the ftrace entry assembly in commit:
3b23e4991fb66f6d ("arm64: implement ftrace with regs")
... my ifdeffery tweaks left ftrace_graph_caller undefined for
CONFIG_DYNAMIC_FTRACE && CONFIG_FUNCTION_GRAPH_TRACER when ftrace is
based on mcount.
The kbuild test robot reported that this issue is detected at link time:
| arch/arm64/kernel/entry-ftrace.o: In function `skip_ftrace_call':
| arch/arm64/kernel/entry-ftrace.S:238: undefined reference to `ftrace_graph_caller'
| arch/arm64/kernel/entry-ftrace.S:238:(.text+0x3c): relocation truncated to fit: R_AARCH64_CONDBR19 against undefined symbol
| `ftrace_graph_caller'
| arch/arm64/kernel/entry-ftrace.S:243: undefined reference to `ftrace_graph_caller'
| arch/arm64/kernel/entry-ftrace.S:243:(.text+0x54): relocation truncated to fit: R_AARCH64_CONDBR19 against undefined symbol
| `ftrace_graph_caller'
This patch fixes the ifdeffery so that the mcount version of
ftrace_graph_caller doesn't depend on CONFIG_DYNAMIC_FTRACE. At the same
time, a redundant #else is removed from the ifdeffery for the
patchable-function-entry version of ftrace_graph_caller.
Fixes: 3b23e4991fb66f6d ("arm64: implement ftrace with regs")
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Amit Daniel Kachhap <amit.kachhap@arm.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Torsten Duwe <duwe@lst.de>
Cc: Will Deacon <will@kernel.org>
---
arch/arm64/kernel/entry-ftrace.S | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/arm64/kernel/entry-ftrace.S b/arch/arm64/kernel/entry-ftrace.S
index 4fe1514fcbfd..7d02f9966d34 100644
--- a/arch/arm64/kernel/entry-ftrace.S
+++ b/arch/arm64/kernel/entry-ftrace.S
@@ -133,7 +133,6 @@ ENTRY(ftrace_graph_caller)
bl prepare_ftrace_return
b ftrace_common_return
ENDPROC(ftrace_graph_caller)
-#else
#endif
#else /* CONFIG_DYNAMIC_FTRACE_WITH_REGS */
@@ -287,6 +286,7 @@ GLOBAL(ftrace_graph_call) // ftrace_graph_caller();
mcount_exit
ENDPROC(ftrace_caller)
+#endif /* CONFIG_DYNAMIC_FTRACE */
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
/*
@@ -307,7 +307,6 @@ ENTRY(ftrace_graph_caller)
mcount_exit
ENDPROC(ftrace_graph_caller)
#endif /* CONFIG_FUNCTION_GRAPH_TRACER */
-#endif /* CONFIG_DYNAMIC_FTRACE */
#endif /* CONFIG_DYNAMIC_FTRACE_WITH_REGS */
ENTRY(ftrace_stub)
--
2.11.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] arm64: ftrace: fix ifdeffery
2019-12-06 13:01 [PATCH] arm64: ftrace: fix ifdeffery Mark Rutland
@ 2019-12-06 13:29 ` Catalin Marinas
0 siblings, 0 replies; 2+ messages in thread
From: Catalin Marinas @ 2019-12-06 13:29 UTC (permalink / raw)
To: Mark Rutland
Cc: Amit Daniel Kachhap, Torsten Duwe, will, linux-arm-kernel,
Ard Biesheuvel
On Fri, Dec 06, 2019 at 01:01:29PM +0000, Mark Rutland wrote:
> When I tweaked the ftrace entry assembly in commit:
>
> 3b23e4991fb66f6d ("arm64: implement ftrace with regs")
>
> ... my ifdeffery tweaks left ftrace_graph_caller undefined for
> CONFIG_DYNAMIC_FTRACE && CONFIG_FUNCTION_GRAPH_TRACER when ftrace is
> based on mcount.
>
> The kbuild test robot reported that this issue is detected at link time:
>
> | arch/arm64/kernel/entry-ftrace.o: In function `skip_ftrace_call':
> | arch/arm64/kernel/entry-ftrace.S:238: undefined reference to `ftrace_graph_caller'
> | arch/arm64/kernel/entry-ftrace.S:238:(.text+0x3c): relocation truncated to fit: R_AARCH64_CONDBR19 against undefined symbol
> | `ftrace_graph_caller'
> | arch/arm64/kernel/entry-ftrace.S:243: undefined reference to `ftrace_graph_caller'
> | arch/arm64/kernel/entry-ftrace.S:243:(.text+0x54): relocation truncated to fit: R_AARCH64_CONDBR19 against undefined symbol
> | `ftrace_graph_caller'
>
> This patch fixes the ifdeffery so that the mcount version of
> ftrace_graph_caller doesn't depend on CONFIG_DYNAMIC_FTRACE. At the same
> time, a redundant #else is removed from the ifdeffery for the
> patchable-function-entry version of ftrace_graph_caller.
>
> Fixes: 3b23e4991fb66f6d ("arm64: implement ftrace with regs")
> Reported-by: kbuild test robot <lkp@intel.com>
> Signed-off-by: Mark Rutland <mark.rutland@arm.com>
> Cc: Amit Daniel Kachhap <amit.kachhap@arm.com>
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: Torsten Duwe <duwe@lst.de>
> Cc: Will Deacon <will@kernel.org>
Queued for 5.5-rc1. Thanks.
--
Catalin
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-12-06 13:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-06 13:01 [PATCH] arm64: ftrace: fix ifdeffery Mark Rutland
2019-12-06 13:29 ` Catalin Marinas
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.