Validate.bpf_check.op: def of bend-osdev-bpf@0.1.0.0 Import: import bend-osdev-bpf@0.1.0.0/validate.bend as Validate Lines 80-100 of bend-osdev-bpf@0.1.0.0/validate.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-bpf@0.1.0.0/validate.bend&start_line=80&end_line=100 import Base import bend-osdev-bpf@0.1.0.0/insn.bend as I # the checks of one instruction at index pc, with r instructions after it def bpf_check.op(op: I.BpfOp, +pc: Nat, +r: Nat) -> Result<&2, &2, I.BpfError, Unit>: match op: case I.BpfLdMem{k}: bpf_check.mem(k, pc, r) case I.BpfLdxMem{k}: bpf_check.mem(k, pc, r) case I.BpfSt{k}: bpf_check.mem(k, pc, r) case I.BpfStx{k}: bpf_check.mem(k, pc, r) case I.BpfAlu{o, src}: bpf_both(bpf_check.div(o, src, pc), bpf_check.next(pc, r)) case I.BpfJa{k}: bpf_chk(Nat.is_lt(U32.to_nat(k), r), I.BpfErrJump{pc}) case I.BpfJmp{c, src, jt, jf}: bpf_check.jmp(jt, jf, pc, r) case I.BpfRet{v}: Done{Unit{}} case other: bpf_check.next(pc, r) Uses (13): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_lt https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.to_nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Unit https://jend.leeeet.dev/definition.txt?path=bend-osdev-bpf@0.1.0.0/insn.bend&name=BpfError https://jend.leeeet.dev/definition.txt?path=bend-osdev-bpf@0.1.0.0/insn.bend&name=BpfOp https://jend.leeeet.dev/definition.txt?path=bend-osdev-bpf@0.1.0.0/validate.bend&name=bpf_both https://jend.leeeet.dev/definition.txt?path=bend-osdev-bpf@0.1.0.0/validate.bend&name=bpf_check.div https://jend.leeeet.dev/definition.txt?path=bend-osdev-bpf@0.1.0.0/validate.bend&name=bpf_check.jmp https://jend.leeeet.dev/definition.txt?path=bend-osdev-bpf@0.1.0.0/validate.bend&name=bpf_check.mem https://jend.leeeet.dev/definition.txt?path=bend-osdev-bpf@0.1.0.0/validate.bend&name=bpf_check.next https://jend.leeeet.dev/definition.txt?path=bend-osdev-bpf@0.1.0.0/validate.bend&name=bpf_chk