Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tetragon: Update execve_map_stat value from procs reader #429

Merged
merged 3 commits into from
Sep 23, 2022

Conversation

olsajiri
Copy link
Contributor

When tetragon starts it searches for running tasks and updates execve_map, but does not update stats table, which can later lead to negative numbers in stats when the scanned processes die.

Updating stats with found procs tasks count.

Signed-off-by: Jiri Olsa [email protected]

@olsajiri olsajiri force-pushed the execve_map_stats_fix branch 3 times, most recently from 2fa30bd to 0775583 Compare September 22, 2022 12:29
Plus 'make vendor' changes.

Signed-off-by: Jiri Olsa <[email protected]>
Adding UpdateStatsMap function to update stats map from user
space atomically.

The function uses simple socket filter bpf program, that is
doing to map update itself. It's executed via the prog test
run interface.

This way we can atomically update the stats map in following
changes.

Signed-off-by: Jiri Olsa <[email protected]>
When tetragon starts it searches for running tasks and
updates execve_map, but does not update stats table,
which can later lead to negative numbers in stats when
the scanned processes die.

Updating stats with found procs tasks count.

Signed-off-by: Jiri Olsa <[email protected]>
@olsajiri olsajiri force-pushed the execve_map_stats_fix branch from 0775583 to 5480662 Compare September 23, 2022 08:32
@olsajiri olsajiri marked this pull request as ready for review September 23, 2022 09:47
@olsajiri olsajiri requested a review from a team as a code owner September 23, 2022 09:47
@olsajiri olsajiri requested a review from tixxdz September 23, 2022 09:47
Copy link
Member

@tixxdz tixxdz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @olsajiri

@jrfastab jrfastab merged commit bbfcaa1 into cilium:main Sep 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants