From e1f83b0df91af2ca87a979a8e569796be9dfe9b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Mei=C3=9Fner?= Date: Wed, 27 Aug 2025 11:58:00 +0000 Subject: [PATCH 1/2] Swaps MM_BYTECODE_START and MM_RODATA_START. --- src/debugger.rs | 6 +++--- src/ebpf.rs | 8 +++---- src/elf.rs | 21 +++++++++++-------- src/memory_region.rs | 4 ++-- src/program.rs | 2 +- tests/execution.rs | 50 ++++++++++++++++++++++++++++---------------- 6 files changed, 54 insertions(+), 37 deletions(-) diff --git a/src/debugger.rs b/src/debugger.rs index b33ae1a21..0a677a37f 100644 --- a/src/debugger.rs +++ b/src/debugger.rs @@ -156,10 +156,10 @@ fn get_host_ptr( if !interpreter .executable .get_sbpf_version() - .enable_lower_bytecode_vaddr() - && vm_addr < ebpf::MM_RODATA_START + .enable_lower_rodata_vaddr() + && vm_addr < ebpf::MM_BYTECODE_START { - vm_addr += ebpf::MM_RODATA_START; + vm_addr += ebpf::MM_BYTECODE_START; } match interpreter.vm.memory_mapping.map( AccessType::Load, diff --git a/src/ebpf.rs b/src/ebpf.rs index aa7718054..1e41d5c81 100644 --- a/src/ebpf.rs +++ b/src/ebpf.rs @@ -39,10 +39,10 @@ pub const VIRTUAL_ADDRESS_BITS: usize = 32; /// Size (and alignment) of a memory region pub const MM_REGION_SIZE: u64 = 1 << VIRTUAL_ADDRESS_BITS; -/// Virtual address of the bytecode region (in SBPFv3) -pub const MM_BYTECODE_START: u64 = 0; -/// Virtual address of the readonly data region (also contains the bytecode until SBPFv3) -pub const MM_RODATA_START: u64 = MM_REGION_SIZE; +/// Virtual address of the readonly data region (in SBPFv3) +pub const MM_RODATA_START: u64 = 0; +/// Virtual address of the bytecode region (also contains the rodata until SBPFv3) +pub const MM_BYTECODE_START: u64 = MM_REGION_SIZE; /// Virtual address of the stack region pub const MM_STACK_START: u64 = MM_REGION_SIZE * 2; /// Virtual address of the heap region diff --git a/src/elf.rs b/src/elf.rs index 66cd43e3d..b55682793 100644 --- a/src/elf.rs +++ b/src/elf.rs @@ -356,12 +356,15 @@ impl Executable { Ok(Self { elf_bytes, sbpf_version, - ro_section: Section::Borrowed(ebpf::MM_RODATA_START as usize, 0..text_bytes.len()), - text_section_vaddr: if sbpf_version.enable_lower_bytecode_vaddr() { - ebpf::MM_BYTECODE_START - } else { - ebpf::MM_RODATA_START - }, + ro_section: Section::Borrowed( + if sbpf_version.enable_lower_rodata_vaddr() { + ebpf::MM_RODATA_START + } else { + ebpf::MM_BYTECODE_START + } as usize, + 0..text_bytes.len(), + ), + text_section_vaddr: ebpf::MM_BYTECODE_START, text_section_range: 0..text_bytes.len(), entry_pc, function_registry, @@ -445,8 +448,8 @@ impl Executable { } const EXPECTED_PROGRAM_HEADERS: [(u32, u64); 4] = [ - (PF_X, ebpf::MM_BYTECODE_START), // byte code - (PF_R, ebpf::MM_RODATA_START), // read only data + (PF_X, ebpf::MM_RODATA_START), // byte code + (PF_R, ebpf::MM_BYTECODE_START), // read only data (PF_R | PF_W, ebpf::MM_STACK_START), // stack (PF_R | PF_W, ebpf::MM_HEAP_START), // heap ]; @@ -658,7 +661,7 @@ impl Executable { return Err(ElfError::ValueOutOfBounds); } } else { - debug_assert_eq!(ro_section_vaddr, ebpf::MM_RODATA_START); + debug_assert_eq!(ro_section_vaddr, ebpf::MM_REGION_SIZE); } Ok(Self { diff --git a/src/memory_region.rs b/src/memory_region.rs index 0a00e907c..008b25811 100644 --- a/src/memory_region.rs +++ b/src/memory_region.rs @@ -204,8 +204,8 @@ impl CommonMemoryMapping<'_> { stack_frame, )) } else { - let region_name = match vm_addr & (!ebpf::MM_RODATA_START.saturating_sub(1)) { - ebpf::MM_RODATA_START => "program", + let region_name = match vm_addr & (!ebpf::MM_BYTECODE_START.saturating_sub(1)) { + ebpf::MM_BYTECODE_START => "program", ebpf::MM_STACK_START => "stack", ebpf::MM_HEAP_START => "heap", ebpf::MM_INPUT_START => "input", diff --git a/src/program.rs b/src/program.rs index 002632024..deb05e76f 100644 --- a/src/program.rs +++ b/src/program.rs @@ -74,7 +74,7 @@ impl SBPFVersion { self >= SBPFVersion::V3 } /// ... SIMD-0189 - pub fn enable_lower_bytecode_vaddr(self) -> bool { + pub fn enable_lower_rodata_vaddr(self) -> bool { self >= SBPFVersion::V3 } /// ... SIMD-0377 diff --git a/tests/execution.rs b/tests/execution.rs index 98d60d687..41fd2c562 100644 --- a/tests/execution.rs +++ b/tests/execution.rs @@ -2035,7 +2035,9 @@ fn test_callx() { " add64 r10, 0 mov64 r0, 0x0 - or64 r8, 0x28 + mov64 r8, 0x1 + lsh64 r8, 0x20 + or64 r8, 0x38 callx r8 exit function_foo: @@ -2043,7 +2045,7 @@ fn test_callx() { mov64 r0, 0x2A exit", [], - TestContextObject::new(8), + TestContextObject::new(10), ProgramResult::Ok(42), ); } @@ -2072,7 +2074,7 @@ fn test_err_callx_oob_high() { test_interpreter_and_jit_asm!( " add64 r10, 0 - lddw r0, 0x100000000 + lddw r0, 0x200000000 callx r0 exit", [], @@ -2163,11 +2165,13 @@ fn test_err_reg_stack_depth() { test_interpreter_and_jit_asm!( " add64 r10, 0 + mov64 r0, 0x1 + lsh64 r0, 0x20 callx r0 exit", config, [], - TestContextObject::new(2 * max_call_depth as u64), + TestContextObject::new(4 * max_call_depth as u64), ProgramResult::Err(EbpfError::CallDepthExceeded), ); } @@ -2423,7 +2427,9 @@ fn test_tight_infinite_recursion_callx() { test_interpreter_and_jit_asm!( " add64 r10, 0 - or64 r8, 0x20 + mov64 r8, 0x1 + lsh64 r8, 0x20 + or64 r8, 0x30 call function_foo exit function_foo: @@ -2431,7 +2437,7 @@ fn test_tight_infinite_recursion_callx() { callx r8 exit", [], - TestContextObject::new(7), + TestContextObject::new(9), ProgramResult::Err(EbpfError::ExceededMaxInstructions), ); } @@ -2542,7 +2548,9 @@ fn test_err_exit_capped() { test_interpreter_and_jit_asm!( " add64 r10, 0 - or64 r0, 0x20 + mov64 r0, 0x1 + lsh64 r0, 0x20 + or64 r0, 0x30 callx r0 exit function_foo: @@ -2550,13 +2558,15 @@ fn test_err_exit_capped() { exit ", [], - TestContextObject::new(5), + TestContextObject::new(7), ProgramResult::Err(EbpfError::ExceededMaxInstructions), ); test_interpreter_and_jit_asm!( " add64 r10, 0 - or64 r0, 0x20 + mov64 r0, 0x1 + lsh64 r0, 0x20 + or64 r0, 0x30 callx r0 exit function_foo: @@ -2565,7 +2575,7 @@ fn test_err_exit_capped() { exit ", [], - TestContextObject::new(6), + TestContextObject::new(8), ProgramResult::Err(EbpfError::ExceededMaxInstructions), ); test_interpreter_and_jit_asm!( @@ -2599,11 +2609,13 @@ fn test_far_jumps() { exit function_c: add64 r10, 0 - mov32 r1, 0x18 - callx r1 + mov64 r8, 0x1 + lsh64 r8, 0x20 + or64 r8, 0x18 + callx r8 exit", [], - TestContextObject::new(9), + TestContextObject::new(11), ProgramResult::Ok(0), ); } @@ -2680,7 +2692,7 @@ fn test_reloc_64_64_sbpfv0() { [], (), TestContextObject::new(2), - ProgramResult::Ok(ebpf::MM_RODATA_START + 0x120), + ProgramResult::Ok(ebpf::MM_BYTECODE_START + 0x120), ); } @@ -2713,7 +2725,7 @@ fn test_reloc_64_relative_sbpfv0() { [], (), TestContextObject::new(2), - ProgramResult::Ok(ebpf::MM_RODATA_START + 0x138), + ProgramResult::Ok(ebpf::MM_BYTECODE_START + 0x138), ); } @@ -2779,7 +2791,7 @@ fn test_reloc_64_relative_data_sbpfv0() { [], (), TestContextObject::new(3), - ProgramResult::Ok(ebpf::MM_RODATA_START + 0x140), + ProgramResult::Ok(ebpf::MM_BYTECODE_START + 0x140), ); } @@ -3223,7 +3235,9 @@ fn test_capped_after_callx() { " add64 r10, 0 mov64 r0, 0x0 - or64 r8, 0x28 + mov64 r8, 0x1 + lsh64 r8, 0x20 + or64 r8, 0x38 callx r8 exit function_foo: @@ -3231,7 +3245,7 @@ fn test_capped_after_callx() { mov64 r0, 0x2A exit", [], - TestContextObject::new(4), + TestContextObject::new(6), ProgramResult::Err(EbpfError::ExceededMaxInstructions), ); } From 8e313a0253d0d61c47200eca41c21e845be2a772 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Mei=C3=9Fner?= Date: Wed, 5 Nov 2025 17:32:00 +0000 Subject: [PATCH 2/2] Adjusts the e_type, e_machine and program headers. --- src/elf.rs | 35 ++++++++++----------------- tests/elf.rs | 30 ++++++----------------- tests/elfs/elf.ld | 10 ++++---- tests/elfs/relative_call.so | Bin 1560 -> 1560 bytes tests/elfs/reloc_64_64.so | Bin 1280 -> 1280 bytes tests/elfs/reloc_64_relative.so | Bin 1360 -> 1360 bytes tests/elfs/reloc_64_relative_data.so | Bin 1344 -> 1336 bytes tests/elfs/rodata_section.so | Bin 1368 -> 1368 bytes tests/elfs/strict_header.so | Bin 1456 -> 1456 bytes tests/elfs/struct_func_pointer.so | Bin 1288 -> 1288 bytes tests/elfs/syscall_static.so | Bin 1304 -> 1304 bytes tests/execution.rs | 4 +-- 12 files changed, 28 insertions(+), 51 deletions(-) mode change 100755 => 100644 tests/elfs/relative_call.so mode change 100755 => 100644 tests/elfs/strict_header.so diff --git a/src/elf.rs b/src/elf.rs index b55682793..66d13e861 100644 --- a/src/elf.rs +++ b/src/elf.rs @@ -410,7 +410,7 @@ impl Executable { loader: Arc>, ) -> Result { use crate::elf_parser::{ - consts::{ELFMAG, EV_CURRENT, PF_R, PF_W, PF_X, PT_LOAD, SHN_UNDEF, STT_FUNC}, + consts::{ELFMAG, EV_CURRENT, PF_R, PF_X, PT_LOAD, SHN_UNDEF, STT_FUNC}, types::{Elf64Ehdr, Elf64Shdr, Elf64Sym}, }; @@ -429,8 +429,8 @@ impl Executable { || file_header.e_ident.ei_osabi != ELFOSABI_NONE || file_header.e_ident.ei_abiversion != 0x00 || file_header.e_ident.ei_pad != [0x00; 7] - || file_header.e_type != ET_DYN - || file_header.e_machine != EM_SBPF + // file_header.e_type + || file_header.e_machine != EM_BPF || file_header.e_version != EV_CURRENT // file_header.e_entry || file_header.e_phoff != mem::size_of::() as u64 @@ -439,7 +439,7 @@ impl Executable { || file_header.e_ehsize != mem::size_of::() as u16 || file_header.e_phentsize != mem::size_of::() as u16 || file_header.e_phnum < EXPECTED_PROGRAM_HEADERS.len() as u16 - || program_header_table_range.end >= elf_bytes.len() + || program_header_table_range.end > elf_bytes.len() || file_header.e_shentsize != mem::size_of::() as u16 // file_header.e_shnum || file_header.e_shstrndx >= file_header.e_shnum @@ -447,31 +447,25 @@ impl Executable { return Err(ElfParserError::InvalidFileHeader); } - const EXPECTED_PROGRAM_HEADERS: [(u32, u64); 4] = [ - (PF_X, ebpf::MM_RODATA_START), // byte code - (PF_R, ebpf::MM_BYTECODE_START), // read only data - (PF_R | PF_W, ebpf::MM_STACK_START), // stack - (PF_R | PF_W, ebpf::MM_HEAP_START), // heap + const EXPECTED_PROGRAM_HEADERS: [(u32, u64); 2] = [ + (PF_R, ebpf::MM_RODATA_START), // read only data + (PF_X, ebpf::MM_BYTECODE_START), // byte code ]; let program_header_table = Elf64::slice_from_bytes::(elf_bytes, program_header_table_range.clone())?; + let mut expected_offset = program_header_table_range.end as u64; for (program_header, (p_flags, p_vaddr)) in program_header_table .iter() .zip(EXPECTED_PROGRAM_HEADERS.iter()) { - let p_filesz = if (*p_flags & PF_W) != 0 { - 0 - } else { - program_header.p_memsz - }; if program_header.p_type != PT_LOAD || program_header.p_flags != *p_flags - || program_header.p_offset < program_header_table_range.end as u64 + || program_header.p_offset != expected_offset || program_header.p_offset >= elf_bytes.len() as u64 || program_header.p_offset.checked_rem(ebpf::INSN_SIZE as u64) != Some(0) || program_header.p_vaddr != *p_vaddr || program_header.p_paddr != *p_vaddr - || program_header.p_filesz != p_filesz + || program_header.p_filesz != program_header.p_memsz || program_header.p_filesz > (elf_bytes.len() as u64).saturating_sub(program_header.p_offset) || program_header.p_filesz.checked_rem(ebpf::INSN_SIZE as u64) != Some(0) @@ -479,10 +473,11 @@ impl Executable { { return Err(ElfParserError::InvalidProgramHeader); } + expected_offset = expected_offset.saturating_add(program_header.p_filesz); } - let bytecode_header = &program_header_table[0]; - let rodata_header = &program_header_table[1]; + let rodata_header = &program_header_table[0]; + let bytecode_header = &program_header_table[1]; let text_section_vaddr = bytecode_header.p_vaddr; let text_section_range = bytecode_header.file_range().unwrap_or_default(); let ro_section = Section::Borrowed( @@ -504,10 +499,6 @@ impl Executable { .saturating_sub(bytecode_header.p_vaddr) .checked_div(ebpf::INSN_SIZE as u64) .unwrap_or_default() as usize; - let entry_insn = ebpf::get_insn(&elf_bytes[text_section_range.clone()], entry_pc); - if !entry_insn.is_function_start_marker() { - return Err(ElfParserError::InvalidFileHeader); - } let mut function_registry = FunctionRegistry::::default(); let config = loader.get_config(); diff --git a/tests/elf.rs b/tests/elf.rs index fd97d9fe7..99e67e827 100644 --- a/tests/elf.rs +++ b/tests/elf.rs @@ -58,7 +58,12 @@ fn test_strict_header() { assert_eq!(err, ElfParserError::OutOfBounds); // Break the file header one byte at a time - let expected_results = std::iter::repeat_n(&Err(ElfParserError::InvalidFileHeader), 40) + let expected_results = std::iter::repeat_n(&Err(ElfParserError::InvalidFileHeader), 16) + .chain(std::iter::repeat_n(&Ok(()), 2)) + .chain(std::iter::repeat_n( + &Err(ElfParserError::InvalidFileHeader), + 22, + )) .chain(std::iter::repeat_n(&Ok(()), 12)) .chain(std::iter::repeat_n( &Err(ElfParserError::InvalidFileHeader), @@ -81,20 +86,9 @@ fn test_strict_header() { std::iter::repeat_n(&Err(ElfParserError::InvalidProgramHeader), 48) .chain(std::iter::repeat_n(&Ok(()), 8)) .collect::>(); - let expected_results_writable = - std::iter::repeat_n(&Err(ElfParserError::InvalidProgramHeader), 40) - .chain(std::iter::repeat_n(&Ok(()), 4)) - .chain(std::iter::repeat_n( - &Err(ElfParserError::InvalidProgramHeader), - 4, - )) - .chain(std::iter::repeat_n(&Ok(()), 8)) - .collect::>(); let expected_results = vec![ expected_results_readonly.iter(), expected_results_readonly.iter(), - expected_results_writable.iter(), - expected_results_writable.iter(), ]; for (header_index, expected_results) in expected_results.into_iter().enumerate() { for (offset, expected) in (std::mem::size_of::() @@ -114,19 +108,11 @@ fn test_strict_header() { // Check that an unaligned program header length fails { let mut elf_bytes = elf_bytes.clone(); - elf_bytes[0x60] = 0x29; - elf_bytes[0x68] = 0x29; + elf_bytes[0x98] = 0x29; + elf_bytes[0xA0] = 0x29; let err = ElfExecutable::load_with_strict_parser(&elf_bytes, loader.clone()).unwrap_err(); assert_eq!(err, ElfParserError::InvalidProgramHeader); } - - // Check that an entrypoint missing a function start marker fails - { - let mut elf_bytes = elf_bytes.clone(); - elf_bytes[0x1B8] = 0x00; - let err = ElfExecutable::load_with_strict_parser(&elf_bytes, loader.clone()).unwrap_err(); - assert_eq!(err, ElfParserError::InvalidFileHeader); - } } #[test] diff --git a/tests/elfs/elf.ld b/tests/elfs/elf.ld index 2d27d56ee..3b4a49c1c 100644 --- a/tests/elfs/elf.ld +++ b/tests/elfs/elf.ld @@ -1,14 +1,14 @@ SECTIONS { - .text 0x000000000 : { - *(.text*) - } :text - .rodata 0x100000000 : { + .rodata 0x000000000 : { *(.rodata*) *(.data.rel.ro*) BYTE(0); . = ALIGN(8); } :rodata + .text 0x100000000 : { + *(.text*) + } :text .bss.stack 0x200000000 (NOLOAD) : { _stack_start = .; . = . + 0x1000; @@ -37,8 +37,8 @@ SECTIONS PHDRS { - text PT_LOAD FLAGS(1); rodata PT_LOAD FLAGS(4); + text PT_LOAD FLAGS(1); stack PT_LOAD FLAGS(6); heap PT_LOAD FLAGS(6); dynsym PT_NULL FLAGS(0); diff --git a/tests/elfs/relative_call.so b/tests/elfs/relative_call.so old mode 100755 new mode 100644 index 3e5b0d954ddb43cc0d189112cdaad85c49d0dad4..2c6ac80355e03d1000f7911c3337ea6283e37645 GIT binary patch delta 241 zcmbQiGlR#l-qpvAiII^32ACPXGk|y+Kn$WCfEWZMSRgd>L_=XV5PJgSWJN}?i8Ev* zLCR(zOaN;GDQ27)D?jm#z{DeGCSPFTm^^`T=4L}CRz`CskR;p^5IYfwnSihYDy{&e zL0}pX3jxK!j+vaxoXb;`pORRT$e>q}T2V6j8FLjQ)8s@J@yR<_6eKx;ib1Ym17a8e PJ8g0yi~8mpEDnqSabzL1 delta 253 zcmbQiGlR#l-qpvAiII^32ACPx!8{G9fCH44V1Y1LCK?K}fs{{RoUF(wHgSfGBuGYs z391fA!3<-Z7%M;VjljesXC}{JoVi((iI>qFCI{33)sP6JnSgpKpnL@=Jq<_;0mZ@U zCg(Ee@|2`jlrZQO<)`Y+YjFUr|a(RmKQxZ!O8T3k0D@rDx nW2&0m!OSyx0t*Y{gvm3R)fqV_J2DGHjGP?FtiJgGvjZalt;!=h delta 174 zcmZqRYTz=gclB{&Vq|210cHkvBpw5U1407KVwq?t%nDLIVR9m)_{149tSmszhKY^h z6BA@6z7d#sb%D#U-qpvAiII^32ACPXGr)Kt+5svNzzkt9Pc#%}WdX7$OipAJpEyH?6{Kpx z#76On2{IGk2uwV3hATC%q^PnWKQpgnau=f%8%X0+hRM4a&&b0}W?KRmLxLhm84dbOqOG=ntX$qXYvCU7RCvaUoxvRa!#JeEDW)9@=9j) J%>pbAi~vOSDAWJ| delta 207 zcmcb>b%D#U-qpvAiII^32ACPxk$4OY4p4~zW(b32qMKVB(Q8lNT_Gh=G($g=k?&%_}LYEXdEyE1A5D@r*nZSQw;$3#uRlNDDDQ z9Wi++Q!YQAe#xxP$Ub=@GsGDiCa+{x-z>o5 Gzz6`iSSF(Y diff --git a/tests/elfs/reloc_64_relative_data.so b/tests/elfs/reloc_64_relative_data.so index 1f27d5ec8c52a27b5348a8cc526dcf1668f9dd3b..ceebeeba43e256efb311ff35396005dd5b3a4aed 100755 GIT binary patch delta 315 zcmX@WwS&vB-qpvAiII^32ACPXGr)Kt+5swI!3<$APc#%}WdX7$OipAJpEyH?6{PCG z#71#W1&9g;g^3Hr86QmCX$~Yl<}*G3D%796gHdI&E+dbm1W-9lAxM3t07Tc+$qyN) z$}@pEAQKfJ!VIcFS`g?WFn{t?rd*z){FKC!Lcic=>r0T z$qSj~89666G7Iy9gbqN(6(&DqRu_a=0anNWVn3KH$)b-U3i9cL$&oDfK&Q_Hk`|M1 Qve36aaA;7^Y6X z#i%fOB_sD_4Hn+X4;g#qL9!44vq%-l6=Yxn>t~$Y%aqGgl3G#1pjVWil30>BnT@%M zk!^A#vpA#1W-qpvAiII^32ACPXGr)Kt+5svN!3<$APc#%}WdX7$OipAJpEyH?6{Kpx z#76On2{IGk2uwV3X7Ub30Y!E$hRDaubtEJyA+z}8AIu7poIqtDBiO*oAq3btlQ%M}ZW-qpvAiII^32ACPxk$4OY4p4~*W(b32qMKVB(Q8hU{DrwGuF6fi#F&DF6|l3ZWRZpftnegN$e8nZP`dIu59KD3BHc z>jW|;uVu>RDM_s;VbCkePf09EoUF!N#mF{!A+z}8AIu7p>_9aj%@AXN3?KmUcTC>M LtiD--#eoq3Rn8!B diff --git a/tests/elfs/strict_header.so b/tests/elfs/strict_header.so old mode 100755 new mode 100644 index 48e7b34189feabb9dbfb98fa2ce9d50edf955b31..c5e9d52ee054c2111ca106d942d455920cbd03e4 GIT binary patch delta 258 zcmdnMy@A`X-qpvAiII^32ACPXGk|y+Kn$WCfEWZeFhgkOiH5?gEI{^z$%%~O6KBY< zf>bS-*eE_RL1y9`fr&@XsA@r!!bx^62vY)K4FkjErHtB>A27Z%X97#Y>;!QFftV3& zJ6MW=141#>0cjxyCWzZ6voh!M6y>KRmLxLhm84dbOs-?Dnry+sGueTag>wSbDuKy@ YEb@$;lRq*G^MV};6?fPi$P&*805@(UPXGV_ delta 252 zcmdnMy@A`X-qpvAiII^32ACPx!8{G9fCH4?zzkuqOf(c`1u35}IgwF(;tUy979i)s z#76On2{IGk2uwV3MwFckqE-TCERbfLyp>U#Qwt)&z%cnH<5zQ-Gy?<7wm_gfBLfpy z6-br?s=f|L3jt-o>L#-?=kk=KR+KR473HTSmLyKDW3HNP!NS7}Qau4`s>5VK7I{YY U$sd`8c|k%KpyC3X16kr30Tvk{?*IS* diff --git a/tests/elfs/struct_func_pointer.so b/tests/elfs/struct_func_pointer.so index 5f4bb05c7ca5486d1992f4c4ac1c1dd039486552..0cd2288ccc806565dade618916a179f668820c34 100755 GIT binary patch delta 174 zcmeC+>fkc0clB{&Vq|210cM8p3@{#uc7RH7Fhdy36Agt~S%B;blM@-mC(e*z1*w`b zu~B?tg3QD>0uzs%nS6kmWAX$>#mPGv=dv?_wJ}bPWy<9#%1=owNo3F~Nv$ZEe2uA! lk!f-uv-so{%nFj6KxH6<*ucsm1lZuoiOlMoPcS<$0stE{AdUb4 delta 170 zcmeC+>fkc0clB{&Vq|210cHkvBpw5U15|>88Ny(hXei7IQa)jFBBS`k88WOaK+cAV zjp7p%WG225n0VyOC`vI7kODP;m;7y$7%OipB0-+Y4Efe`@jWgc|^ diff --git a/tests/elfs/syscall_static.so b/tests/elfs/syscall_static.so index a3c0bc41d43055ff91fc33c8cbf14b4339240272..0c847b723398b0bea39a505dcaa95c6261d4c311 100755 GIT binary patch delta 212 zcmbQiHG|8r-qpvAiII^32ACPXGr)Kt+5svd!3<$APc#%}WdX7$OipAJpEyH?6{Kp$ z#76On2{IGk2uwV3Ml&rxp9`d#9ZWJXNWcsP2?D`(CI$wO5mP5`WE7u#fpHo;Pyh%R zC+9Nd@)YH#B$gyH=#`{aluUlcRK+MXIgwd>@(yMNNluU=AZ7!ph61qllM9*EH{W1( GU<3d>Xd>zW delta 227 zcmbQiHG|8r-qpvAiII^32ACPxk$4OY4p0dRW(b32qMKVB(Q8HtbvwwGuF6fi#G@or!?~q`DP|{~i9Cy&a;AVJehP%g^VUe1>rr zJ5=A~T&7%}lGKV42EC&El*E$6$R diff --git a/tests/execution.rs b/tests/execution.rs index 41fd2c562..c335e44e1 100644 --- a/tests/execution.rs +++ b/tests/execution.rs @@ -2659,7 +2659,7 @@ fn test_syscall_static() { ( "log" => syscalls::SyscallString::vm, ), - TestContextObject::new(6), + TestContextObject::new(4), ProgramResult::Ok(0), ); } @@ -2763,7 +2763,7 @@ fn test_reloc_64_relative_data() { config, [], (), - TestContextObject::new(4), + TestContextObject::new(3), ProgramResult::Ok(ebpf::MM_RODATA_START), ); }