linux-next: build failure after merge of the tip tree

From: Stephen Rothwell
Date: Fri May 15 2020 - 02:02:06 EST


Hi all,

After merging the tip tree, today's linux-next build (x86_64 allmodconfig)
failed like this:

arch/x86/kernel/ftrace.c: In function 'set_ftrace_ops_ro':
arch/x86/kernel/ftrace.c:444:32: error: 'ftrace_epilogue' undeclared (first use in this function)
444 | end_offset = (unsigned long)ftrace_epilogue;
| ^~~~~~~~~~~~~~~

Caused by commit

0298739b7983 ("x86,ftrace: Fix ftrace_regs_caller() unwind")

from the tip tree ineracting with commit

59566b0b622e ("x86/ftrace: Have ftrace trampolines turn read-only at the end of system boot up")

from Linus' tree.

I applied the following merge fix patch (I don't know if this is
correct, but it seemed reasonable):

From: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
Date: Fri, 15 May 2020 15:51:17 +1000
Subject: [PATCH] fixup for "x86/ftrace: Have ftrace trampolines turn read-only
at the end of system boot up"

Signed-off-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
---
arch/x86/kernel/ftrace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/ftrace.c b/arch/x86/kernel/ftrace.c
index f8917a6f25b7..c84d28e90a58 100644
--- a/arch/x86/kernel/ftrace.c
+++ b/arch/x86/kernel/ftrace.c
@@ -441,7 +441,7 @@ void set_ftrace_ops_ro(void)
end_offset = (unsigned long)ftrace_regs_caller_end;
} else {
start_offset = (unsigned long)ftrace_caller;
- end_offset = (unsigned long)ftrace_epilogue;
+ end_offset = (unsigned long)ftrace_caller_end;
}
size = end_offset - start_offset;
size = size + RET_SIZE + sizeof(void *);
--
2.26.2

--
Cheers,
Stephen Rothwell

Attachment: pgpKRV1woiF4M.pgp
Description: OpenPGP digital signature