It serves no purpose beyond adding unnecessray argument passed to the filter callback. Just get rid of it, no one is actually using it.
Showing the changes to kernel/trace (2 of 4 files). Show all
Unified · Split
| @@ -3320,8 +3320,7 @@ static int uprobe_prog_run(struct bpf_uprobe *uprobe, · 3319 unmodified lines | ||
| 3320 | 3320 | } |
| 3321 | 3321 | |
| 3322 | 3322 | static bool |
| 3323 | −uprobe_multi_link_filter(struct uprobe_consumer *con, enum uprobe_filter_ctx ctx, | |
| 3324 | − struct mm_struct *mm) | |
| 3323 | +uprobe_multi_link_filter(struct uprobe_consumer *con, struct mm_struct *mm) | |
| 3325 | 3324 | { |
| 3326 | 3325 | struct bpf_uprobe *uprobe; |
| 3327 | 3326 | |
| @@ -1078,9 +1078,7 @@ print_uprobe_event(struct trace_iterator *iter, int flags, struct trace_event *e · 1077 unmodified lines | ||
| 1078 | 1078 | return trace_handle_return(s); |
| 1079 | 1079 | } |
| 1080 | 1080 | |
| 1081 | −typedef bool (*filter_func_t)(struct uprobe_consumer *self, | |
| 1082 | − enum uprobe_filter_ctx ctx, | |
| 1083 | − struct mm_struct *mm); | |
| 1081 | +typedef bool (*filter_func_t)(struct uprobe_consumer *self, struct mm_struct *mm); | |
| 1084 | 1082 | |
| 1085 | 1083 | static int trace_uprobe_enable(struct trace_uprobe *tu, filter_func_t filter) |
| 1086 | 1084 | { |
| @@ -1339,8 +1337,7 @@ static int uprobe_perf_open(struct trace_event_call *call, · 252 unmodified lines | ||
| 1339 | 1337 | return err; |
| 1340 | 1338 | } |
| 1341 | 1339 | |
| 1342 | −static bool uprobe_perf_filter(struct uprobe_consumer *uc, | |
| 1343 | − enum uprobe_filter_ctx ctx, struct mm_struct *mm) | |
| 1340 | +static bool uprobe_perf_filter(struct uprobe_consumer *uc, struct mm_struct *mm) | |
| 1344 | 1341 | { |
| 1345 | 1342 | struct trace_uprobe_filter *filter; |
| 1346 | 1343 | struct trace_uprobe *tu; |
| @@ -1426,7 +1423,7 @@ static void __uprobe_perf_func(struct trace_uprobe *tu, · 79 unmodified lines | ||
| 1426 | 1423 | static int uprobe_perf_func(struct trace_uprobe *tu, struct pt_regs *regs, |
| 1427 | 1424 | struct uprobe_cpu_buffer **ucbp) |
| 1428 | 1425 | { |
| 1429 | − if (!uprobe_perf_filter(&tu->consumer, 0, current->mm)) | |
| 1426 | + if (!uprobe_perf_filter(&tu->consumer, current->mm)) | |
| 1430 | 1427 | return UPROBE_HANDLER_REMOVE; |
| 1431 | 1428 | |
| 1432 | 1429 | if (!is_ret_probe(tu)) |