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

codegen: kfunc: Read correct sized argument #2014

Merged
merged 1 commit into from
Sep 24, 2021

Conversation

danobi
Copy link
Member

@danobi danobi commented Sep 22, 2021

Before, we were always reading 64 bits for the arg. The arg does not
have to be 64 bits wide, it can also be 32 bits wide for example. If
it's 32 bits, the upper 32 bits are junk, so reading it is not ok.

Fix by reading the correct size integer.

Checklist
  • Language changes are updated in man/adoc/bpftrace.adoc and if needed in docs/reference_guide.md
  • User-visible and non-trivial changes updated in CHANGELOG.md
  • The new behaviour is covered by tests

@danobi danobi force-pushed the kfunc_arg_size branch 2 times, most recently from 9f18c74 to ac1ed7c Compare September 22, 2021 22:33
Before, we were always reading 64 bits for the arg. The arg does not
_have_ to be 64 bits wide, it can also be 32 bits wide for example. If
it's 32 bits, the upper 32 bits are junk, so reading it is not ok.

Fix by reading the correct size integer.
@fbs fbs merged commit e419e10 into bpftrace:master Sep 24, 2021
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