Hello Florian,
On 22/09/2021 04:39, Florian Fainelli wrote:
From: Alex Sverdlin <redacted>
commit 79f32b221b18c15a98507b101ef4beb52444cc6f upstream
Teach ftrace_make_call() and ftrace_make_nop() about PLTs.
Teach PLT code about FTRACE and all its callbacks.
sorry for inconvenience, but I'd propose to add 6fa630bf473827ae
"ARM: 9098/1: ftrace: MODULE_PLT: Fix build problem without DYNAMIC_FTRACE"
to all series on this topic, because of the below chunk which might
lead to build issues on some exotic configurations.
Link: https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org/thread/ZUVCQBHDMFVR7CCB7JPESLJEWERZDJ3T/
quoted hunk ↗ jump to hunk
--- a/arch/arm/kernel/module-plts.c
+++ b/arch/arm/kernel/module-plts.c
@@ -20,19 +21,52 @@
(PLT_ENT_STRIDE - 8))
#endif
+static const u32 fixed_plts[] = {
+#ifdef CONFIG_FUNCTION_TRACER
+ FTRACE_ADDR,
+ MCOUNT_ADDR,
+#endif
+};
+
static bool in_init(const struct module *mod, unsigned long loc)
{
return loc - (u32)mod->init_layout.base < mod->init_layout.size;
--
Best regards,
Alexander Sverdlin.