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

Support external stacks and local function calls using local memory #460

Merged
merged 1 commit into from May 17, 2024

Conversation

hawkinsw
Copy link
Collaborator

  1. Add support for invoking the interpreter and JIT'd code with an external stack. This feature is generally useful and will also make it easier to fuzz the runtime and check for correctness.
  2. Add support for local functions that use local memory. Prior to this commit, a local function could be called but could not use any local memory (without overwriting memory from another function).

@hawkinsw hawkinsw force-pushed the local_call_external_stack branch 9 times, most recently from 6e2a4d1 to 9a42663 Compare May 14, 2024 02:49
@coveralls
Copy link

coveralls commented May 14, 2024

Coverage Status

coverage: 81.498%. first build
when pulling 7208c4b on hawkinsw:local_call_external_stack
into 3fb3da0 on iovisor:main.

@hawkinsw hawkinsw force-pushed the local_call_external_stack branch 4 times, most recently from 5bfcb6e to 127a73e Compare May 15, 2024 17:16
@hawkinsw hawkinsw requested a review from Alan-Jowett May 15, 2024 17:18
vm/ubpf_jit_x86_64.c Outdated Show resolved Hide resolved
@Alan-Jowett
Copy link
Collaborator

Can you please format the code using script/format-code? It looks like there are formatting changes that are unexpected.

@hawkinsw
Copy link
Collaborator Author

Can you please format the code using script/format-code? It looks like there are formatting changes that are unexpected.

Of course!! I thought that I did. Sorry!!

@hawkinsw hawkinsw force-pushed the local_call_external_stack branch 2 times, most recently from 9ccdf2e to b5a492e Compare May 16, 2024 04:23
@hawkinsw hawkinsw requested a review from Alan-Jowett May 16, 2024 04:23
@hawkinsw
Copy link
Collaborator Author

Can you please format the code using script/format-code? It looks like there are formatting changes that are unexpected.

Of course!! I thought that I did. Sorry!!

I believe that I ran the formatter on the code (and did it correctly!).

1. Add support for invoking the interpreter and JIT'd code with
   an external stack. This feature is generally useful and will
   also make it easier to fuzz the runtime and check for correctness.
2. Add support for local functions that use local memory. Prior to
   this commit, a local function could be called but could not use
   any local memory (without overwriting memory from another function).

Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
@Alan-Jowett
Copy link
Collaborator

Can you please format the code using script/format-code? It looks like there are formatting changes that are unexpected.

Of course!! I thought that I did. Sorry!!

I believe that I ran the formatter on the code (and did it correctly!).

OK, it might just be possible the code wasn't formatted correctly to begin with. Which version of clang-format did you use?

@hawkinsw
Copy link
Collaborator Author

Can you please format the code using script/format-code? It looks like there are formatting changes that are unexpected.

Of course!! I thought that I did. Sorry!!

I believe that I ran the formatter on the code (and did it correctly!).

OK, it might just be possible the code wasn't formatted correctly to begin with. Which version of clang-format did you use?

I will check!! I am constantly amazed how version-specific the formatter is! This problem occurs with another project I am working on, too.

@Alan-Jowett
Copy link
Collaborator

Can you please format the code using script/format-code? It looks like there are formatting changes that are unexpected.

Of course!! I thought that I did. Sorry!!

I believe that I ran the formatter on the code (and did it correctly!).

OK, it might just be possible the code wasn't formatted correctly to begin with. Which version of clang-format did you use?

I will check!! I am constantly amazed how version-specific the formatter is! This problem occurs with another project I am working on, too.

If you want, we can pick-up a newer version of the formatter if that helps. I think this is using the same one as eBPF-for-Windows, which is using a really old version (due to a dependency on an older version of Clang).

If that is a route we want to pursue, I would suggest making the changes as a separate formatting only PR.

@hawkinsw hawkinsw changed the title WIP: Support external stacks and local function calls using local memory Support external stacks and local function calls using local memory May 17, 2024
@Alan-Jowett Alan-Jowett merged commit ff4b48a into iovisor:main May 17, 2024
42 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.

None yet

3 participants