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 labelling for local calls #602

Merged
merged 1 commit into from
Nov 8, 2024

Conversation

Alan-Jowett
Copy link
Collaborator

This pull request includes several updates to the libfuzzer harness to enhance the functionality and remove outdated checks. The most important changes involve adding new fields to the ubpf_context_t structure, removing conditional compilation checks, and updating function signatures to include the program code.

Enhancements to ubpf_context_t structure:

  • Added program_start and program_end fields to the ubpf_context_t structure to track the program boundaries. (libfuzzer/libfuzz_harness.cc)

Removal of outdated checks and conditional compilation:

  • Removed the HAVE_EBPF_VERIFIER_CHECK_CONSTRAINTS_AT_LABEL conditional compilation checks and related code, simplifying the handling of store_pre_invariants option. (libfuzzer/libfuzz_harness.cc) [1] [2] [3]

Function signature updates:

  • Updated the ubpf_context_from function to accept program_code as a parameter and initialize the new fields in ubpf_context_t. (libfuzzer/libfuzz_harness.cc) [1] [2]
  • Modified call_ubpf_interpreter and call_ubpf_jit functions to pass program_code to ubpf_context_from. (libfuzzer/libfuzz_harness.cc) [1] [2]

Additional changes:

  • Added a global vector g_pc_stack to track the program counter stack for local calls and exits. (libfuzzer/libfuzz_harness.cc)

Signed-off-by: Alan Jowett <[email protected]>
@coveralls
Copy link

Coverage Status

coverage: 79.201%. remained the same
when pulling c4637f1 on Alan-Jowett:fix_local_call_label
into 80cc295 on iovisor:main.

@Alan-Jowett Alan-Jowett merged commit 5798dc6 into iovisor:main Nov 8, 2024
51 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.

2 participants