Commit Graph

152 Commits (d6334c269af29618ce9175af1ecbe3235694a9d2)
 

Author SHA1 Message Date
Tamir Duberstein d6334c269a
github: add rust-cache
Fixes .
Alessandro Decina 69ea57ac54
Merge pull request from aya-rs/fix-tests
Fix sk_msg tests
Tamir Duberstein 3013ab506d
Fix sk_msg tests
These were broken by  which pulled in
https://github.com/aya-rs/aya/pull/397 and other changes which were not
reflected in the templates.
Arindam Das b45787c353
fix: fixes aya and aya-log version mismatch ()
Fixes aya and aya-log version mismatch between {{project-name}}-epbf and {{project-name}} crates.

Fixes https://github.com/aya-rs/aya/issues/565.
Alessandro Decina 8e92b72545
Merge pull request from tamird/actions-rs
Replace actions-rs/toolchain with dtolnay/rust-toolchain
Tamir Duberstein 37654a088e
Replace actions-rs/toolchain with dtolnay/rust-toolchain
See https://github.com/actions-rs/toolchain/issues/216; actions-rs seems
to be unmaintained.
Alessandro Decina 4ce0e28314
Merge pull request from dmitris/nightly-text
sync rustup nightly install directions with Book
Dmitry Savintsev 732b7ea930 sync run nightly install directions with Book
Signed-off-by: Dmitry Savintsev <dsavints@gmail.com>
vadorovsky b00519ff0d
Merge pull request from dmitris/deps-upd
upgrade deps: tokio and anyhow
Dmitry Savintsev 715967772f upgrade deps: tokio and anyhow
Michal Rostecki 6a605e08dd
Merge pull request from dmitris/toml-space
minor space fix for VSCode toml formatting
Dmitry Savintsev 347d37c914 minor space fix for VSCode toml formatting
Signed-off-by: Dmitry Savintsev <dsavints@gmail.com>
Michal Rostecki 16b8d42238
Merge pull request from vadorovsky/unpin-nightly
Unpin Rust nightly
Michal Rostecki 11f406414e Unpin Rust nightly
The issues with core::sync::atomic got fixed.

Signed-off-by: Michal Rostecki <vadorovsky@gmail.com>
Michal Rostecki 80a7c5b53c
Merge pull request from dmitris/crossplat
Remove unix-specific executor in xtask
Dmitry Savintsev 7008f570b0 fail with descriptive message
Co-authored-by: Michal Rostecki <vadorovsky@gmail.com>
Dmitry Savintsev 255c59cf98 Remove unix-specific executor in xtask
Change unix-specific executor to generic one
to enable xtask working on Windows and eventually
be able to cross-compile on Windows.

Fixes .

Signed-off-by: Dmitry Savintsev <dsavints@gmail.com>
Michal Rostecki e03b1f6979
Merge pull request from dmitris/fix-uprobe
Fix uprobe programs and VSCode spacing
Dmitry Savintsev 7016308147 fix uprobe programs
Signed-off-by: Dmitry Savintsev <dsavints@gmail.com>
Dmitry Savintsev 8cd95c42ea adjust spacing to avoid VSCode changes on save
Signed-off-by: Dmitry Savintsev <dsavints@gmail.com>
Michal Rostecki 999d98cc3d
Merge pull request from dmitris/deps-update
update anyhow, clap, and tokio
Dmitry Savintsev c6c4082093 update anyhow, clap, and tokio
Michal Rostecki fa404ffb26
Merge pull request from dmitris/fix-clippy
include and use clap only if needed
Dmitry Savintsev e7ccd1a71e include and use clap only if needed
Signed-off-by: Dmitry Savintsev <dsavints@gmail.com>
Michal Rostecki 224274f8a7
Merge pull request from lucab/ups/perf-event
cargo-generate: add perf_event
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.
Michal Rostecki 65091e30bc
Merge pull request from lucab/ups/fix-sorting
cargo-generate: sort program types
Luca BRUNO 463013a11e cargo-generate: sort program types
Michal Rostecki 7fe5a39b7c
Merge pull request from joshuataylor/feature/rust-toolchain-defaults
Add rust-src to -ebpf components
Michal Rostecki 3fdfd8b200 rust-toolchain: Add a comment about rust-src
Signed-off-by: Michal Rostecki <vadorovsky@gmail.com>
Josh Taylor 35d480a341 Add rust-src to components
Michal Rostecki ccdafe53e2
Merge pull request from arctic-alpaca/cargo_clean_env
Honor rust-toolchain.toml file in xtask, remove env vars with CARGO/RUST prefix
arctic-alpaca 9e3027896e
CI: Pin nightly toolchain to 2023-01-10, install bpf-linker on stable
arctic-alpaca 5af9b38bd6
Pin nightly version in -ebpf
arctic-alpaca 5b3653c936
Only remove RUSTUP_TOOLCHAIN env var in xtask build-ebpf
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.
Michal Rostecki 2ba73f6f2f
Merge pull request from dmitris/fix-clippy
Fix clippy issues in the generated code.
Michal Rostecki 806571f3d3
Merge pull request from vadorovsky/raw-tracepoint
Add raw_tracepoint program type
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 .
Michal Rostecki 70475f3b2a Add raw_tracepoint program type
Signed-off-by: Michal Rostecki <vadorovsky@gmail.com>
Michal Rostecki 3ac1aa63ce
Merge pull request from vadorovsky/update-deps
Update dependencies
Michal Rostecki 76699e10b2 Update dependencies
Signed-off-by: Michal Rostecki <vadorovsky@gmail.com>
Michal Rostecki 4720291f67
Merge pull request from vadorovsky/log_level
readme: Mention `RUST_LOG` env variable
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>
Alessandro Decina 864e1995f7
Merge pull request from vadorovsky/aya-log-dont-unwrap
Don't fail on `BpfLogger::init()` error
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>
Michal Rostecki df87136bdb
Merge pull request from vadorovsky/no-unsafe
ebpf: Stop using `unsafe` for the whole function
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>
Michal Rostecki ccb2ad0f81
Merge pull request from vadorovsky/static-mut
ebpf: Change `static mut` to `static` in map declaration
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>