Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[bcc] fix for new bpf_attach_kprobe signature
bcc changed the signature of bpf_attach_kprobe to accept a new argument: `maxactive`, which determines the maximum limit of how many calls in parallel a kretprobe attached to a kernel function can catch. The new signature is not backwards compatible, thus our build broke. Since there's no way to feature detect the existance of an argument in a function using cmake, we use a function pointer with the long signature and cast bpf_attach_kprobe to it. If we're on an older bcc version, the last argument will be allocated in a register (according to the platform's calling convention), but should be ignored inside the function. Ref: torvalds/linux@696ced4 Ref: iovisor/bcc#2224 Fixes: #453
- Loading branch information