Home
last modified time | relevance | path

Searched refs:mbuff (Results 1 – 4 of 4) sorted by relevance

/DragonOS/kernel/crates/rbpf/src/
H A Dlib.rs298 pub fn execute_program(&self, mem: &[u8], mbuff: &[u8]) -> Result<u64, Error> { in execute_program()
299 interpreter::execute_program(self.prog, mem, mbuff, &self.helpers) in execute_program()
390 mbuff: &'a mut [u8], in execute_program_jit()
405 mbuff.as_ptr() as *mut u8, in execute_program_jit()
406 mbuff.len(), in execute_program_jit()
501 mbuff: &'a mut [u8], in execute_program_cranelift()
517 Ok(prog.execute(mem_ptr, mem.len(), mbuff.as_ptr() as *mut u8, mbuff.len())) in execute_program_cranelift()
596 mbuff: MetaBuff, field
627 let mbuff = MetaBuff { in new() localVariable
632 Ok(EbpfVmFixedMbuff { parent, mbuff }) in new()
[all …]
H A Dinterpreter.rs22 mbuff: &[u8], in check_mem()
35 mbuff.as_ptr() as u64, in check_mem()
36 mbuff.len(), in check_mem()
51 mbuff: &[u8], in check_mem()
56 if mbuff.as_ptr() as u64 <= addr && addr_end <= mbuff.as_ptr() as u64 + mbuff.len() as u64 { in check_mem()
70 mbuff.as_ptr() as u64, mbuff.len(), in check_mem()
86 mbuff: &[u8], in execute_program()
116 if !mbuff.is_empty() { in execute_program()
117 reg[1] = mbuff.as_ptr() as u64; in execute_program()
123 check_mem(addr, len, "load", insn_ptr, mbuff, mem, stack) in execute_program()
[all …]
/DragonOS/kernel/crates/rbpf/tests/
H A Dmisc.rs238 let mbuff = [0u8; 32]; in test_vm_mbuff() localVariable
240 let mut data = mbuff.as_ptr().offset(8) as *mut u64; in test_vm_mbuff()
241 let mut data_end = mbuff.as_ptr().offset(24) as *mut u64; in test_vm_mbuff()
247 assert_eq!(vm.execute_program(mem, &mbuff).unwrap(), 0x2211); in test_vm_mbuff()
272 let mbuff = [0u8; 32]; in test_vm_mbuff_with_rust_api() localVariable
274 let mut data = mbuff.as_ptr().offset(8) as *mut u64; in test_vm_mbuff_with_rust_api()
275 let mut data_end = mbuff.as_ptr().offset(24) as *mut u64; in test_vm_mbuff_with_rust_api()
281 assert_eq!(vm.execute_program(mem, &mbuff).unwrap(), 0x2211); in test_vm_mbuff_with_rust_api()
296 let mut mbuff = [0u8; 32]; in test_jit_mbuff() localVariable
298 let mut data = mbuff.as_ptr().offset(8) as *mut u64; in test_jit_mbuff()
[all …]
/DragonOS/kernel/crates/rbpf/
H A DREADME.md216 mbuff: &'a mut [u8]) -> Result<(u64), Error>
242 mbuff: &'a mut [u8]) -> Result<(u64), Error>
333 // Load mem from mbuff at offset 8 into R1
345 let mut mbuff = &mut [0u8; 32];
347 let mut data = mbuff.as_ptr().offset(8) as *mut u64;
348 let mut data_end = mbuff.as_ptr().offset(24) as *mut u64;
357 assert_eq!(vm.execute_program(mem, mbuff).unwrap(), 0x2211);
366 assert_eq!(vm.execute_program_jit(mem, mbuff).unwrap(), 0x2211);