/DragonOS/kernel/crates/rbpf/src/ |
H A D | verifier.rs | 56 fn check_imm_endian(insn: &ebpf::Insn, insn_ptr: usize) -> Result<(), Error> { in check_imm_endian() 65 fn check_load_dw(prog: &[u8], insn_ptr: usize) -> Result<(), Error> { in check_load_dw() 68 let next_insn = ebpf::get_insn(prog, insn_ptr + 1); in check_load_dw() 76 fn check_jmp_offset(prog: &[u8], insn_ptr: usize) -> Result<(), Error> { in check_jmp_offset() 77 let insn = ebpf::get_insn(prog, insn_ptr); in check_jmp_offset() 82 let dst_insn_ptr = insn_ptr as isize + 1 + insn.off as isize; in check_jmp_offset() 99 fn check_registers(insn: &ebpf::Insn, store: bool, insn_ptr: usize) -> Result<(), Error> { in check_registers() 116 let mut insn_ptr: usize = 0; in check() localVariable 117 while insn_ptr * ebpf::INSN_SIZE < prog.len() { in check() 118 let insn = ebpf::get_insn(prog, insn_ptr); in check() [all …]
|
H A D | interpreter.rs | 21 insn_ptr: usize, in check_mem() 31 insn_ptr in check_mem() 50 insn_ptr: usize, in check_mem() 69 access_type, insn_ptr, addr, len, in check_mem() 77 fn do_jump(insn_ptr: &mut usize, insn: &Insn) { in do_jump() 78 *insn_ptr = (*insn_ptr as i16 + insn.off) as usize; in do_jump() 122 |stack: &[u8], addr: u64, len: usize, insn_ptr: usize| -> Result<(), Error> { in execute_program() 123 check_mem(addr, len, "load", insn_ptr, mbuff, mem, stack) in execute_program() 126 |stack: &[u8], addr: u64, len: usize, insn_ptr: usize| -> Result<(), Error> { in execute_program() 127 check_mem(addr, len, "store", insn_ptr, mbuff, mem, stack) in execute_program() [all …]
|
H A D | cranelift.rs | 251 let mut insn_ptr: usize = 0; in translate_program() localVariable 252 while insn_ptr * ebpf::INSN_SIZE < prog.len() { in translate_program() 253 let insn = ebpf::get_insn(prog, insn_ptr); in translate_program() 256 if let Some(block) = self.insn_blocks.get(&(insn_ptr as u32)) { in translate_program() 267 bcx.set_srcloc(SourceLoc::new(insn_ptr as u32)); in translate_program() 318 insn_ptr += 1; in translate_program() 319 let next_insn = ebpf::get_insn(prog, insn_ptr); in translate_program() 818 let (_, target_block) = self.insn_targets[&(insn_ptr as u32)]; in translate_program() 867 let (fallthrough, target) = self.insn_targets[&(insn_ptr as u32)]; in translate_program() 944 insn_ptr += 1; in translate_program() [all …]
|
H A D | disassembler.rs | 214 let mut insn_ptr: usize = 0; in to_insn_vec() localVariable 216 while insn_ptr * ebpf::INSN_SIZE < prog.len() { in to_insn_vec() 217 let insn = ebpf::get_insn(prog, insn_ptr); in to_insn_vec() 258 insn_ptr += 1; in to_insn_vec() 259 let next_insn = ebpf::get_insn(prog, insn_ptr); in to_insn_vec() 742 insn.opc, insn_ptr in to_insn_vec() 759 insn_ptr += 1; in to_insn_vec()
|
H A D | jit.rs | 536 let mut insn_ptr: usize = 0; in jit_compile() localVariable 537 while insn_ptr * ebpf::INSN_SIZE < prog.len() { in jit_compile() 538 let insn = ebpf::get_insn(prog, insn_ptr); in jit_compile() 540 self.pc_locs[insn_ptr] = mem.offset; in jit_compile() 544 let target_pc = insn_ptr as isize + insn.off as isize + 1; in jit_compile() 575 insn_ptr += 1; in jit_compile() 576 let second_part = ebpf::get_insn(prog, insn_ptr).imm as u64; in jit_compile() 622 self.emit_muldivmod(mem, insn_ptr as u16, insn.opc, src, dst, insn.imm) in jit_compile() 683 self.emit_muldivmod(mem, insn_ptr as u16, insn.opc, src, dst, insn.imm) in jit_compile() 913 if insn_ptr != prog.len() / ebpf::INSN_SIZE - 1 { in jit_compile() [all …]
|
H A D | ebpf.rs | 627 let mut insn_ptr: usize = 0; in to_insn_vec() localVariable 629 while insn_ptr * INSN_SIZE < prog.len() { in to_insn_vec() 630 let insn = get_insn(prog, insn_ptr); in to_insn_vec() 632 insn_ptr += 1; in to_insn_vec()
|