Re: [PATCH v2] ftrace: warn on failure to disable mcount callers

From: Ingo Molnar
Date: Fri Aug 22 2008 - 02:47:05 EST



* Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:

> + WARN_ON_ONCE(1);
> + pr_info("ftrace faulted on modifying ");
> + print_ip_sym(ip);
> + break;
> + case 2:
> + WARN_ON_ONCE(1);
> + pr_info("ftrace failed to modify ");
> + print_ip_sym(ip);
> + print_ip_ins(" expected: ", call);
> + print_ip_ins(" actual: ", (unsigned char *)ip);
> + print_ip_ins(" replace: ", nop);
> + printk(KERN_CONT "\n");
> + break;

hm, i think it makes little sense to only print out the stacktrace once,
but to print out the rest all the time.

If there's such a failure then ftrace should warn once, with stacktrace
and everthing else, and turn itself off permanently. That makes it sure
that we 1) get the report 2) dont spam the user 3) keep the system
working 4) turn off the malfunctioning component.

Ingo
--
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/