Lines Matching refs:ebpf
9 ebpf::{self, Insn},
87 helpers: &HashMap<u32, ebpf::Helper>, in execute_program()
132 while insn_ptr * ebpf::INSN_SIZE < prog.len() { in execute_program()
133 let insn = ebpf::get_insn(prog, insn_ptr); in execute_program()
143 ebpf::LD_ABS_B => { in execute_program()
150 ebpf::LD_ABS_H => { in execute_program()
157 ebpf::LD_ABS_W => { in execute_program()
164 ebpf::LD_ABS_DW => { in execute_program()
172 ebpf::LD_IND_B => { in execute_program()
180 ebpf::LD_IND_H => { in execute_program()
188 ebpf::LD_IND_W => { in execute_program()
196 ebpf::LD_IND_DW => { in execute_program()
205 ebpf::LD_DW_IMM => { in execute_program()
206 let next_insn = ebpf::get_insn(prog, insn_ptr); in execute_program()
217 ebpf::LD_B_REG => { in execute_program()
225 ebpf::LD_H_REG => { in execute_program()
233 ebpf::LD_W_REG => { in execute_program()
247 ebpf::LD_DW_REG => { in execute_program()
257 ebpf::ST_B_IMM => unsafe { in execute_program()
262 ebpf::ST_H_IMM => unsafe { in execute_program()
268 ebpf::ST_W_IMM => unsafe { in execute_program()
274 ebpf::ST_DW_IMM => unsafe { in execute_program()
282 ebpf::ST_B_REG => unsafe { in execute_program()
287 ebpf::ST_H_REG => unsafe { in execute_program()
293 ebpf::ST_W_REG => unsafe { in execute_program()
299 ebpf::ST_DW_REG => unsafe { in execute_program()
305 ebpf::ST_W_XADD => unimplemented!(), in execute_program()
306 ebpf::ST_DW_XADD => unimplemented!(), in execute_program()
312 …ebpf::ADD32_IMM => reg[_dst] = (reg[_dst] as i32).wrapping_add(insn.imm) as u64, //((reg[_dst] & U… in execute_program()
313 …ebpf::ADD32_REG => reg[_dst] = (reg[_dst] as i32).wrapping_add(reg[_src] as i32) as u64, //((reg[_… in execute_program()
314 ebpf::SUB32_IMM => reg[_dst] = (reg[_dst] as i32).wrapping_sub(insn.imm) as u64, in execute_program()
315 ebpf::SUB32_REG => reg[_dst] = (reg[_dst] as i32).wrapping_sub(reg[_src] as i32) as u64, in execute_program()
316 ebpf::MUL32_IMM => reg[_dst] = (reg[_dst] as i32).wrapping_mul(insn.imm) as u64, in execute_program()
317 ebpf::MUL32_REG => reg[_dst] = (reg[_dst] as i32).wrapping_mul(reg[_src] as i32) as u64, in execute_program()
318 ebpf::DIV32_IMM if insn.imm as u32 == 0 => reg[_dst] = 0, in execute_program()
319 ebpf::DIV32_IMM => reg[_dst] = (reg[_dst] as u32 / insn.imm as u32) as u64, in execute_program()
320 ebpf::DIV32_REG if reg[_src] as u32 == 0 => reg[_dst] = 0, in execute_program()
321 ebpf::DIV32_REG => reg[_dst] = (reg[_dst] as u32 / reg[_src] as u32) as u64, in execute_program()
322 ebpf::OR32_IMM => reg[_dst] = (reg[_dst] as u32 | insn.imm as u32) as u64, in execute_program()
323 ebpf::OR32_REG => reg[_dst] = (reg[_dst] as u32 | reg[_src] as u32) as u64, in execute_program()
324 ebpf::AND32_IMM => reg[_dst] = (reg[_dst] as u32 & insn.imm as u32) as u64, in execute_program()
325 ebpf::AND32_REG => reg[_dst] = (reg[_dst] as u32 & reg[_src] as u32) as u64, in execute_program()
328 ebpf::LSH32_IMM => reg[_dst] = (reg[_dst] as u32).wrapping_shl(insn.imm as u32) as u64, in execute_program()
329 ebpf::LSH32_REG => reg[_dst] = (reg[_dst] as u32).wrapping_shl(reg[_src] as u32) as u64, in execute_program()
330 ebpf::RSH32_IMM => reg[_dst] = (reg[_dst] as u32).wrapping_shr(insn.imm as u32) as u64, in execute_program()
331 ebpf::RSH32_REG => reg[_dst] = (reg[_dst] as u32).wrapping_shr(reg[_src] as u32) as u64, in execute_program()
332 ebpf::NEG32 => { in execute_program()
336 ebpf::MOD32_IMM if insn.imm as u32 == 0 => (), in execute_program()
337 ebpf::MOD32_IMM => reg[_dst] = (reg[_dst] as u32 % insn.imm as u32) as u64, in execute_program()
338 ebpf::MOD32_REG if reg[_src] as u32 == 0 => (), in execute_program()
339 ebpf::MOD32_REG => reg[_dst] = (reg[_dst] as u32 % reg[_src] as u32) as u64, in execute_program()
340 ebpf::XOR32_IMM => reg[_dst] = (reg[_dst] as u32 ^ insn.imm as u32) as u64, in execute_program()
341 ebpf::XOR32_REG => reg[_dst] = (reg[_dst] as u32 ^ reg[_src] as u32) as u64, in execute_program()
342 ebpf::MOV32_IMM => reg[_dst] = insn.imm as u32 as u64, in execute_program()
343 ebpf::MOV32_REG => reg[_dst] = (reg[_src] as u32) as u64, in execute_program()
346 ebpf::ARSH32_IMM => { in execute_program()
350 ebpf::ARSH32_REG => { in execute_program()
354 ebpf::LE => { in execute_program()
362 ebpf::BE => { in execute_program()
372 ebpf::ADD64_IMM => reg[_dst] = reg[_dst].wrapping_add(insn.imm as u64), in execute_program()
373 ebpf::ADD64_REG => reg[_dst] = reg[_dst].wrapping_add(reg[_src]), in execute_program()
374 ebpf::SUB64_IMM => reg[_dst] = reg[_dst].wrapping_sub(insn.imm as u64), in execute_program()
375 ebpf::SUB64_REG => reg[_dst] = reg[_dst].wrapping_sub(reg[_src]), in execute_program()
376 ebpf::MUL64_IMM => reg[_dst] = reg[_dst].wrapping_mul(insn.imm as u64), in execute_program()
377 ebpf::MUL64_REG => reg[_dst] = reg[_dst].wrapping_mul(reg[_src]), in execute_program()
378 ebpf::DIV64_IMM if insn.imm == 0 => reg[_dst] = 0, in execute_program()
379 ebpf::DIV64_IMM => reg[_dst] /= insn.imm as u64, in execute_program()
380 ebpf::DIV64_REG if reg[_src] == 0 => reg[_dst] = 0, in execute_program()
381 ebpf::DIV64_REG => reg[_dst] /= reg[_src], in execute_program()
382 ebpf::OR64_IMM => reg[_dst] |= insn.imm as u64, in execute_program()
383 ebpf::OR64_REG => reg[_dst] |= reg[_src], in execute_program()
384 ebpf::AND64_IMM => reg[_dst] &= insn.imm as u64, in execute_program()
385 ebpf::AND64_REG => reg[_dst] &= reg[_src], in execute_program()
386 ebpf::LSH64_IMM => reg[_dst] <<= insn.imm as u64 & SHIFT_MASK_64, in execute_program()
387 ebpf::LSH64_REG => reg[_dst] <<= reg[_src] & SHIFT_MASK_64, in execute_program()
388 ebpf::RSH64_IMM => reg[_dst] >>= insn.imm as u64 & SHIFT_MASK_64, in execute_program()
389 ebpf::RSH64_REG => reg[_dst] >>= reg[_src] & SHIFT_MASK_64, in execute_program()
390 ebpf::NEG64 => reg[_dst] = -(reg[_dst] as i64) as u64, in execute_program()
391 ebpf::MOD64_IMM if insn.imm == 0 => (), in execute_program()
392 ebpf::MOD64_IMM => reg[_dst] %= insn.imm as u64, in execute_program()
393 ebpf::MOD64_REG if reg[_src] == 0 => (), in execute_program()
394 ebpf::MOD64_REG => reg[_dst] %= reg[_src], in execute_program()
395 ebpf::XOR64_IMM => reg[_dst] ^= insn.imm as u64, in execute_program()
396 ebpf::XOR64_REG => reg[_dst] ^= reg[_src], in execute_program()
397 ebpf::MOV64_IMM => reg[_dst] = insn.imm as u64, in execute_program()
398 ebpf::MOV64_REG => reg[_dst] = reg[_src], in execute_program()
399 ebpf::ARSH64_IMM => { in execute_program()
402 ebpf::ARSH64_REG => { in execute_program()
408 ebpf::JA => do_jump(&mut insn_ptr, &insn), in execute_program()
409 ebpf::JEQ_IMM => { in execute_program()
414 ebpf::JEQ_REG => { in execute_program()
419 ebpf::JGT_IMM => { in execute_program()
424 ebpf::JGT_REG => { in execute_program()
429 ebpf::JGE_IMM => { in execute_program()
434 ebpf::JGE_REG => { in execute_program()
439 ebpf::JLT_IMM => { in execute_program()
444 ebpf::JLT_REG => { in execute_program()
449 ebpf::JLE_IMM => { in execute_program()
454 ebpf::JLE_REG => { in execute_program()
459 ebpf::JSET_IMM => { in execute_program()
464 ebpf::JSET_REG => { in execute_program()
469 ebpf::JNE_IMM => { in execute_program()
474 ebpf::JNE_REG => { in execute_program()
479 ebpf::JSGT_IMM => { in execute_program()
484 ebpf::JSGT_REG => { in execute_program()
489 ebpf::JSGE_IMM => { in execute_program()
494 ebpf::JSGE_REG => { in execute_program()
499 ebpf::JSLT_IMM => { in execute_program()
504 ebpf::JSLT_REG => { in execute_program()
509 ebpf::JSLE_IMM => { in execute_program()
514 ebpf::JSLE_REG => { in execute_program()
521 ebpf::JEQ_IMM32 => { in execute_program()
526 ebpf::JEQ_REG32 => { in execute_program()
531 ebpf::JGT_IMM32 => { in execute_program()
536 ebpf::JGT_REG32 => { in execute_program()
541 ebpf::JGE_IMM32 => { in execute_program()
546 ebpf::JGE_REG32 => { in execute_program()
551 ebpf::JLT_IMM32 => { in execute_program()
556 ebpf::JLT_REG32 => { in execute_program()
561 ebpf::JLE_IMM32 => { in execute_program()
566 ebpf::JLE_REG32 => { in execute_program()
571 ebpf::JSET_IMM32 => { in execute_program()
576 ebpf::JSET_REG32 => { in execute_program()
581 ebpf::JNE_IMM32 => { in execute_program()
586 ebpf::JNE_REG32 => { in execute_program()
591 ebpf::JSGT_IMM32 => { in execute_program()
596 ebpf::JSGT_REG32 => { in execute_program()
601 ebpf::JSGE_IMM32 => { in execute_program()
606 ebpf::JSGE_REG32 => { in execute_program()
611 ebpf::JSLT_IMM32 => { in execute_program()
616 ebpf::JSLT_REG32 => { in execute_program()
621 ebpf::JSLE_IMM32 => { in execute_program()
626 ebpf::JSLE_REG32 => { in execute_program()
634 ebpf::CALL => { in execute_program()
653 if stacks.len() >= ebpf::RBPF_MAX_CALL_DEPTH{ in execute_program()
656 insn_ptr, ebpf::RBPF_MAX_CALL_DEPTH in execute_program()
685 ebpf::TAIL_CALL => unimplemented!(), in execute_program()
686 ebpf::EXIT => { in execute_program()