Skip to content

Commit

Permalink
Removes Config::external_internal_function_hash_collision. (#599)
Browse files Browse the repository at this point in the history
Lichtso authored Sep 26, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 1e3f4b1 commit 7694dae
Showing 2 changed files with 1 addition and 6 deletions.
4 changes: 1 addition & 3 deletions src/program.rs
Original file line number Diff line number Diff line change
@@ -139,9 +139,7 @@ impl<T: Copy + PartialEq> FunctionRegistry<T> {
} 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
3 changes: 0 additions & 3 deletions src/vm.rs
Original file line number Diff line number Diff line change
@@ -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,

0 comments on commit 7694dae

Please sign in to comment.