def huge.read

bend-osdev-bpf@0.1.0.0 · check.bend:149

import bend-osdev-bpf@0.1.0.0/check.bend as Check
import Base
import bend-osdev-bpf@0.1.0.0/insn.bend as I
import bend-osdev-bpf@0.1.0.0/validate.bend as V

149# Untrusted input of 32768 instructions (256 KB): refused by bpf_of_octets
150# at its default limit (8 * BPF_MAXINSNS bytes) before the rest is read, and,
151# read with a higher limit, decoded and refused by validation as too long
152def huge.read(r: Result<&2, &2, I.BpfError, List<&2, I.BpfRaw>>) -> String:
153  match r:
154    case Done{raws}:
155      show_ok(big.prep(V.bpf_prepare(V.bpf_maxinsns(), raws)))
156    case Fail{e}:
157      "error: " ++ I.BpfError.show(e)

Uses (11)

Used by (1)