Dmitry Savintsev
c6c4082093
update anyhow, clap, and tokio
2 years ago
Michal Rostecki
fa404ffb26
Merge pull request #68 from dmitris/fix-clippy
...
include and use clap only if needed
2 years ago
Dmitry Savintsev
e7ccd1a71e
include and use clap only if needed
...
Signed-off-by: Dmitry Savintsev <dsavints@gmail.com>
2 years ago
Michal Rostecki
224274f8a7
Merge pull request #73 from lucab/ups/perf-event
...
cargo-generate: add perf_event
2 years ago
Luca BRUNO
554702e63d
cargo-generate: add perf_event
...
This adds `perf_event` program type as a template entry.
The new entry comes with a skeleton example which register
scheduled events on each CPU at 1 HZ, triggered by the kernel
(based on clock ticks). The corresponding BPF logic logs each
event, and can identify kernel tasks from userland processes.
2 years ago
Michal Rostecki
65091e30bc
Merge pull request #71 from lucab/ups/fix-sorting
...
cargo-generate: sort program types
2 years ago
Luca BRUNO
463013a11e
cargo-generate: sort program types
2 years ago
Michal Rostecki
7fe5a39b7c
Merge pull request #72 from joshuataylor/feature/rust-toolchain-defaults
...
Add rust-src to -ebpf components
2 years ago
Michal Rostecki
3fdfd8b200
rust-toolchain: Add a comment about rust-src
...
Signed-off-by: Michal Rostecki <vadorovsky@gmail.com>
2 years ago
Josh Taylor
35d480a341
Add rust-src to components
2 years ago
Michal Rostecki
ccdafe53e2
Merge pull request #70 from arctic-alpaca/cargo_clean_env
...
Honor rust-toolchain.toml file in xtask, remove env vars with CARGO/RUST prefix
2 years ago
arctic-alpaca
9e3027896e
CI: Pin nightly toolchain to 2023-01-10, install bpf-linker on stable
2 years ago
arctic-alpaca
5af9b38bd6
Pin nightly version in -ebpf
2 years ago
arctic-alpaca
5b3653c936
Only remove RUSTUP_TOOLCHAIN env var in xtask build-ebpf
2 years ago
arctic-alpaca
039c07f7a2
Honor rust-toolchain.toml file in xtask, remove cargo/rust env vars
...
Remove env vars related to rust and cargo before executing cargo.
2 years ago
Michal Rostecki
2ba73f6f2f
Merge pull request #67 from dmitris/fix-clippy
...
Fix clippy issues in the generated code.
2 years ago
Michal Rostecki
806571f3d3
Merge pull request #65 from vadorovsky/raw-tracepoint
...
Add raw_tracepoint program type
2 years ago
Dmitry Savintsev
e86392d422
Fix clippy issues in the generated code.
...
Fix template so that the generated code would not have any
clippy issues (per `cargo +nightly clippy`).
Add template conditionals on the program_type to avoid
a warning about unused 'opt' variable.
Fixes #66 .
2 years ago
Michal Rostecki
70475f3b2a
Add raw_tracepoint program type
...
Signed-off-by: Michal Rostecki <vadorovsky@gmail.com>
2 years ago
Michal Rostecki
3ac1aa63ce
Merge pull request #64 from vadorovsky/update-deps
...
Update dependencies
2 years ago
Michal Rostecki
76699e10b2
Update dependencies
...
Signed-off-by: Michal Rostecki <vadorovsky@gmail.com>
2 years ago
Michal Rostecki
4720291f67
Merge pull request #63 from vadorovsky/log_level
...
readme: Mention `RUST_LOG` env variable
2 years ago
Michal Rostecki
cba4774787
readme: Mention `RUST_LOG` env variable
...
The default log level of env_logger is `error`. We are using `info!` in
the template, so let's suggest running the example with `RUST_LOG=info`.
Signed-off-by: Michal Rostecki <vadorovsky@gmail.com>
2 years ago
Alessandro Decina
864e1995f7
Merge pull request #61 from vadorovsky/aya-log-dont-unwrap
...
Don't fail on `BpfLogger::init()` error
2 years ago
Michal Rostecki
ab442eb10f
Don't fail on `BpfLogger::init()` error
...
An error during `BpfLogger` initialization most likely means that
`ayalog-ebpf` is not used in the eBPF crate.
Signed-off-by: Michal Rostecki <vadorovsky@gmail.com>
2 years ago
Michal Rostecki
df87136bdb
Merge pull request #60 from vadorovsky/no-unsafe
...
ebpf: Stop using `unsafe` for the whole function
2 years ago
Michal Rostecki
379b23b1b4
ebpf: Stop using `unsafe` for the whole function
...
Users should opt in into `unsafe` when performing particular unsafe
actions (accesing raw pointers, interacting with maps etc.), but
assuming that the whole eBPF program code is unsafe is quite an
exaggeration.
Signed-off-by: Michal Rostecki <vadorovsky@gmail.com>
2 years ago
Michal Rostecki
ccb2ad0f81
Merge pull request #59 from vadorovsky/static-mut
...
ebpf: Change `static mut` to `static` in map declaration
2 years ago
Michal Rostecki
0c4b89b497
ebpf: Change `static mut` to `static` in map declaration
...
Maps are using UnsafeCell for interior mutability, therefore `static
mut` is not needed anymore.
Signed-off-by: Michal Rostecki <vadorovsky@gmail.com>
2 years ago
Dave Tucker
12c43b56bf
Merge pull request #54 from vadorovsky/tc-context
...
classifier: Use the new `TcContext` struct
2 years ago
Michal Rostecki
1ecc829b4f
classifier: Use the new `TcContext` struct
...
That new context type exposes `data` and `data_end` fields for direct
access to the packet payload.
Signed-off-by: Michal Rostecki <vadorovsky@gmail.com>
2 years ago
Dave Tucker
37410be032
Merge pull request #55 from vadorovsky/monorepo
...
ebpf: Update git repository URL for aya-log
2 years ago
Dave Tucker
88243bad08
Merge pull request #56 from vadorovsky/env_logger
...
Switch from simplelog to env_logger
2 years ago
Michal Rostecki
3b831ffda3
Switch from simplelog to env_logger
...
Signed-off-by: Michal Rostecki <vadorovsky@gmail.com>
2 years ago
Michal Rostecki
f462b301f4
ebpf: Update git repository URL for aya-log
...
aya-log was moved to the main aya repository, the old one is archived.
Signed-off-by: Michal Rostecki <vadorovsky@gmail.com>
2 years ago
Dave Tucker
8c6016040e
Merge pull request #49 from dave-tucker/deps
...
Update dependency
2 years ago
Dave Tucker
3b2b186e0b
Update dependency
...
Use `aya = ">=0.11"` and therefore the Aya version picked by
Cargo will be bounded by the latest version supported in
`aya-log = "0.1"` - once it's been released again.
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
2 years ago
Dave Tucker
02185e1e14
Merge pull request #48 from ishitatsuyuki/patch-1
...
Fix trailing comma in ebpf/.vscode/settings.json
2 years ago
Tatsuyuki Ishi
c15f1d34de
Fix trailing comma in ebpf/.vscode/settings.json
2 years ago
Alessandro Decina
54e16b80f7
Merge pull request #47 from nak3/add-BPF_PROG_TYPE_CGROUP_SOCKOPT
...
Add cgroup_sockopt template for BPF_PROG_TYPE_CGROUP_SOCKOPT
3 years ago
Kenjiro Nakayama
dcb6523ada
Fix wrong elif condition
3 years ago
Kenjiro Nakayama
8621ea7d5f
Add cgroup_sockopt template for BPF_PROG_TYPE_CGROUP_SOCKOPT
3 years ago
Alessandro Decina
c6b6f1ed3d
Merge pull request #46 from nak3/add-cgroup-sysctl
...
Add cgroup_sysctl template for BPF_PROG_TYPE_CGROUP_SYSCTL
3 years ago
Kenjiro Nakayama
886182d1bc
Add cgroup_sysctl to CI
3 years ago
Kenjiro Nakayama
3bf8e87b3e
Add cgroup_sysctl template for BPF_PROG_TYPE_CGROUP_SYSCTL
...
Since https://github.com/aya-rs/aya/pull/256 supports `BPF_PROG_TYPE_CGROUP_SYSCTL`,
this patch adds cgroup_sysctl template.
3 years ago
Alessandro Decina
0df4d8f969
Merge pull request #45 from vadorovsky/use-main
...
aya: Switch (again) from crates.io to git
3 years ago
Michal Rostecki
9f69ee52b2
aya: Switch (again) from crates.io to git
...
This time we need to switch to git again, because of this unreleased
change:
aya-rs/aya@d1f2215193
Signed-off-by: Michal Rostecki <vadorovsky@gmail.com>
3 years ago
Dave Tucker
807131b955
Merge pull request #33 from nak3/add-socket-filter
...
Add template for socket_filter program type
3 years ago
Dave Tucker
aeb81111ea
Merge pull request #44 from vadorovsky/xtask-clap
...
xtask: Use clap instead of structopt
3 years ago
Michal Rostecki
9297249e01
xtask: Use clap instead of structopt
...
structopt was merged into clap (starting from clap 3.0), therefore
becoming a deprecated project.
Signed-off-by: Michal Rostecki <vadorovsky@gmail.com>
3 years ago