Skip to content

Commit

Permalink
Rebase onto main
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasSte committed Oct 21, 2024
1 parent 2f44c65 commit 32f43bb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/elf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1072,7 +1072,7 @@ impl<C: ContextObject> Executable<C> {
.or_insert_with(|| ebpf::hash_symbol_name(name));
if config.reject_broken_elfs
&& loader
.get_function_registry(&SBPFVersion::V1)
.get_function_registry(SBPFVersion::V1)
.lookup_by_key(hash)
.is_none()
{
Expand Down
6 changes: 3 additions & 3 deletions src/program.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ impl<T: Copy + PartialEq> FunctionRegistry<T> {
ebpf::hash_symbol_name(&usize::from(value).to_le_bytes())
};
if loader
.get_function_registry(&SBPFVersion::V1)
.get_function_registry(SBPFVersion::V1)
.lookup_by_key(hash)
.is_some()
{
Expand Down Expand Up @@ -292,9 +292,9 @@ impl<C: ContextObject> BuiltinProgram<C> {
/// Get the function registry depending on the SBPF version
pub fn get_function_registry(
&self,
sbpf_version: &SBPFVersion,
sbpf_version: SBPFVersion,
) -> &FunctionRegistry<BuiltinFunction<C>> {
if sbpf_version == &SBPFVersion::V1 {
if sbpf_version == SBPFVersion::V1 {
&self.sparse_registry
} else {
&self.dense_registry
Expand Down
6 changes: 1 addition & 5 deletions src/static_analysis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,11 +224,7 @@ impl<'a> Analysis<'a> {
/// Splits the sequence of instructions into basic blocks
///
/// Also links the control-flow graph edges between the basic blocks.
pub fn split_into_basic_blocks(
&mut self,
flatten_call_graph: bool,
sbpf_version: &SBPFVersion,
) {
pub fn split_into_basic_blocks(&mut self, flatten_call_graph: bool, sbpf_version: SBPFVersion) {
self.cfg_nodes.insert(0, CfgNode::default());
for pc in self.functions.keys() {
self.cfg_nodes.entry(*pc).or_default();
Expand Down

0 comments on commit 32f43bb

Please sign in to comment.