[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190628011725.rctv3chdlqwkfwcx@treble>
Date: Thu, 27 Jun 2019 20:17:25 -0500
From: Josh Poimboeuf <jpoimboe@...hat.com>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: Thomas Gleixner <tglx@...utronix.de>,
Petr Mladek <pmladek@...e.com>,
Miroslav Benes <mbenes@...e.cz>, Jessica Yu <jeyu@...nel.org>,
Jiri Kosina <jikos@...nel.org>,
Joe Lawrence <joe.lawrence@...hat.com>,
linux-kernel@...r.kernel.org, live-patching@...r.kernel.org,
Johannes Erdfelt <johannes@...felt.com>,
Ingo Molnar <mingo@...nel.org>, mhiramat@...nel.org,
torvalds@...ux-foundation.org
Subject: Re: [PATCH] ftrace: Remove possible deadlock between
register_kprobe() and ftrace_run_update_code()
On Thu, Jun 27, 2019 at 09:13:04PM -0400, Steven Rostedt wrote:
> On Thu, 27 Jun 2019 18:19:52 -0500
> Josh Poimboeuf <jpoimboe@...hat.com> wrote:
>
>
> > Maybe a comment or two would help though.
> >
>
> I'm adding the following change. Care to add a "reviewed-by" for this
> one?
>
> -- Steve
>
> diff --git a/arch/x86/kernel/ftrace.c b/arch/x86/kernel/ftrace.c
> index 33786044d5ac..d7e93b2783fd 100644
> --- a/arch/x86/kernel/ftrace.c
> +++ b/arch/x86/kernel/ftrace.c
> @@ -36,6 +36,11 @@
>
> int ftrace_arch_code_modify_prepare(void)
> {
> + /*
> + * Need to grab text_mutex to prevent a race from module loading
> + * and live kernel patching from changing the text permissions while
> + * ftrace has it set to "read/write".
> + */
> mutex_lock(&text_mutex);
> set_kernel_text_rw();
> set_all_modules_text_rw();
For the patch+comment:
Reviewed-by: Josh Poimboeuf <jpoimboe@...hat.com>
--
Josh
Powered by blists - more mailing lists