-
Notifications
You must be signed in to change notification settings - Fork 139
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
Verifier integration #570
Verifier integration #570
Conversation
89e5c7c
to
3d34b60
Compare
b2316bd
to
0e15c81
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will review more as soon as I can, but I thought that I could send along these tiny little bits of feedback now! Thank you for doing this work -- I think that it is going to be tremendously helpful!
330ae5e
to
72eed31
Compare
Signed-off-by: Alan Jowett <[email protected]>
fe76a8d
to
79ab7b9
Compare
Signed-off-by: Alan Jowett <[email protected]>
Signed-off-by: Alan Jowett <[email protected]>
Signed-off-by: Alan Jowett <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that there is a problem with our CMake configuration when the developer wants to have both "regular" tests and "fuzzing" tests on Linux. In that configuration, I get a linker error because vm/test.c
has a main
and then the libfuzzer (which is linked) has a main
, too. I will try to do some debugging and see whether my hunch is true.
I have confirmed that this "cross up" is the problem -- when the user (on Linux) has conformance tests and fuzzing tests enabled at the same time, there is a linker error. There also seems to be a need to do an additional sanity test in
It was easily correctable, but I loved what you did with the detection for the C compiler and thought we could do the same with the C++ compiler. |
This pull request integrates the eBPF verifier as a submodule and updates the
libfuzzer
harness to utilize the verifier. The changes include modifications to submodule configurations, build scripts, and the addition of new verification and debugging functionalities in thelibfuzzer
harness.Integration of eBPF Verifier:
.gitmodules
: Added theebpf-verifier
submodule.CMakeLists.txt
: Included theebpf-verifier
directory in the build whenUBPF_ENABLE_LIBFUZZER
is enabled.external/ebpf-verifier
: Added the submodule commit reference forebpf-verifier
.Build Script Updates:
libfuzzer/CMakeLists.txt
: Updated include directories and linked theebpf-verifier
library.Enhancements to
libfuzzer
Harness:libfuzzer/libfuzz_harness.cc
:verify_bpf_byte_code
function to verify BPF bytecode using the eBPF verifier.verify_bpf_byte_code
in the main fuzzer test function.API Changes:
vm/inc/ubpf.h
: Addedregister_mask
parameter to the debug function signature.vm/ubpf_vm.c
: Updated the call to the debug function to includeregister_mask
.