Lines Matching refs:insn_ptr

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()
131 let mut insn_ptr: usize = 0; in execute_program() localVariable
132 while insn_ptr * ebpf::INSN_SIZE < prog.len() { in execute_program()
133 let insn = ebpf::get_insn(prog, insn_ptr); in execute_program()
134 insn_ptr += 1; in execute_program()
146 check_mem_load(stacks.last().unwrap().as_slice(), x as u64, 8, insn_ptr)?; in execute_program()
153 check_mem_load(stacks.last().unwrap().as_slice(), x as u64, 8, insn_ptr)?; in execute_program()
160 check_mem_load(stacks.last().unwrap().as_slice(), x as u64, 8, insn_ptr)?; in execute_program()
168 check_mem_load(stacks.last().unwrap().as_slice(), x as u64, 8, insn_ptr)?; in execute_program()
176 check_mem_load(stacks.last().unwrap().as_slice(), x as u64, 8, insn_ptr)?; in execute_program()
184 check_mem_load(stacks.last().unwrap().as_slice(), x as u64, 8, insn_ptr)?; in execute_program()
192 check_mem_load(stacks.last().unwrap().as_slice(), x as u64, 8, insn_ptr)?; in execute_program()
200 check_mem_load(stacks.last().unwrap().as_slice(), x as u64, 8, insn_ptr)?; in execute_program()
206 let next_insn = ebpf::get_insn(prog, insn_ptr); in execute_program()
207 insn_ptr += 1; in execute_program()
221 check_mem_load(stacks.last().unwrap().as_slice(), x as u64, 1, insn_ptr)?; in execute_program()
229 check_mem_load(stacks.last().unwrap().as_slice(), x as u64, 2, insn_ptr)?; in execute_program()
237 check_mem_load(stacks.last().unwrap().as_slice(), x as u64, 4, insn_ptr)?; in execute_program()
251 check_mem_load(stacks.last().unwrap().as_slice(), x as u64, 8, insn_ptr)?; in execute_program()
259 check_mem_store(stacks.last().unwrap().as_slice(), x as u64, 1, insn_ptr)?; in execute_program()
265 check_mem_store(stacks.last().unwrap().as_slice(), x as u64, 2, insn_ptr)?; in execute_program()
271 check_mem_store(stacks.last().unwrap().as_slice(), x as u64, 4, insn_ptr)?; in execute_program()
277 check_mem_store(stacks.last().unwrap().as_slice(), x as u64, 8, insn_ptr)?; in execute_program()
284 check_mem_store(stacks.last().unwrap().as_slice(), x as u64, 1, insn_ptr)?; in execute_program()
290 check_mem_store(stacks.last().unwrap().as_slice(), x as u64, 2, insn_ptr)?; in execute_program()
296 check_mem_store(stacks.last().unwrap().as_slice(), x as u64, 4, insn_ptr)?; in execute_program()
302 check_mem_store(stacks.last().unwrap().as_slice(), x as u64, 8, insn_ptr)?; in execute_program()
408 ebpf::JA => do_jump(&mut insn_ptr, &insn), in execute_program()
411 do_jump(&mut insn_ptr, &insn); in execute_program()
416 do_jump(&mut insn_ptr, &insn); in execute_program()
421 do_jump(&mut insn_ptr, &insn); in execute_program()
426 do_jump(&mut insn_ptr, &insn); in execute_program()
431 do_jump(&mut insn_ptr, &insn); in execute_program()
436 do_jump(&mut insn_ptr, &insn); in execute_program()
441 do_jump(&mut insn_ptr, &insn); in execute_program()
446 do_jump(&mut insn_ptr, &insn); in execute_program()
451 do_jump(&mut insn_ptr, &insn); in execute_program()
456 do_jump(&mut insn_ptr, &insn); in execute_program()
461 do_jump(&mut insn_ptr, &insn); in execute_program()
466 do_jump(&mut insn_ptr, &insn); in execute_program()
471 do_jump(&mut insn_ptr, &insn); in execute_program()
476 do_jump(&mut insn_ptr, &insn); in execute_program()
481 do_jump(&mut insn_ptr, &insn); in execute_program()
486 do_jump(&mut insn_ptr, &insn); in execute_program()
491 do_jump(&mut insn_ptr, &insn); in execute_program()
496 do_jump(&mut insn_ptr, &insn); in execute_program()
501 do_jump(&mut insn_ptr, &insn); in execute_program()
506 do_jump(&mut insn_ptr, &insn); in execute_program()
511 do_jump(&mut insn_ptr, &insn); in execute_program()
516 do_jump(&mut insn_ptr, &insn); in execute_program()
523 do_jump(&mut insn_ptr, &insn); in execute_program()
528 do_jump(&mut insn_ptr, &insn); in execute_program()
533 do_jump(&mut insn_ptr, &insn); in execute_program()
538 do_jump(&mut insn_ptr, &insn); in execute_program()
543 do_jump(&mut insn_ptr, &insn); in execute_program()
548 do_jump(&mut insn_ptr, &insn); in execute_program()
553 do_jump(&mut insn_ptr, &insn); in execute_program()
558 do_jump(&mut insn_ptr, &insn); in execute_program()
563 do_jump(&mut insn_ptr, &insn); in execute_program()
568 do_jump(&mut insn_ptr, &insn); in execute_program()
573 do_jump(&mut insn_ptr, &insn); in execute_program()
578 do_jump(&mut insn_ptr, &insn); in execute_program()
583 do_jump(&mut insn_ptr, &insn); in execute_program()
588 do_jump(&mut insn_ptr, &insn); in execute_program()
593 do_jump(&mut insn_ptr, &insn); in execute_program()
598 do_jump(&mut insn_ptr, &insn); in execute_program()
603 do_jump(&mut insn_ptr, &insn); in execute_program()
608 do_jump(&mut insn_ptr, &insn); in execute_program()
613 do_jump(&mut insn_ptr, &insn); in execute_program()
618 do_jump(&mut insn_ptr, &insn); in execute_program()
623 do_jump(&mut insn_ptr, &insn); in execute_program()
628 do_jump(&mut insn_ptr, &insn); in execute_program()
646 insn.imm as u32,BPF_FUNC_MAPPER[insn.imm as usize],insn_ptr in execute_program()
656 insn_ptr, ebpf::RBPF_MAX_CALL_DEPTH in execute_program()
663 pre_stack.save_return_address(insn_ptr as u16); in execute_program()
667 …log::trace!("BPF TO BPF CALL: new pc: {} + {} = {}",insn_ptr ,insn.imm,insn_ptr + insn.imm as usiz… in execute_program()
670 insn_ptr += insn.imm as usize; in execute_program()
677 insn.imm as u32,BPF_FUNC_MAPPER[insn.imm as usize],insn_ptr in execute_program()
696 insn_ptr = stack.get_return_address() as usize; in execute_program()
699 log::trace!("EXIT: new pc: {}", insn_ptr); in execute_program()