bpfcompat evidence schema (v0.1)

June 20, 2026 · View on GitHub

The compatibility report is bpfcompat's core artifact: a portable, machine-readable record of whether a compiled eBPF object loads (and attaches) on each target kernel, with a classified reason when it does not. The classification taxonomy and this stable format — not the VM layer — are what make the evidence reusable across CI, dashboards, and audits.

Top level

FieldTypeNotes
schema_versionstringAlways present. Gate on this.
runobject{ id, started_at }
artifactobject{ path, basename, sha256, size_bytes } — the validated .bpf.o
matrixobject{ path, name?, profiles[] } — the kernel set requested
targets[]arrayone entry per kernel profile (below)
summaryobject{ status, notes[]? } — roll-up verdict (pass/fail)
pathsobject{ run_dir, json, markdown? }

targets[] — per-kernel result

FieldTypeNotes
profile_idstringe.g. ubuntu-22.04-5.15
requiredboolwhether a failure here fails the gate
statusstringpass | fail | partial | infra_error
profile / hostobject{ distro, version, kernel_family, kernel, arch } (requested vs actual)
validationobject{ load_status, load_error_code, load_error, attach_mode, attach_status, attach_attempted, attach_passed, attach_failed }
functionalobjectoptional behavior tests: { status, tests[] }
btfobject{ kernel_btf_available, artifact_has_btf, artifact_has_btf_ext }
failed_stagestringload | attach | functional
classification_codeenumwhy it failed — see taxonomy below
classification_confidencestringhigh | medium | low
classification_reasonstringhuman-readable explanation
started_at / finished_at / duration_mstiming
validator_exit / notes[]validator detail

Sanitized (public) reports omit host internals

When BPFCOMPAT_API_REDACT_RUNTIME_DETAILS is set (the public demo posture), the server strips host-revealing fields before returning a report: vm_run_dir, qemu_command, serial_log, validator_result, and any absolute audit paths. Self-hosted runs (your own CI, the CLI) keep the full detail locally.

Classification taxonomy

The stable set of classification_code values, each with the remediation bpfcompat suggests. This is the part that turns a raw libbpf/verifier error into an actionable cause — and the part that compounds in value as more real-world failures are catalogued.

CodeMeaningTypical remediation
MISSING_BTFKernel has no embedded BTF for CO-RENon-CO-RE fallback, external BTF (BTFHub), or drop the CO-RE dependency for that band
CORE_RELOCATION_FAILUREA CO-RE relocation could not be appliedValidate against the target BTF layout; ship a profile-specific variant where field layouts diverge
UNSUPPORTED_PROGRAM_TYPEProgram type not available on this kernelOlder-kernel-compatible variant (e.g. avoid fentry/fexit before 5.5)
UNSUPPORTED_MAP_TYPEMap type not available (e.g. ringbuf < 5.8)Map-compatible fallback (e.g. perfbuf instead of ringbuf)
UNSUPPORTED_ATTACH_TYPEAttach/hook not availableChange the hook strategy, or make attach optional in the manifest
POLICY_DENIEDHost policy blocked load/attachCheck kernel lockdown, unprivileged-BPF sysctl, capabilities, runner policy
CAPABILITY_FAILUREA probed helper/map/prog capability failedCompare against the target profile; select a compatible variant
VERIFIER_REJECTIONThe verifier rejected the programInspect the validator/libbpf log in the report
FUNCTIONAL_TEST_FAILURELoaded, but a behavior test failedInspect the functional command output / project test assets

Consumers should treat unknown codes as a generic failure (forward-compatible).

Minimal example

{
  "schema_version": "v0.1",
  "run": { "id": "20260611T194515Z-33a59b", "started_at": "2026-06-11T19:46:48Z" },
  "artifact": { "basename": "bpf_probe.o", "sha256": "4895…2722", "size_bytes": 1127120 },
  "matrix": { "name": "falco-modern-bpf-proof", "profiles": ["ubuntu-20.04-5.4", "ubuntu-24.04-6.8"] },
  "summary": { "status": "pass" },
  "targets": [
    { "profile_id": "ubuntu-24.04-6.8", "required": true, "status": "pass",
      "btf": { "kernel_btf_available": true } },
    { "profile_id": "ubuntu-20.04-5.4", "required": false, "status": "fail",
      "failed_stage": "load", "classification_code": "UNSUPPORTED_MAP_TYPE",
      "classification_confidence": "high",
      "classification_reason": "map ringbuf_maps failed to create (-22); ring buffer requires kernel >= 5.8" }
  ]
}