• Steven Rostedt (Red Hat)'s avatar
    ftrace: Add new type to distinguish what kind of ftrace_bug() · 02a392a0
    Steven Rostedt (Red Hat) authored
    The ftrace function hook utility has several internal checks to make sure
    that whatever it modifies is exactly what it expects to be modifying. This
    is essential as modifying running code can be extremely dangerous to the
    system.
    
    When an anomaly is detected, ftrace_bug() is called which sends a splat to
    the console and disables function tracing. There's some extra information
    that is printed to help diagnose the issue.
    
    One thing that is missing though is output of what ftrace was doing at the
    time of the crash. Was it updating a call site or perhaps converting a call
    site to a nop? A new global enum variable is created to state what ftrace
    was doing at the time of the anomaly, and this is reported in ftrace_bug().
    Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
    02a392a0
ftrace.c 138 KB