Skip to content
Snippets Groups Projects
Select Git revision
1 result Searching

trace_stack.c

Blame
    • Steven Rostedt's avatar
      4740974a
      ftrace: Add default recursion protection for function tracing · 4740974a
      Steven Rostedt authored
      
      As more users of the function tracer utility are being added, they do
      not always add the necessary recursion protection. To protect from
      function recursion due to tracing, if the callback ftrace_ops does not
      specifically specify that it protects against recursion (by setting
      the FTRACE_OPS_FL_RECURSION_SAFE flag), the list operation will be
      called by the mcount trampoline which adds recursion protection.
      
      If the flag is set, then the function will be called directly with no
      extra protection.
      
      Note, the list operation is called if more than one function callback
      is registered, or if the arch does not support all of the function
      tracer features.
      
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      4740974a
      History
      ftrace: Add default recursion protection for function tracing
      Steven Rostedt authored
      
      As more users of the function tracer utility are being added, they do
      not always add the necessary recursion protection. To protect from
      function recursion due to tracing, if the callback ftrace_ops does not
      specifically specify that it protects against recursion (by setting
      the FTRACE_OPS_FL_RECURSION_SAFE flag), the list operation will be
      called by the mcount trampoline which adds recursion protection.
      
      If the flag is set, then the function will be called directly with no
      extra protection.
      
      Note, the list operation is called if more than one function callback
      is registered, or if the arch does not support all of the function
      tracer features.
      
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
    device.c 28.75 KiB