generated from amosproj/amos202Xss0Y-projname
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
47 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
// SPDX-FileCopyrightText: 2025 Felix Hilgers <[email protected]> | ||
// | ||
// SPDX-License-Identifier: MIT | ||
|
||
use core::mem::MaybeUninit; | ||
|
||
use aya_ebpf::{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// SPDX-FileCopyrightText: 2025 Felix Hilgers <[email protected]> | ||
// | ||
// SPDX-License-Identifier: MIT | ||
|
||
use aya_ebpf::maps::HashMap; | ||
|
||
#[repr(C)] | ||
pub struct Args<T> { | ||
pub args: [u64; 6], | ||
pub extra: T, | ||
} | ||
|
||
pub struct EventLocal<T: 'static>(&'static HashMap<u64, Args<T>>); | ||
|
||
impl<T> EventLocal<T> {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
// SPDX-FileCopyrightText: 2025 Felix Hilgers <[email protected]> | ||
// | ||
// SPDX-License-Identifier: MIT | ||
|
||
pub mod blocking; | ||
pub mod fdtracking; | ||
pub mod signal; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,15 @@ | ||
// SPDX-FileCopyrightText: 2025 Felix Hilgers <[email protected]> | ||
// | ||
// SPDX-License-Identifier: MIT | ||
|
||
use aya_ebpf::maps::{Array, HashMap}; | ||
use ebpf_types::{ | ||
Equality, EventData, EventKind, FilterConfig, MissingBehavior, | ||
}; | ||
|
||
#[repr(transparent)] | ||
pub struct Filter<K: 'static, V: Matcher + 'static>(&'static HashMap<K, V>); | ||
|
||
pub struct FilterConfigs { | ||
config: &'static Array<FilterConfig>, | ||
host_pid: &'static Array<u32>, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,4 @@ pub mod pipeline; | |
pub mod scratch; | ||
pub mod syscalls; | ||
pub mod task_ext; | ||
pub mod event_local; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
// SPDX-FileCopyrightText: 2025 Felix Hilgers <[email protected]> | ||
// | ||
// SPDX-License-Identifier: MIT | ||
|
||
use aya_ebpf::{ | ||
macros::map, | ||
maps::{Array, HashMap, LruHashMap, PerCpuArray, RingBuf}, | ||
|
@@ -6,10 +10,7 @@ use ebpf_relocation_helpers::TaskStruct; | |
use ebpf_types::{Equality, EventData, EventKind, FilterConfig, ProcessContext, TaskContext}; | ||
|
||
use crate::{ | ||
cache::{Cache, TryWithCache}, | ||
filter::{FilterConfigs, FilterEntry}, | ||
pipeline::RawEventData, | ||
scratch::{ScratchSpace, ScratchValue}, | ||
event_local::Args, cache::{Cache, TryWithCache}, filter::{FilterConfigs, FilterEntry}, pipeline::RawEventData, scratch::{ScratchSpace, ScratchValue} | ||
}; | ||
|
||
#[map] | ||
|
@@ -31,10 +32,7 @@ static FILTER_CONFIG: Array<FilterConfig> = Array::with_max_entries(EventKind::M | |
static CONFIG: Array<u32> = Array::with_max_entries(1, 0); | ||
|
||
#[map] | ||
pub static EVENT_BUFFER: PerCpuArray<RawEventData> = PerCpuArray::with_max_entries(1, 0); | ||
|
||
#[map] | ||
pub static EVENT_BRIDGE: HashMap<u64, RawEventData> = HashMap::with_max_entries(10240, 0); | ||
static ARG_BUFFER: HashMap<u64, Args<[u8; 1024]>> = HashMap::with_max_entries(10240, 0); | ||
|
||
#[map] | ||
pub static EVENTS: RingBuf = RingBuf::with_byte_size(8192 * 1024, 0); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
// SPDX-FileCopyrightText: 2025 Felix Hilgers <[email protected]> | ||
// | ||
// SPDX-License-Identifier: MIT | ||
|
||
use core::{ | ||
mem::MaybeUninit, | ||
ops::{Deref, DerefMut}, | ||
|