iovisor / iovisor/bcc

CGROUP_SOCK_ADDR support?

Open
#3,702 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
22.7k
Forks
4.1k
Avg merge
10d 4h
Merged PRs (30d)
3

Description

First of all, thanks a lot for `bcc`. It its an awesome tool to easily experiment with `eBPF`!

I recently needed to load an `CGROUP_SOCK_ADDR` program from Python. It turns out that it not currently possible as the `expected_attach_type` member of the `bpf_load_program_attr` structure must be filled before calling `bcc_prog_load_xattr()`. I successfully modified `BPFModule::bcc_func_load()` and I am no able to load `CGROUP_SOCK_ADDR` programs.

I am willing to provide a patch, but I need advice to do it. Shall I modify `BPFModule::bcc_func_load()` to accept an `expected_attach_type` argument (i.e. that will break the current API), or shall I add `BPFModule::bcc_func_load_xattr()` that will get a pointer to a `bpf_load_program_attr` structure (i.e. that will be more generic and future proof)?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.