Lines Matching refs:insn_ptr
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()
134 check_load_dw(prog, insn_ptr)?; in check()
135 insn_ptr += 1; in check()
189 check_imm_endian(&insn, insn_ptr)?; in check()
192 check_imm_endian(&insn, insn_ptr)?; in check()
224 check_jmp_offset(prog, insn_ptr)?; in check()
227 check_jmp_offset(prog, insn_ptr)?; in check()
230 check_jmp_offset(prog, insn_ptr)?; in check()
233 check_jmp_offset(prog, insn_ptr)?; in check()
236 check_jmp_offset(prog, insn_ptr)?; in check()
239 check_jmp_offset(prog, insn_ptr)?; in check()
242 check_jmp_offset(prog, insn_ptr)?; in check()
245 check_jmp_offset(prog, insn_ptr)?; in check()
248 check_jmp_offset(prog, insn_ptr)?; in check()
251 check_jmp_offset(prog, insn_ptr)?; in check()
254 check_jmp_offset(prog, insn_ptr)?; in check()
257 check_jmp_offset(prog, insn_ptr)?; in check()
260 check_jmp_offset(prog, insn_ptr)?; in check()
263 check_jmp_offset(prog, insn_ptr)?; in check()
266 check_jmp_offset(prog, insn_ptr)?; in check()
269 check_jmp_offset(prog, insn_ptr)?; in check()
272 check_jmp_offset(prog, insn_ptr)?; in check()
275 check_jmp_offset(prog, insn_ptr)?; in check()
278 check_jmp_offset(prog, insn_ptr)?; in check()
281 check_jmp_offset(prog, insn_ptr)?; in check()
284 check_jmp_offset(prog, insn_ptr)?; in check()
287 check_jmp_offset(prog, insn_ptr)?; in check()
290 check_jmp_offset(prog, insn_ptr)?; in check()
295 check_jmp_offset(prog, insn_ptr)?; in check()
298 check_jmp_offset(prog, insn_ptr)?; in check()
301 check_jmp_offset(prog, insn_ptr)?; in check()
304 check_jmp_offset(prog, insn_ptr)?; in check()
307 check_jmp_offset(prog, insn_ptr)?; in check()
310 check_jmp_offset(prog, insn_ptr)?; in check()
313 check_jmp_offset(prog, insn_ptr)?; in check()
316 check_jmp_offset(prog, insn_ptr)?; in check()
319 check_jmp_offset(prog, insn_ptr)?; in check()
322 check_jmp_offset(prog, insn_ptr)?; in check()
325 check_jmp_offset(prog, insn_ptr)?; in check()
328 check_jmp_offset(prog, insn_ptr)?; in check()
331 check_jmp_offset(prog, insn_ptr)?; in check()
334 check_jmp_offset(prog, insn_ptr)?; in check()
337 check_jmp_offset(prog, insn_ptr)?; in check()
340 check_jmp_offset(prog, insn_ptr)?; in check()
343 check_jmp_offset(prog, insn_ptr)?; in check()
346 check_jmp_offset(prog, insn_ptr)?; in check()
349 check_jmp_offset(prog, insn_ptr)?; in check()
352 check_jmp_offset(prog, insn_ptr)?; in check()
355 check_jmp_offset(prog, insn_ptr)?; in check()
358 check_jmp_offset(prog, insn_ptr)?; in check()
375 check_registers(&insn, store, insn_ptr)?; in check()
377 insn_ptr += 1; in check()
381 if insn_ptr != prog.len() / ebpf::INSN_SIZE { in check()