From 42c4f6204d3fc940fc3988e65362f75aa77afb50 Mon Sep 17 00:00:00 2001 From: Joe Ranweiler Date: Mon, 20 Feb 2023 06:21:29 -0800 Subject: [PATCH] Remove rest of unused telemetry (#2863) --- docs/telemetry.md | 62 ----------------- src/agent/Cargo.lock | 1 - src/agent/onefuzz-telemetry/Cargo.toml | 11 +-- src/agent/onefuzz-telemetry/src/lib.rs | 93 -------------------------- 4 files changed, 3 insertions(+), 164 deletions(-) diff --git a/docs/telemetry.md b/docs/telemetry.md index f4d87dc72a..fec29529a1 100644 --- a/docs/telemetry.md +++ b/docs/telemetry.md @@ -182,65 +182,3 @@ recorded: * Machine ID * State - the current state of the task on the node. For a full list, see the enum [NodeTaskState](../src/pytypes/onefuzztypes/enums.py). - - -### Data recorded by an upcoming feature - -The following information is recorded for Salvo related tasks: - -* InputsFuzzed - A u64 representing the count of inputs that were symbolically - executed. -* SatConstraints - A u64 representing the count of satisfiable constraints and - hence number new inputs generated. -* UnsatConstraints - A u64 representing the count of unsatisfiable constraints. -* AverageVarsPerConstraint - A float64 representing the average count of input - bytes used per constraint over all of the inputs fuzzed. -* MaxConstraintVars - A u64 representing the maximum count of input bytes used - for any single constraint. -* AverageSymexTime - A float64 representing the average time in seconds spent - symbolically executing the program under test over all inputs fuzzed. -* MaxSymexTime - A u64 representing the maximum time in seconds spent - symbolically executing the program under test for a single input. -* AverageSolvingTime - A float64 representing the average time in seconds spent - solving constraints over all inputs fuzzed. -* MaxSolvingTime - A u64 representing the maximum time in seconds spent solving - constraints for any single input. -* UniqueCodeLocationCount - A u64 representing the count of the unique code - locations that are of interest to Salvo, e.g. a tainted instruction or branch - target. -* AverageInstructionsExecuted - A float64 representing the average count of - instructions that were symbolically executed over all fuzzed inputs. -* MaxInstructionsExecuted - A u64 representing the maximum count of - instructions that were symbolically executed for any single fuzzed input. -* AverageTaintedInstructions - A float64 representing the count of instructions - that make use of tainted input over all inputs fuzzed. -* MaxTaintedInstructions - A u64 representing the count of instructions that - make use of tainted input for any single input. -* AverageMemoryTaintedInstructions - A float64 representing the count of - instructions that make use of tainted input to read or write memory over all - inputs fuzzed. -* MaxMemoryTaintedInstructions - A u64 representing the count of instructions - that make use of tainted input to read or write memory for any single input. -* AveragePathLength - A u64 representing the count of the average constraints - tracked for constraint solving while symbolically executing the program. -* MaxPathLength - A u64 representing the count of the maximum constraints - tracked for constraint solving while symbolically executing the program. -* DivergenceRate - A float64 representing the ratio of inputs that did not - branch as expected divided by the number of inputs fuzzed. -* DivergencePathLength - A u32 that indicates the length of execution path - divergence. -* DivergencePathExpectedIndex - A u32 that indicates the expected index for - divergence. -* DivergencePathActualIndex - A u32 that indicates the actual index for - divergence. -* MissedInstructionCode - The Intel Instruction code for an instruction that - was not modelled during symbolic execution but may have been input tainted. - Examples include `Cmovs_r16_rm16` and `Movq_mm_rm64`. For the full list, see - [iced_x86::Code](https://docs.rs/iced-x86/1.10.3/iced_x86/enum.Code.html). -* MissedInstructionMnemonic - The Intel Instruction that was not modelled - during symbolic execution but may have been input tainted. Examples include - `Cmovs` and `Movq`. For the full list, see - [iced_x86::mnemonic](https://docs.rs/iced-x86/1.10.3/iced_x86/enum.Mnemonic.html). -* SymexTimeout - A u64 representing the maximum time in seconds to spend during - symbolic execution, reported each time symbolic execution was stopped due to - the limit. diff --git a/src/agent/Cargo.lock b/src/agent/Cargo.lock index dd69326b17..5bc6289ac3 100644 --- a/src/agent/Cargo.lock +++ b/src/agent/Cargo.lock @@ -1971,7 +1971,6 @@ dependencies = [ "anyhow", "appinsights", "chrono", - "iced-x86", "lazy_static", "log", "serde", diff --git a/src/agent/onefuzz-telemetry/Cargo.toml b/src/agent/onefuzz-telemetry/Cargo.toml index 2b707a6f18..ca75f20f80 100644 --- a/src/agent/onefuzz-telemetry/Cargo.toml +++ b/src/agent/onefuzz-telemetry/Cargo.toml @@ -5,17 +5,12 @@ authors = ["fuzzing@microsoft.com"] edition = "2018" license = "MIT" -[features] -default = [] -intel_instructions = ["iced-x86"] - [dependencies] anyhow = "1.0" appinsights = { version = "0.2.3" } +chrono = { version = "0.4", default-features = false, features = ["clock", "std"] } +lazy_static = "1.4" log = "0.4" -uuid = { version = "0.8", features = ["serde", "v4"] } serde = { version = "1.0", features = ["derive"] } -iced-x86 = { version = "1.17", optional = true} tokio = { version = "1.24", features = ["full"] } -lazy_static = "1.4" -chrono = { version = "0.4", default-features = false, features = ["clock", "std"] } +uuid = { version = "0.8", features = ["serde", "v4"] } diff --git a/src/agent/onefuzz-telemetry/src/lib.rs b/src/agent/onefuzz-telemetry/src/lib.rs index 4720caac54..681a310b9f 100644 --- a/src/agent/onefuzz-telemetry/src/lib.rs +++ b/src/agent/onefuzz-telemetry/src/lib.rs @@ -2,8 +2,6 @@ // Licensed under the MIT License. use chrono::DateTime; -#[cfg(feature = "intel_instructions")] -use iced_x86::{Code as IntelInstructionCode, Mnemonic as IntelInstructionMnemonic}; use serde::{Deserialize, Serialize}; use std::fmt; use std::sync::{LockResult, RwLockReadGuard, RwLockWriteGuard}; @@ -135,33 +133,6 @@ pub enum EventData { ToolName(String), Region(String), Role(Role), - InputsFuzzed(u64), - SatConstraints(u64), - UnsatConstraints(u64), - AverageVarsPerConstraint(u64), - MaxConstraintVars(u64), - AverageSymexTime(f64), - MaxSymexTime(u64), - AverageSolvingTime(f64), - MaxSolvingTime(u64), - UniqueCodeLocationCount(u64), - AverageInstructionsExecuted(f64), - MaxInstructionsExecuted(u64), - AverageTaintedInstructions(f64), - MaxTaintedInstructions(u64), - AverageMemoryTaintedInstructions(f64), - MaxMemoryTaintedInstructions(u64), - AveragePathLength(f64), - MaxPathLength(u64), - DivergenceRate(f64), - DivergencePathLength(u32), - DivergencePathExpectedIndex(u32), - DivergencePathActualIndex(u32), - #[cfg(feature = "intel_instructions")] - MissedInstructionCode(IntelInstructionCode), - #[cfg(feature = "intel_instructions")] - MissedInstructionMnemonic(IntelInstructionMnemonic), - SymexTimeout(u64), } impl EventData { @@ -199,43 +170,6 @@ impl EventData { Self::ToolName(x) => ("tool_name", x.to_owned()), Self::Region(x) => ("region", x.to_owned()), Self::Role(x) => ("role", x.as_str().to_owned()), - #[cfg(feature = "intel_instructions")] - Self::MissedInstructionCode(x) => ("missed_instruction_code", format!("{:?}", x)), - #[cfg(feature = "intel_instructions")] - Self::MissedInstructionMnemonic(x) => { - ("missed_instruction_mnemonic", format!("{:?}", x)) - } - Self::InputsFuzzed(x) => ("inputs_fuzzed", x.to_string()), - Self::SatConstraints(x) => ("sat_constraints", x.to_string()), - Self::UnsatConstraints(x) => ("unsat_constraints", x.to_string()), - Self::AverageVarsPerConstraint(x) => ("average_vars_per_constraint", x.to_string()), - Self::MaxConstraintVars(x) => ("max_constraint_vars", x.to_string()), - Self::AverageSymexTime(x) => ("average_symex_time", x.to_string()), - Self::MaxSymexTime(x) => ("max_symex_time", x.to_string()), - Self::AverageSolvingTime(x) => ("average_solving_time", x.to_string()), - Self::MaxSolvingTime(x) => ("max_solving_time", x.to_string()), - Self::UniqueCodeLocationCount(x) => ("unique_code_locations_count", x.to_string()), - Self::AverageInstructionsExecuted(x) => { - ("average_instructions_executed", x.to_string()) - } - Self::MaxInstructionsExecuted(x) => ("max_instructions_executed", x.to_string()), - Self::AverageTaintedInstructions(x) => ("average_tainted_instructions", x.to_string()), - Self::MaxTaintedInstructions(x) => ("max_tainted_instructions", x.to_string()), - Self::AverageMemoryTaintedInstructions(x) => { - ("average_memory_tainted_instructions", x.to_string()) - } - Self::MaxMemoryTaintedInstructions(x) => { - ("max_memory_tainted_instructions", x.to_string()) - } - Self::AveragePathLength(x) => ("average_path_length", x.to_string()), - Self::MaxPathLength(x) => ("max_path_length", x.to_string()), - Self::DivergenceRate(x) => ("divergence_rate", x.to_string()), - Self::DivergencePathLength(x) => ("divergence_path_length", x.to_string()), - Self::DivergencePathExpectedIndex(x) => { - ("divergence_path_expected_index", x.to_string()) - } - Self::DivergencePathActualIndex(x) => ("divergence_path_actual_index", x.to_string()), - Self::SymexTimeout(x) => ("symex_timeout", x.to_string()), } } @@ -273,33 +207,6 @@ impl EventData { Self::ToolName(_) => true, Self::Region(_) => false, Self::Role(_) => true, - Self::InputsFuzzed(_) => true, - Self::SatConstraints(_) => true, - Self::UnsatConstraints(_) => true, - Self::AverageVarsPerConstraint(_) => true, - Self::MaxConstraintVars(_) => true, - Self::AverageSymexTime(_) => true, - Self::MaxSymexTime(_) => true, - Self::AverageSolvingTime(_) => true, - Self::MaxSolvingTime(_) => true, - Self::UniqueCodeLocationCount(_) => true, - Self::AverageInstructionsExecuted(_) => true, - Self::MaxInstructionsExecuted(_) => true, - Self::AverageTaintedInstructions(_) => true, - Self::MaxTaintedInstructions(_) => true, - Self::AverageMemoryTaintedInstructions(_) => true, - Self::MaxMemoryTaintedInstructions(_) => true, - Self::AveragePathLength(_) => true, - Self::MaxPathLength(_) => true, - Self::DivergenceRate(_) => true, - Self::DivergencePathLength(_) => true, - Self::DivergencePathExpectedIndex(_) => true, - Self::DivergencePathActualIndex(_) => true, - #[cfg(feature = "intel_instructions")] - Self::MissedInstructionCode(_) => true, - #[cfg(feature = "intel_instructions")] - Self::MissedInstructionMnemonic(_) => true, - Self::SymexTimeout(_) => true, } } }