From 7694dae8e5ea6b2c4f470f1f0c826ad0460bb22d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Mei=C3=9Fner?= Date: Thu, 26 Sep 2024 21:46:22 +0200 Subject: [PATCH] Removes Config::external_internal_function_hash_collision. (#599) --- src/program.rs | 4 +--- src/vm.rs | 3 --- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/program.rs b/src/program.rs index 0ef76bcc..cc80ec2a 100644 --- a/src/program.rs +++ b/src/program.rs @@ -139,9 +139,7 @@ impl FunctionRegistry { } else { ebpf::hash_symbol_name(&usize::from(value).to_le_bytes()) }; - if config.external_internal_function_hash_collision - && loader.get_function_registry().lookup_by_key(hash).is_some() - { + if loader.get_function_registry().lookup_by_key(hash).is_some() { return Err(ElfError::SymbolHashCollision(hash)); } hash diff --git a/src/vm.rs b/src/vm.rs index 3d976364..f4a9a15d 100644 --- a/src/vm.rs +++ b/src/vm.rs @@ -72,8 +72,6 @@ pub struct Config { pub noop_instruction_rate: u32, /// Enable disinfection of immediate values and offsets provided by the user in JIT pub sanitize_user_provided_values: bool, - /// Throw ElfError::SymbolHashCollision when a BPF function collides with a registered syscall - pub external_internal_function_hash_collision: bool, /// Avoid copying read only sections when possible pub optimize_rodata: bool, /// Use aligned memory mapping @@ -103,7 +101,6 @@ impl Default for Config { reject_broken_elfs: false, noop_instruction_rate: 256, sanitize_user_provided_values: true, - external_internal_function_hash_collision: true, optimize_rodata: true, aligned_memory_mapping: true, enabled_sbpf_versions: SBPFVersion::V1..=SBPFVersion::V2,