Re: [PATCH bpf-next v2 15/18] libbpf: add skip_invalid and attach_tracing for tracing_multi

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday, July 16, 2025 1:23 AM Andrii Nakryiko <andrii.nakryiko@xxxxxxxxx> write:
[......]
> 
> The right answer here is you need to know what's attachable and what's
> not, instead of just ignoring attachment failures somewhere deep
> inside libbpf API. Filter and check before you try to attach. There is
> /sys/kernel/tracing/available_filter_functions and some similar
> blacklist file, consult that, filter out stuff that's not attachable.
> 
> We won't be adding libbpf APIs just to make some selftests easier to
> write by being sloppy.
> 
> >
> > This should be a common use case. And let me do more research to see if
> > we can do such filter out of the libbpf.
> 
> I have similar issues with retsnoop ([0]) and do just fine without
> abusing libbpf API.
> 
>   [0] https://github.com/anakryiko/retsnoop/blob/master/src/mass_attacher.c#L749

Thank you for the reference, and I think it will work to do such
filtering in the selftests.








[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux