lkml.org 
[lkml]   [2009]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 5/5] ftrace, x86: do not depend on system state for kernel text info

* Steven Rostedt <rostedt@goodmis.org> wrote:

> From: Steven Rostedt <srostedt@redhat.com>
>
> Andrew Morton pointed out that using SYSTEM_STATE is a bad idea
> since there is no guarantee to what its state will actually be.
>
> Instead, I moved the check into the set_kernel_text_* functions
> themselves, and use a local variable to determine when it is
> OK to change the kernel text RW permissions.
>
> Reported-by: Andrew Morton <akpm@linux-foundation.org>
> Signed-off-by: Steven Rostedt <srostedt@redhat.com>
> ---
> arch/x86/kernel/ftrace.c | 8 --------
> arch/x86/mm/init_32.c | 10 ++++++++++
> arch/x86/mm/init_64.c | 10 ++++++++++
> 3 files changed, 20 insertions(+), 8 deletions(-)
>
> diff --git a/arch/x86/kernel/ftrace.c b/arch/x86/kernel/ftrace.c
> index c9ba2f9..025d783 100644
> --- a/arch/x86/kernel/ftrace.c
> +++ b/arch/x86/kernel/ftrace.c
> @@ -28,20 +28,12 @@
>
> int ftrace_arch_modify_prepare(void)
> {
> - /* at boot up, we are still writable */
> - if (system_state != SYSTEM_RUNNING)
> - return 0;
> -

Since i suspect you'll rebase anyway, i'd suggest to squash this
patch into patch #2, with credit to Andrew added.

Ingo


\
 
 \ /
  Last update: 2009-02-20 18:41    [W:0.112 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site