Home
last modified time | relevance | path

Searched refs:INSN_SIZE (Results 1 – 7 of 7) sorted by relevance

/DragonOS/kernel/crates/rbpf/src/
H A Debpf.rs27 pub const INSN_SIZE: usize = 8; constant
29 pub const PROG_MAX_SIZE: usize = PROG_MAX_INSNS * INSN_SIZE;
476 pub fn to_array(&self) -> [u8; INSN_SIZE] { in to_array() argument
558 if (idx + 1) * INSN_SIZE > prog.len() { in get_insn()
566 opc: prog[INSN_SIZE * idx], in get_insn()
567 dst: prog[INSN_SIZE * idx + 1] & 0x0f, in get_insn()
568 src: (prog[INSN_SIZE * idx + 1] & 0xf0) >> 4, in get_insn()
569 off: LittleEndian::read_i16(&prog[(INSN_SIZE * idx + 2)..]), in get_insn()
570 imm: LittleEndian::read_i32(&prog[(INSN_SIZE * idx + 4)..]), in get_insn()
619 if prog.len() % INSN_SIZE != 0 { in to_insn_vec()
[all …]
H A Dverifier.rs31 if prog.len() % ebpf::INSN_SIZE != 0 { in check_prog_len()
34 ebpf::INSN_SIZE in check_prog_len()
41 prog.len() / ebpf::INSN_SIZE in check_prog_len()
48 let last_opc = ebpf::get_insn(prog, (prog.len() / ebpf::INSN_SIZE) - 1).opc; in check_prog_len()
83 if dst_insn_ptr < 0 || dst_insn_ptr as usize >= (prog.len() / ebpf::INSN_SIZE) { in check_jmp_offset()
117 while insn_ptr * ebpf::INSN_SIZE < prog.len() { in check()
381 if insn_ptr != prog.len() / ebpf::INSN_SIZE { in check()
H A Ddisassembler.rs203 if prog.len() % ebpf::INSN_SIZE != 0 { in to_insn_vec()
206 ebpf::INSN_SIZE in to_insn_vec()
216 while insn_ptr * ebpf::INSN_SIZE < prog.len() { in to_insn_vec()
H A Djit.rs534 self.pc_locs = vec![0; prog.len() / ebpf::INSN_SIZE + 1]; in jit_compile()
537 while insn_ptr * ebpf::INSN_SIZE < prog.len() { in jit_compile()
913 if insn_ptr != prog.len() / ebpf::INSN_SIZE - 1 { in jit_compile()
H A Dcranelift.rs252 while insn_ptr * ebpf::INSN_SIZE < prog.len() { in translate_program()
1085 while insn_ptr * ebpf::INSN_SIZE < prog.len() { in build_cfg()
H A Dinterpreter.rs132 while insn_ptr * ebpf::INSN_SIZE < prog.len() { in execute_program()
/DragonOS/kernel/crates/rbpf/tests/
H A Dubpf_verifier.rs142 let mut prog = (0..(1_000_000 * ebpf::INSN_SIZE)) in test_verifier_err_too_many_instructions()