File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -394,7 +394,7 @@ enum ftrace_ops_cmd {
394394 * Negative on failure. The return value is dependent on the
395395 * callback.
396396 */
397- typedef int (* ftrace_ops_func_t )(struct ftrace_ops * op , enum ftrace_ops_cmd cmd );
397+ typedef int (* ftrace_ops_func_t )(struct ftrace_ops * op , unsigned long ip , enum ftrace_ops_cmd cmd );
398398
399399#ifdef CONFIG_DYNAMIC_FTRACE
400400
Original file line number Diff line number Diff line change @@ -33,7 +33,8 @@ static DEFINE_MUTEX(trampoline_mutex);
3333#ifdef CONFIG_DYNAMIC_FTRACE_WITH_DIRECT_CALLS
3434static int bpf_trampoline_update (struct bpf_trampoline * tr , bool lock_direct_mutex );
3535
36- static int bpf_tramp_ftrace_ops_func (struct ftrace_ops * ops , enum ftrace_ops_cmd cmd )
36+ static int bpf_tramp_ftrace_ops_func (struct ftrace_ops * ops , unsigned long ip ,
37+ enum ftrace_ops_cmd cmd )
3738{
3839 struct bpf_trampoline * tr = ops -> private ;
3940 int ret = 0 ;
Original file line number Diff line number Diff line change @@ -2036,7 +2036,7 @@ static int __ftrace_hash_update_ipmodify(struct ftrace_ops *ops,
20362036 */
20372037 if (!ops -> ops_func )
20382038 return - EBUSY ;
2039- ret = ops -> ops_func (ops , FTRACE_OPS_CMD_ENABLE_SHARE_IPMODIFY_SELF );
2039+ ret = ops -> ops_func (ops , rec -> ip , FTRACE_OPS_CMD_ENABLE_SHARE_IPMODIFY_SELF );
20402040 if (ret )
20412041 return ret ;
20422042 } else if (is_ipmodify ) {
@@ -8740,7 +8740,7 @@ static int prepare_direct_functions_for_ipmodify(struct ftrace_ops *ops)
87408740 if (!op -> ops_func )
87418741 return - EBUSY ;
87428742
8743- ret = op -> ops_func (op , FTRACE_OPS_CMD_ENABLE_SHARE_IPMODIFY_PEER );
8743+ ret = op -> ops_func (op , ip , FTRACE_OPS_CMD_ENABLE_SHARE_IPMODIFY_PEER );
87448744 if (ret )
87458745 return ret ;
87468746 }
@@ -8787,7 +8787,7 @@ static void cleanup_direct_functions_after_ipmodify(struct ftrace_ops *ops)
87878787
87888788 /* The cleanup is optional, ignore any errors */
87898789 if (found_op && op -> ops_func )
8790- op -> ops_func (op , FTRACE_OPS_CMD_DISABLE_SHARE_IPMODIFY_PEER );
8790+ op -> ops_func (op , ip , FTRACE_OPS_CMD_DISABLE_SHARE_IPMODIFY_PEER );
87918791 }
87928792 }
87938793 mutex_unlock (& direct_mutex );
You can’t perform that action at this time.
0 commit comments