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: ensure struct alignment on startup #1650

Merged
merged 1 commit into from
Oct 27, 2023

Conversation

willfindlay
Copy link
Contributor

Mismatches between the BPF and userspace API are often the cause of bizarre bugs that are difficult to debug. This might happen if a developer makes a change to one and forgets to update the other, or it might simply happen during development if the userspace and BPF targets go out of sync. This PR introduces alignment checks to the Tetragon startup process so that we can fail with a clear error message when such situations arise.

Introduce startup logic to check userspace and BPF struct alignment, and exit with an error message if we detect a mismatch.

Mismatches between the BPF and userspace API are often the cause of bizarre bugs that are
difficult to debug. This might happen if a developer makes a change to one and forgets to
update the other, or it might simply happen during development if the userspace and BPF
targets go out of sync. This PR introduces alignment checks to the Tetragon startup
process so that we can fail with a clear error message when such situations arise.

Signed-off-by: William Findlay <will@isovalent.com>
@willfindlay willfindlay added the release-note/minor This PR introduces a minor user-visible change label Oct 24, 2023
@willfindlay willfindlay requested a review from a team as a code owner October 24, 2023 19:31
@willfindlay willfindlay requested a review from olsajiri October 24, 2023 19:31
@willfindlay willfindlay merged commit 0fd246f into main Oct 27, 2023
30 checks passed
@willfindlay willfindlay deleted the pr/willfindlay/alignchecker-on-start branch October 27, 2023 13:58
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