Commit Graph

142 Commits (0a9d02140acdaa35c5f5c7e17ea08a6823922e20)

Author SHA1 Message Date
Alessandro Decina 0a9d02140a aya: netlink: fix alignment when writing attributes 4 years ago
Alessandro Decina abb199e6f4 aya: netlink: fix handling of multipart messages 4 years ago
Alessandro Decina 9185f32f6f aya: tc: clean up netlink code a bit 4 years ago
Simone Margaritelli b4b019e447
fix: pass BTF object by reference in order to allow multiple eBPF programs to share it and save memory (closes #30). (#31) 4 years ago
Alessandro Decina d996a88de4 aya: fix formatting 4 years ago
Alessandro Decina 0878c4505a aya: fix clippy warnings 4 years ago
Alessandro Decina 21e01df242 aya: obj: improve parse_map_def tests
Add a test that checks that we handle ELF section padding correctly and
simplify the other tests.
4 years ago
Alessandro Decina b657930a3e aya: don't error out parsing padded map sections
Fixes #28
4 years ago
Simone Margaritelli 8311abfdcb
added support for armv7-unknown-linux-gnueabi and armv7-unknown-linux-gnueabihf
* new: added support for armv7-unknown-linux-gnueabi (closes alessandrod/aya/issues/22)

* fix: replaced custom type defintions with proper libc types

* fix: fixed pointless parameter binding

* new: added linker for armv7-unknown-linux-gnueabihf to cargo config
4 years ago
Alessandro Decina 9c8e78b7d4 aya: tc: make qdisc_add_clsact return io::Error 4 years ago
Alessandro Decina 122a5306e7 aya, aya-bpf-bindings: regenerate bindings 4 years ago
Alessandro Decina 08c71dfeb1 aya: kprobe: remove pid argument
Kprobes can only be attached globally. Per-pid logic needs to be
implemented on the BPF side with bpf_get_current_pid_tgid.
4 years ago
Arnabjyoti Kalita 35f15f70e0
aya: add minimum kernel version for each map and program type (#18) 4 years ago
Alessandro Decina bb15e82c1d aya: add missing load() in kprobe example
Fixes #17
4 years ago
Rafael Ortiz d8d311738c
aya: support both bpf_map_def layout variants
Libbpf and iproute2 use two slightly different `bpf_map_def` layouts. This change implements support for loading both.

Refs: #10, #14
4 years ago
Alessandro Decina 5f0ff1698a aya: netlink: tc: use ptr::read_unaligned instead of deferencing a potentially unaligned ptr 4 years ago
Alessandro Decina 7f2ceaf12e aya: netlink: port TC code to using new nlattr utils 4 years ago
Alessandro Decina d9b5ab575f aya: netlink: refactor nlattr writing code 4 years ago
Alessandro Decina c240a2c733 aya: netlink: introduce NestedAttrs builder and switch XDP to it
NestedAttrs is a safe interface for writing nlattrs. This is the first
step towards making the netlink code safer and easier to maintain.
4 years ago
Alessandro Decina bb595c4e69 aya: refactor program section parsing
This renames aya::obj::ProgramKind to aya::obj::ProgramSection and moves
all the program section parsing to ProgramSection::from_str.
4 years ago
Alessandro Decina 0188622580 aya: fix tracepoint prefix in a couple more places 4 years ago
Alessandro Decina a0151dd485 aya: fix trace point section name
Trace points have prefix "tracepoint" not "trace_point".
4 years ago
Alessandro Decina 521ef09463
Merge pull request #4 from seanyoung/doctest
Fix doctest and run them during CI
4 years ago
Alessandro Decina fee71b42f1 aya: tc: fix QdiscRequest layout 4 years ago
Sean Young 1196ba1dcc Fix doctest and run them during CI
Signed-off-by: Sean Young <sean@mess.org>
4 years ago
Sean Young b49ba69d09 Add support for lirc programs
Signed-off-by: Sean Young <sean@mess.org>
4 years ago
LOU Xun f1fc30411d
Fix Bpf::load_file when BTF doesn't exist 4 years ago
Alessandro Decina be0b7bbd83 Doc fixes 4 years ago
Alessandro Decina 768640dd46 aya: add doc aliases for maps and programs 4 years ago
Alessandro Decina 293e66af65 More docs 4 years ago
Alessandro Decina ad58e171ff aya: refactor tc code a bit and add docs 4 years ago
Alessandro Decina 11e21e83be More docs 4 years ago
Alessandro Decina 6c7df27bd0 More doc fixes 4 years ago
Alessandro Decina 28158e6028 aya: improve async perf map docs 4 years ago
Alessandro Decina 6ecf7dabf3 aya: tweak PerfEventArray docs 4 years ago
Alessandro Decina 6772595f3e aya: ProgramArray: more doc fixes 4 years ago
Alessandro Decina 4bde0c54bd aya: ProgramArray: tweak docs 4 years ago
Alessandro Decina 2cda5dbbe7 aya: implement ProgramFd for CgroupSkb 4 years ago
Alessandro Decina 2d7b9b2e90 aya: fix CgroupSkb docs 4 years ago
Alessandro Decina 08a68faf8a aya: programs: add support for BPF_PROG_TYPE_CGROUP_SKB programs 4 years ago
Alessandro Decina fb3e2f7f9d aya: programs: fix detaching programs attached with bpf_prog_attach 4 years ago
Alessandro Decina 665802594c aya: programs: fix syscall name in errors 4 years ago
Alessandro Decina 81a0b61164 aya: handle reordered functions
LLVM will split .text into .text.hot .text.unlikely etc and move the
content around in order to improve locality. We need to parse all the
text sections or relocations can potentially fail.
4 years ago
Alessandro Decina b92b1e18a9 aya: improve call relocation error messages 4 years ago
Alessandro Decina 20b2d4c77d aya: BpfError: set the #[source] attribute for RelocationErrors 4 years ago
Arnabjyoti Kalita 6974d349e8
programs: add support for attaching and detaching TC programs
This change adds support for attaching TC programs directly from aya, without
having to use iproute2/tc.
4 years ago
Alessandro Decina 31f8d71604 aya: add support for Stack and Queue maps 4 years ago
Alessandro Decina 40b7da6655 aya: add id and pinning fields to bpf_map_def 4 years ago
Alessandro Decina dc4e020f29 aya: netlink: improve error messages 4 years ago
Alessandro Decina 5effc972ac aya: add support for BPF_PROG_TYPE_SCHED_CLS programs 4 years ago