forked from kubearmor/KubeArmor
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Aryan-sharma11 <[email protected]>
- Loading branch information
1 parent
ae5f57c
commit 9ec1e42
Showing
22 changed files
with
469 additions
and
101 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* SPDX-License-Identifier: GPL-2.0 */ | ||
/* Copyright 2024 Authors of KubeArmor */ | ||
/* This module contains the common structures shared by lsm and system monitor*/ | ||
# include "throttling.h" | ||
#ifndef __COMMON_H | ||
#define __COMMON_H | ||
#define MAX_ENTRIES 10240 | ||
#define MAX_ARGUMENT_SIZE 256 | ||
|
||
// arguments matching | ||
|
||
// values stored for argument map | ||
struct argVal{ | ||
char argsArray[10][20]; | ||
}; | ||
|
||
struct { | ||
__uint(type, BPF_MAP_TYPE_HASH); | ||
__uint(max_entries, 1); // Only one entry to store the count | ||
__type(key, int); | ||
__type(value, int); | ||
} count_map SEC(".maps"); | ||
|
||
struct { | ||
__uint(type, BPF_MAP_TYPE_HASH); | ||
__uint(max_entries, MAX_ENTRIES); | ||
__type(key, unsigned int); | ||
__type(value, struct argVal); | ||
__uint(pinning, LIBBPF_PIN_BY_NAME); | ||
} cmd_args SEC(".maps"); | ||
|
||
#endif /* __COMMON_H */ |
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
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
Oops, something went wrong.