Merge git://git.infradead.org/users/eparis/audit
[firefly-linux-kernel-4.4.55.git] / include / linux / ftrace.h
index f0b0edbf55a94e4e4594ca65270e80bacd2e8f61..662697babd4800f760d61c4ee7b4b8e6bebffb0f 100644 (file)
@@ -56,6 +56,8 @@ struct ftrace_ops;
 typedef void (*ftrace_func_t)(unsigned long ip, unsigned long parent_ip,
                              struct ftrace_ops *op, struct pt_regs *regs);
 
+ftrace_func_t ftrace_ops_get_func(struct ftrace_ops *ops);
+
 /*
  * FTRACE_OPS_FL_* bits denote the state of ftrace_ops struct and are
  * set in the flags member.
@@ -89,6 +91,9 @@ typedef void (*ftrace_func_t)(unsigned long ip, unsigned long parent_ip,
  * INITIALIZED - The ftrace_ops has already been initialized (first use time
  *            register_ftrace_function() is called, it will initialized the ops)
  * DELETED - The ops are being deleted, do not let them be registered again.
+ * ADDING  - The ops is in the process of being added.
+ * REMOVING - The ops is in the process of being removed.
+ * MODIFYING - The ops is in the process of changing its filter functions.
  */
 enum {
        FTRACE_OPS_FL_ENABLED                   = 1 << 0,
@@ -100,6 +105,9 @@ enum {
        FTRACE_OPS_FL_STUB                      = 1 << 6,
        FTRACE_OPS_FL_INITIALIZED               = 1 << 7,
        FTRACE_OPS_FL_DELETED                   = 1 << 8,
+       FTRACE_OPS_FL_ADDING                    = 1 << 9,
+       FTRACE_OPS_FL_REMOVING                  = 1 << 10,
+       FTRACE_OPS_FL_MODIFYING                 = 1 << 11,
 };
 
 #ifdef CONFIG_DYNAMIC_FTRACE
@@ -132,7 +140,7 @@ struct ftrace_ops {
        int                             nr_trampolines;
        struct ftrace_ops_hash          local_hash;
        struct ftrace_ops_hash          *func_hash;
-       struct ftrace_hash              *tramp_hash;
+       struct ftrace_ops_hash          old_hash;
        unsigned long                   trampoline;
 #endif
 };