Source-mapped Linux eBPF verifier error diagnostics.
Parses instruction indices (N: (op) ..., insn N, insn #N, from A to B)
from Linux kernel verifier logs and annotates them with the originating
Elixir MaeBPF.Plug module, file:line, and operation description recorded
by MaeBPF.Compiler.Pure.compile_ir/2.
Summary
Functions
Formats a Linux kernel eBPF verifier log by mapping instruction offsets back
to their originating Elixir MaeBPF.Plug module, source file, and line.
Looks up an instruction offset in a single-program or multi-program
source_map (or a use MaeBPF module atom).
Extracts all instruction offsets mentioned in a kernel verifier log string, in order of appearance.
Functions
Formats a Linux kernel eBPF verifier log by mapping instruction offsets back
to their originating Elixir MaeBPF.Plug module, source file, and line.
source_map may be:
- A single program map
%{insn_idx => %{plug: ..., file: ..., line: ..., desc: ...}} - A multi-program map
%{prog_c_name => %{insn_idx => ...}}(passprogram: nameto select a specific program) - A
use MaeBPFmodule atom
Looks up an instruction offset in a single-program or multi-program
source_map (or a use MaeBPF module atom).
Returns {:ok, %{program: prog_name, insn: idx, plug: mod, file: file, line: line, desc: desc}}
or :error.
Extracts all instruction offsets mentioned in a kernel verifier log string, in order of appearance.