admin管理员组文章数量:1391968
I found that when using bpf_program__attach_uprobe_opts, it can only set one PID. Unless set to -1, it indicates all processes. Is there a way to set multiple PIDs? Or can it only be achieved through map.
I found that when using bpf_program__attach_uprobe_opts, it can only set one PID. Unless set to -1, it indicates all processes. Is there a way to set multiple PIDs? Or can it only be achieved through map.
Share Improve this question asked Mar 17 at 8:31 SunjalSunjal 175 bronze badges1 Answer
Reset to default 1Indeed you cannot attach to multiple PIDs, you would have to add some logic in your eBPF program and exit early if you detect you are running for a unwanted PID.
It works that way because perf events work that way, see arguments to perf_event_open
.
本文标签: linuxCan only one specific PID be specified for bpfprogramattachuprobeoptsStack Overflow
版权声明:本文标题:linux - Can only one specific PID be specified for bpf_program__attach_uprobe_opts? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744572917a2613447.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论