Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

Commit

Permalink
Removes Config::external_internal_function_hash_collision.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lichtso committed Sep 26, 2024
1 parent 57139e9 commit 87e1120
Show file tree
Hide file tree
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
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions src/vm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
/// Have the verifier reject "callx r10"
pub reject_callx_r10: bool,
/// Avoid copying read only sections when possible
Expand Down Expand Up @@ -105,7 +103,6 @@ impl Default for Config {
reject_broken_elfs: false,
noop_instruction_rate: 256,
sanitize_user_provided_values: true,
external_internal_function_hash_collision: true,
reject_callx_r10: true,
optimize_rodata: true,
aligned_memory_mapping: true,
Expand Down

0 comments on commit 87e1120

Please sign in to comment.