Re: Question about -rc and stable patches

From: Steven Rostedt
Date: Mon Mar 03 2014 - 17:49:47 EST


On Mon, 3 Mar 2014 17:45:32 -0500
Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:


> diff --git a/arch/x86/kernel/ftrace.c b/arch/x86/kernel/ftrace.c
> index 8cabf63..9f354e5 100644
> --- a/arch/x86/kernel/ftrace.c
> +++ b/arch/x86/kernel/ftrace.c
> @@ -586,6 +586,9 @@ void ftrace_replace_code(int enable)
> for_ftrace_rec_iter(iter) {
> rec = ftrace_rec_iter_record(iter);
>
> + if (count == 1000)
> + ret = -EPERM;
> + else
> ret = add_breakpoints(rec, enable);
> if (ret)
> goto remove_breakpoints;
>
>
> Not something that can be done from normal operations.
>

I'll also add that one reason that this hasn't been an issue before, is
that the code that converts calls to mcount to nops, is done at kernel
boot up. If the above code were to fail, it is highly likely that the
code that converted mcount to nops would fail too. And if that happens,
it completely disables function tracing, preventing this code from
running.

The code that converts mcount to nops, handles the above error properly.

-- Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/