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

Fix stack usage validation for eBPF local functions #566

Merged
merged 2 commits into from
Oct 22, 2024

Conversation

hawkinsw
Copy link
Collaborator

Stack usage for eBPF local functions was incorrectly calculated whether or not a custom stack usage calculator was present or not. This PR fixes that issue.

In addition to fixing that bug, this PR also changes the default eBPF program stack size and the default stack size for local functions in eBPF programs (8K and 256 bytes, respectively).

This PR also adds support for a stack usage calculator that does not want to allow an eBPF program's local functions to use any stack space at all.

@hawkinsw hawkinsw requested a review from Alan-Jowett October 11, 2024 21:05
@hawkinsw hawkinsw self-assigned this Oct 11, 2024
@hawkinsw hawkinsw force-pushed the local_function_stack_usage_fix branch 4 times, most recently from 5f2b762 to 8ae6ff2 Compare October 15, 2024 03:37
@coveralls
Copy link

coveralls commented Oct 15, 2024

Coverage Status

coverage: 79.342% (-0.2%) from 79.503%
when pulling 44c1837 on hawkinsw:local_function_stack_usage_fix
into f4cd68d on iovisor:main.

Stack usage for eBPF local functions was incorrectly calculated whether
or not a custom stack usage calculator was present or not. This PR fixes
that issue.

In addition to fixing that bug, this PR also changes the default eBPF
program stack size and the default stack size for local functions in
eBPF programs (8K and 256 bytes, respectively).

This PR also adds support for a stack usage calculator that does not
want to allow an eBPF program's local functions to use any stack space
at all.

Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
@hawkinsw hawkinsw force-pushed the local_function_stack_usage_fix branch from 8ae6ff2 to fae1535 Compare October 19, 2024 05:50
Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>
@Alan-Jowett Alan-Jowett merged commit a2c93ea into iovisor:main Oct 22, 2024
47 of 48 checks passed
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