• Steven Rostedt's avatar
    tracing: Warn if a tracepoint is not set via debugfs · b196e2b9
    Steven Rostedt authored
    Tracepoints were made to allow enabling a tracepoint in a module before that
    module was loaded. When a tracepoint is enabled and it does not exist, the
    name is stored and will be enabled when the tracepoint is created.
    
    The problem with this approach is that when a tracepoint is enabled when
    it expects to be there, it gives no warning that it does not exist.
    
    To add salt to the wound, if a module is added and sets the FORCED flag, which
    can happen if it isn't signed properly, the tracepoint code will not enabled
    the tracepoints, but they will be created in the debugfs system! When a user
    goes to enable the tracepoint, the tracepoint code will not see it existing
    and will think it is to be enabled later AND WILL NOT GIVE A WARNING.
    
    The tracing will look like it succeeded but will actually be doing nothing.
    This will cause lots of confusion and headaches for developers trying to
    figure out why they are not seeing their tracepoints.
    
    Link: http://lkml.kernel.org/r/20140213154507.4040fb06@gandalf.local.homeReported-by: default avatarMathieu Desnoyers <mathieu.desnoyers@efficios.com>
    Reported-by: default avatarJohannes Berg <johannes.berg@intel.com>
    Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
    b196e2b9
tracepoint.c 20.1 KB