Commit Graph

334 Commits

Author SHA1 Message Date
Alessandro Decina 2d7b9b2e90 aya: fix CgroupSkb docs 2021-06-10 08:40:42 +00:00
Alessandro Decina 08a68faf8a aya: programs: add support for BPF_PROG_TYPE_CGROUP_SKB programs 2021-06-10 07:38:36 +00:00
Alessandro Decina fb3e2f7f9d aya: programs: fix detaching programs attached with bpf_prog_attach 2021-06-09 12:17:35 +00:00
Alessandro Decina 665802594c aya: programs: fix syscall name in errors 2021-06-09 08:19:09 +00:00
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.
2021-06-03 13:00:00 +10:00
Alessandro Decina 5effc972ac aya: add support for BPF_PROG_TYPE_SCHED_CLS programs 2021-05-03 06:48:16 +00:00
Alessandro Decina 30d2b25f11 aya: xdp: fix detaching on kernels older than 5.7
XDP_FLAGS_REPLACE was added in 5.7. Now for kernels >= 5.7 whenever we
detach an XDP program we pass along the program fd we expect to be
detaching. For older kernels, we just detach whatever is attached, which
is not great but it's the way the API worked pre XDP_FLAGS_REPLACE.
2021-04-28 08:29:19 +00:00
Alessandro Decina 607cf68a69 aya: xdp: set flags when attaching with netlink 2021-04-28 08:27:25 +00:00
Alessandro Decina 9e12c9324c aya: fix warnings 2021-04-14 23:15:22 +00:00
Alessandro Decina 9a24f20e6f aya: programs: rework load_program() retry code a bit 2021-04-12 11:50:26 +00:00
Alessandro Decina 144175434f aya: programs: add support for SkMsg programs 2021-04-12 11:46:06 +00:00
Alessandro Decina dad300c88b aya: maps: add SockHash 2021-04-12 11:43:04 +00:00
Alessandro Decina ca4b3bfc04 aya: add support for SockOps programs 2021-04-04 06:42:35 +00:00
Alessandro Decina b57cace941 aya: add support BPF_PROG_TYPE_SK_SKB programs and SockMaps 2021-03-29 09:00:56 +00:00
Alessandro Decina 0b3e532d7a aya: small doc fixes 2021-03-22 10:07:33 +00:00
Alessandro Decina 79f1b385a5 aya: more docs 2021-03-21 08:44:20 +00:00
Alessandro Decina 683a58ea6d aya: consolidate errors into ProgramError::SyscallError 2021-03-21 08:43:32 +00:00
Alessandro Decina ae863bc663 aya: split aya::programs::probe into ::kprobe and ::uprobe & add docs 2021-03-21 07:40:01 +00:00
Alessandro Decina 46e0a2ede4 aya: don't export VerifierLog 2021-03-10 08:10:39 +00:00
Alessandro Decina a92bfebf50 aya: remove TryInto magic from program()/program_mut() too
For programs it's actually useful being able to get the underlying
Program enum, for example when iterating/loading all the programs
2021-03-02 08:52:58 +00:00
Alessandro Decina ee05f9d949 aya: fix verifier log handling 2021-03-02 08:49:44 +00:00
Alessandro Decina 92b4ed2664 aya: add support for function calls 2021-03-02 08:49:44 +00:00
Alessandro Decina 286e117fe0 aya: add Program::name() and make ::prog_type() public 2021-03-02 08:49:44 +00:00
Alessandro Decina 29f2d9b2d9 aya: switch to rustified enums 2021-03-02 08:49:44 +00:00
Alessandro Decina 8327ffbb8d xdp: xdp BPF_LINK_CREATE was added in 5.9 2021-03-02 08:49:44 +00:00
Alessandro Decina f11df77f85 aya: implement missing bit of retprobes 2021-03-02 08:49:44 +00:00
Alessandro Decina 3e8a279a59 Fix build with musl 2021-03-02 08:49:44 +00:00
Alessandro Decina a3ab2eff57 Format fixes 2021-03-02 08:49:44 +00:00
Alessandro Decina 3abe9bb859 Fix RawFd import paths 2021-03-02 08:49:44 +00:00
Alessandro Decina 55d8bcf386 xdp: add support for attaching with custom xdp flags 2021-03-02 08:49:44 +00:00
Alessandro Decina d326038cf4 programs: rework ProgramError a bit
Move type specific errors to XdpError SocketFilterError etc.

Annotate all source errors with #[source]
2021-03-02 08:49:44 +00:00
Alessandro Decina f88ca1f1f1 programs: add internal API to create links 2021-03-02 08:49:44 +00:00
Alessandro Decina 160e0be6d6 Change the suffix of errors from *Failed to *Error 2021-03-02 06:57:50 +00:00
Alessandro Decina af8f769b50 Turn the project into a workspace, move code under aya/ 2021-02-25 05:36:43 +00:00