From 94f7a4351b200a2e89b7eafa751c5e29efd22dd7 Mon Sep 17 00:00:00 2001 From: Alan Jowett Date: Mon, 11 Nov 2024 07:38:57 -0800 Subject: [PATCH] Update submodules (#607) Signed-off-by: Alan Jowett Co-authored-by: Alan Jowett --- external/bpf_conformance | 2 +- external/ebpf-verifier | 2 +- libfuzzer/libfuzz_harness.cc | 11 ++++------- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/external/bpf_conformance b/external/bpf_conformance index 1ce286105..afc0282f7 160000 --- a/external/bpf_conformance +++ b/external/bpf_conformance @@ -1 +1 @@ -Subproject commit 1ce286105edf3577ef380bd8a498cfa2314d6dfa +Subproject commit afc0282f775ce3f94b98b73498b9d4f77b1f2ff7 diff --git a/external/ebpf-verifier b/external/ebpf-verifier index 1f14b5cc4..e92408ce0 160000 --- a/external/ebpf-verifier +++ b/external/ebpf-verifier @@ -1 +1 @@ -Subproject commit 1f14b5cc4c09a3bf934156b9d42c9c99f5fc7d21 +Subproject commit e92408ce0fc8c26a6c8b2e1bc0ef59ea9f8d3072 diff --git a/libfuzzer/libfuzz_harness.cc b/libfuzzer/libfuzz_harness.cc index 9075adc82..6384c27e8 100644 --- a/libfuzzer/libfuzz_harness.cc +++ b/libfuzzer/libfuzz_harness.cc @@ -355,24 +355,21 @@ try { InstructionSeq& prog = std::get(prog_or_error); // Start with the default verifier options. - ebpf_verifier_options_t options = ebpf_verifier_default_options; + ebpf_verifier_options_t options{}; // Enable termination checking and pre-invariant storage. - options.check_termination = true; + options.cfg_opts.check_for_termination = true; + options.cfg_opts.simplify = false; options.print_invariants = g_ubpf_fuzzer_options.get("UBPF_FUZZER_PRINT_VERIFIER_REPORT"); options.print_failures = g_ubpf_fuzzer_options.get("UBPF_FUZZER_PRINT_VERIFIER_REPORT"); options.store_pre_invariants = g_ubpf_fuzzer_options.get("UBPF_FUZZER_CONSTRAINT_CHECK"); - // Disable simplification so that the verifier can provide more fine grained invariant information for each - // instruction. - options.simplify = false; - ebpf_verifier_stats_t stats; std::ostringstream error_stream; // Verify the program. This will return false or throw an exception if the program is invalid. - bool result = ebpf_verify_program(error_stream, prog, raw_prog.info, &options, &stats); + bool result = ebpf_verify_program(error_stream, prog, raw_prog.info, options, &stats); if (g_ubpf_fuzzer_options.get("UBPF_FUZZER_PRINT_VERIFIER_REPORT")) { std::cout << "verifier stats:" << std::endl; std::cout << "total_unreachable: " << stats.total_unreachable << std::endl;