Commit Graph

1838 Commits (ea139050cfae61ae274cc932612a43044c84e2ef)
 

Author SHA1 Message Date
Alessandro Decina b657930a3e aya: don't error out parsing padded map sections
Fixes 
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
Alessandro Decina b3ecbe7c54
Merge pull request from tw4452852/minor_fix_for_stackid
bpf: fix a minor bug due to stackid allocation
Tw d1b7b024dc bpf: fix a minor bug due to stackid allocation
The type casting introduces an allocation, this will cause compiling failure when linking final bpf target.
So remove this casting to fix this issue.

BTW, the following is the failure I met:

= note: 07:24:12 [ERROR] fatal error: "unable to allocate function return #1"
          PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace.
          Stack dump:
          0.    Running pass 'Function Pass Manager' on module 'trace_bpf-001a275b17e9eb12'.
          1.    Running pass 'BPF DAG->DAG Pattern Instruction Selection' on function '@_ZN7aya_bpf4maps11stack_trace10StackTrace11get_stackid17h32b649bc3780c0aaE'

Signed-off-by: Tw <wei.tan@intel.com>
Alessandro Decina 7eddffb962
Merge pull request from tw4452852/stacktrace
bpf: add support for STACK_TRACE map
Tw fd20bd5e23 bpf: add support for STACK_TRACE map
This path support initial support for BPF_MAP_TYPE_STACK_TRACE.

Signed-off-by: Tw <wei.tan@intel.com>
Alessandro Decina ef39e0ebd2 bpf: sk_skb: add ::cb() and ::cb_mut() to work with skb->cb
Alessandro Decina 9c8e78b7d4 aya: tc: make qdisc_add_clsact return io::Error
Alessandro Decina 35e9b4e639 bpf: don't generate bpf_map_def and fix aya_bpf::bindings overrides
Alessandro Decina ec5822d78e bpf: sk_skb: wrap more helpers
Alessandro Decina 122a5306e7 aya, aya-bpf-bindings: regenerate bindings
Alessandro Decina a847d6d53b xtask: aya-bpf-bindings: add bpf_adj_room_mode
Alessandro Decina 8cd669ca9a xtask: fix include paths for kernel headers bundled with libbpf
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.
Arnabjyoti Kalita 35f15f70e0
aya: add minimum kernel version for each map and program type ()
Alessandro Decina be035bf42c CI: add lint workflow
Alessandro Decina 1d294ba34c CI: don't install bpf-linker
The bpf code isn't tested in CI yet
Alessandro Decina bb15e82c1d aya: add missing load() in kprobe example
Fixes 
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: , 
Alessandro Decina 97cb0db0ad bpf/aya-bpf-cty: target_arch for bpf*-unknown-none was renamed to "bpf"
Alessandro Decina d0a0be65d2 Add contributing section to readme
Alessandro Decina 58e45f8513 Add CONTRIBUTING.md
Alessandro Decina 5f0ff1698a aya: netlink: tc: use ptr::read_unaligned instead of deferencing a potentially unaligned ptr
Alessandro Decina 7f2ceaf12e aya: netlink: port TC code to using new nlattr utils
Alessandro Decina d9b5ab575f aya: netlink: refactor nlattr writing code
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.
Alessandro Decina 76baefe61b Add discord link to readme
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.
Alessandro Decina 0188622580 aya: fix tracepoint prefix in a couple more places
Alessandro Decina a0151dd485 aya: fix trace point section name
Trace points have prefix "tracepoint" not "trace_point".
Alessandro Decina 521ef09463
Merge pull request from seanyoung/doctest
Fix doctest and run them during CI
Alessandro Decina d70e291580 (cargo-release) version 0.10.2
Alessandro Decina fee71b42f1 aya: tc: fix QdiscRequest layout
Sean Young 1196ba1dcc Fix doctest and run them during CI
Signed-off-by: Sean Young <sean@mess.org>
Alessandro Decina 59cfbc51c8
Merge pull request from seanyoung/lirc
Add support for lirc programs
Sean Young b49ba69d09 Add support for lirc programs
Signed-off-by: Sean Young <sean@mess.org>
Alessandro Decina 304abfbfeb (cargo-release) version 0.10.1
Alessandro Decina cdc737490d
Merge pull request from aquarhead/fix-load-file
Fix Bpf::load_file when BTF doesn't exist
LOU Xun f1fc30411d
Fix Bpf::load_file when BTF doesn't exist
Alessandro Decina 94b5e2e4e6 Copy readme into aya/
Alessandro Decina 7694bacf04 aya: add more fields to Cargo.toml
Alessandro Decina 9a0b13e781 ignore .vscode
Alessandro Decina 8956dd0b71 add .cargo/config
Alessandro Decina e666cad2d6 Fix libc link in readme
Alessandro Decina be0b7bbd83 Doc fixes
Alessandro Decina 9f7b017d5d aya: bump version to 0.10
Alessandro Decina 5e0057acb9 Add readme
Alessandro Decina 768640dd46 aya: add doc aliases for maps and programs
Alessandro Decina 293e66af65 More docs
Alessandro Decina ad58e171ff aya: refactor tc code a bit and add docs