Skip to content

Commit

Permalink
tetragon: Get max entries directly from bpf map
Browse files Browse the repository at this point in the history
There's no need to mix in the base sensor in here,
just take the max entries from the ebpf map object.

Signed-off-by: Jiri Olsa <[email protected]>
  • Loading branch information
olsajiri committed Feb 12, 2025
1 parent 06d1660 commit 29ddc34
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pkg/sensors/exec/procevents/proc_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -371,11 +371,9 @@ func writeExecveMap(procs []procs) {
}
}

entries, ok := base.ExecveMap.GetMaxEntries()
if !ok {
logger.GetLogger().Fatal("Failed to get number of execve_map entries, confused..")
}
entries := m.MaxEntries()
logger.GetLogger().Infof("Maximum execve_map entries %d, need to add %d.", entries, len(procs))

i := uint32(0)

inInitTree := make(map[uint32]struct{})
Expand Down

0 comments on commit 29ddc34

Please sign in to comment.