Re: [PATCH] x86/ftrace: Mark ftrace_modify_code_direct() __ref
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- Subject: Re: [PATCH] x86/ftrace: Mark ftrace_modify_code_direct() __ref
- From: Steven Rostedt <rostedt@xxxxxxxxxxx>
- Date: Mon, 18 Nov 2019 12:52:46 -0500
- Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>, linux-tip-commits@xxxxxxxxxxxxxxx, Alexei Starovoitov <ast@xxxxxxxxxx>, Andy Lutomirski <luto@xxxxxxxxxx>, Daniel Bristot de Oliveira <bristot@xxxxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx>, Josh Poimboeuf <jpoimboe@xxxxxxxxxx>, Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx
- In-reply-to: <20191118173510.GK6363@zn.tnic>
- References: <20191111132457.761255803@infradead.org> <157381099055.29467.10982011694493970062.tip-bot2@tip-bot2> <20191116204607.GC23231@zn.tnic> <20191118173510.GK6363@zn.tnic>
On Mon, 18 Nov 2019 18:35:10 +0100
Borislav Petkov <bp@xxxxxxxxx> wrote:
> diff --git a/arch/x86/kernel/ftrace.c b/arch/x86/kernel/ftrace.c
> index 2a179fb35cd1..108ee96f8b66 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
Acked-by: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx>
-- Steve
> ftrace_modify_code_direct(unsigned long ip, const char *old_code,
> const char *new_code)
> {
[Index of Archives]
[Linux Stable Commits]
[Linux Stable Kernel]
[Linux Kernel]
[Linux USB Devel]
[Linux Video &Media]
[Linux Audio Users]
[Yosemite News]
[Linux SCSI]