[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <157544841616.21853.11033937966281103251.tip-bot2@tip-bot2>
Date: Wed, 04 Dec 2019 08:33:36 -0000
From: "tip-bot2 for Borislav Petkov" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Peter Zijlstra <peterz@...radead.org>,
Borislav Petkov <bp@...e.de>,
"Steven Rostedt (VMware)" <rostedt@...dmis.org>,
Alexei Starovoitov <ast@...nel.org>,
Andy Lutomirski <luto@...nel.org>,
Daniel Bristot de Oliveira <bristot@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...nel.org>,
Josh Poimboeuf <jpoimboe@...hat.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Thomas Gleixner <tglx@...utronix.de>, x86 <x86@...nel.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: [tip: core/kprobes] x86/ftrace: Mark ftrace_modify_code_direct() __ref
The following commit has been merged into the core/kprobes branch of tip:
Commit-ID: 38ebd8d119245eecb99fe00b0f57e269baf22767
Gitweb: https://git.kernel.org/tip/38ebd8d119245eecb99fe00b0f57e269baf22767
Author: Borislav Petkov <bp@...e.de>
AuthorDate: Mon, 18 Nov 2019 18:20:12 +01:00
Committer: Ingo Molnar <mingo@...nel.org>
CommitterDate: Wed, 27 Nov 2019 07:44:24 +01:00
x86/ftrace: Mark ftrace_modify_code_direct() __ref
... because it calls the .init.text function text_poke_early(). That is
ok because it does call that function early, during boot.
Fixes: 9706f7c3531f ("x86/ftrace: Use text_poke()")
Suggested-by: Peter Zijlstra <peterz@...radead.org>
Signed-off-by: Borislav Petkov <bp@...e.de>
Acked-by: Steven Rostedt (VMware) <rostedt@...dmis.org>
Cc: Alexei Starovoitov <ast@...nel.org>
Cc: Andy Lutomirski <luto@...nel.org>
Cc: Daniel Bristot de Oliveira <bristot@...hat.com>
Cc: H. Peter Anvin <hpa@...or.com>
Cc: Ingo Molnar <mingo@...nel.org>
Cc: Josh Poimboeuf <jpoimboe@...hat.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Link: https://lkml.kernel.org/r/20191116204607.GC23231@zn.tnic
---
arch/x86/kernel/ftrace.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/arch/x86/kernel/ftrace.c b/arch/x86/kernel/ftrace.c
index 2a179fb..108ee96 100644
--- a/arch/x86/kernel/ftrace.c
+++ b/arch/x86/kernel/ftrace.c
@@ -99,7 +99,12 @@ static int ftrace_verify_code(unsigned long ip, const char *old_code)
return 0;
}
-static int
+/*
+ * Marked __ref because it calls text_poke_early() which is .init.text. That is
+ * ok because that call will happen early, during boot, when .init sections are
+ * still present.
+ */
+static int __ref
ftrace_modify_code_direct(unsigned long ip, const char *old_code,
const char *new_code)
{
Powered by blists - more mailing lists