Add missed value to kprobe_multi link info to hold the stats of missed kprobe_multi probe. The missed counter gets incremented when fprobe fails the recursion check or there's no rethook available for return probe. In either case the attached bpf program is not executed.
Unified · Split
| @@ -6532,6 +6532,7 @@ struct bpf_link_info { · 6531 unmodified lines | |||
| 6532 | __aligned_u64 addrs; | 6532 | __aligned_u64 addrs; |
| 6533 | __u32 count; /* in/out: kprobe_multi function count */ | 6533 | __u32 count; /* in/out: kprobe_multi function count */ |
| 6534 | __u32 flags; | 6534 | __u32 flags; |
| 6535 | __u64 missed; | ||
| 6535 | } kprobe_multi; | 6536 | } kprobe_multi; |
| 6536 | struct { | 6537 | struct { |
| 6537 | __u32 type; /* enum bpf_perf_event_type */ | 6538 | __u32 type; /* enum bpf_perf_event_type */ |
| @@ -2614,6 +2614,7 @@ static int bpf_kprobe_multi_link_fill_link_info(const struct bpf_link *link, · 2613 unmodified lines | |||
| 2614 | kmulti_link = container_of(link, struct bpf_kprobe_multi_link, link); | 2614 | kmulti_link = container_of(link, struct bpf_kprobe_multi_link, link); |
| 2615 | info->kprobe_multi.count = kmulti_link->cnt; | 2615 | info->kprobe_multi.count = kmulti_link->cnt; |
| 2616 | info->kprobe_multi.flags = kmulti_link->flags; | 2616 | info->kprobe_multi.flags = kmulti_link->flags; |
| 2617 | info->kprobe_multi.missed = kmulti_link->fp.nmissed; | ||
| 2617 | 2618 | ||
| 2618 | if (!uaddrs) | 2619 | if (!uaddrs) |
| 2619 | return 0; | 2620 | return 0; |
| @@ -6532,6 +6532,7 @@ struct bpf_link_info { · 6531 unmodified lines | |||
| 6532 | __aligned_u64 addrs; | 6532 | __aligned_u64 addrs; |
| 6533 | __u32 count; /* in/out: kprobe_multi function count */ | 6533 | __u32 count; /* in/out: kprobe_multi function count */ |
| 6534 | __u32 flags; | 6534 | __u32 flags; |
| 6535 | __u64 missed; | ||
| 6535 | } kprobe_multi; | 6536 | } kprobe_multi; |
| 6536 | struct { | 6537 | struct { |
| 6537 | __u32 type; /* enum bpf_perf_event_type */ | 6538 | __u32 type; /* enum bpf_perf_event_type */ |