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: Setup execve_map max entries #3279

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

olsajiri
Copy link
Contributor

@olsajiri olsajiri commented Jan 7, 2025

No description provided.

@olsajiri olsajiri added the release-note/minor This PR introduces a minor user-visible change label Jan 7, 2025
@olsajiri olsajiri force-pushed the pr/olsajiri/harden branch 2 times, most recently from f1947ec to 7b664dd Compare January 7, 2025 13:11
@olsajiri olsajiri force-pushed the pr/olsajiri/harden branch from 7b664dd to ab3513b Compare January 7, 2025 13:31
Comment on lines +109 to +110
threads := readFileDefault("/proc/sys/kernel/threads-max", 32768)
ExecveMap.SetMaxEntries(int(threads))
Copy link
Member

Choose a reason for hiding this comment

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

Why do we need this? It seems it will make the size of the execve_map even larger as threads-max is often well above 32K. This will take significant space while running threads-max threads is pretty rare nop?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried this as mitigation for https://github.com/isovalent/security/issues/88 .. I think we need some combination of this change (with some reasonable size for execve_map) and other ways mentioned in the issue

Copy link
Member

Choose a reason for hiding this comment

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

ah I see, maybe this is one of the cases where NO_PREALLOC could help so that we can dynamically size to a very large map. But I could see how this can lead to memory issues in the future. That's not an easy problem :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note/minor This PR introduces a minor user-visible change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants