Skip to content

Commit

Permalink
improve: add missing parameters.
Browse files Browse the repository at this point in the history
Signed-off-by: cfc4n <cfc4n.cs@gmail.com>
  • Loading branch information
cfc4n committed Oct 14, 2023
1 parent 3afd163 commit a793a34
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 0 deletions.
3 changes: 3 additions & 0 deletions kern/bash_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ struct event {

struct {
__uint(type, BPF_MAP_TYPE_PERF_EVENT_ARRAY);
__uint(key_size, sizeof(u32));
__uint(value_size, sizeof(u32));
__uint(max_entries, 1024);
} events SEC(".maps");

struct {
Expand Down
3 changes: 3 additions & 0 deletions kern/boringssl_masterkey.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ struct ssl3_handshake_st {
// bpf map
struct {
__uint(type, BPF_MAP_TYPE_PERF_EVENT_ARRAY);
__uint(key_size, sizeof(u32));
__uint(value_size, sizeof(u32));
__uint(max_entries, 1024);
} mastersecret_events SEC(".maps");

struct {
Expand Down
3 changes: 3 additions & 0 deletions kern/gnutls_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ struct ssl_data_event_t {

struct {
__uint(type, BPF_MAP_TYPE_PERF_EVENT_ARRAY);
__uint(key_size, sizeof(u32));
__uint(value_size, sizeof(u32));
__uint(max_entries, 1024);
} gnutls_events SEC(".maps");

/***********************************************************
Expand Down
6 changes: 6 additions & 0 deletions kern/gotls_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,16 @@ struct mastersecret_gotls_t {
// bpf map
struct {
__uint(type, BPF_MAP_TYPE_PERF_EVENT_ARRAY);
__uint(key_size, sizeof(u32));
__uint(value_size, sizeof(u32));
__uint(max_entries, 1024);
} mastersecret_go_events SEC(".maps");

struct {
__uint(type, BPF_MAP_TYPE_PERF_EVENT_ARRAY);
__uint(key_size, sizeof(u32));
__uint(value_size, sizeof(u32));
__uint(max_entries, 1024);
} events SEC(".maps");

struct {
Expand Down
3 changes: 3 additions & 0 deletions kern/mysqld_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ struct {

struct {
__uint(type, BPF_MAP_TYPE_PERF_EVENT_ARRAY);
__uint(key_size, sizeof(u32));
__uint(value_size, sizeof(u32));
__uint(max_entries, 1024);
} events SEC(".maps");

SEC("uprobe/dispatch_command")
Expand Down
3 changes: 3 additions & 0 deletions kern/nspr_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ struct ssl_data_event_t {

struct {
__uint(type, BPF_MAP_TYPE_PERF_EVENT_ARRAY);
__uint(key_size, sizeof(u32));
__uint(value_size, sizeof(u32));
__uint(max_entries, 1024);
} nspr_events SEC(".maps");

/***********************************************************
Expand Down
3 changes: 3 additions & 0 deletions kern/postgres_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ struct data_t {

struct {
__uint(type, BPF_MAP_TYPE_PERF_EVENT_ARRAY);
__uint(key_size, sizeof(u32));
__uint(value_size, sizeof(u32));
__uint(max_entries, 1024);
} events SEC(".maps");

// https://github.com/postgres/postgres/blob/7b7ed046cb2ad9f6efac90380757d5977f0f563f/src/backend/tcop/postgres.c#L987-L992
Expand Down

0 comments on commit a793a34

Please sign in to comment.