verify-prevail

작성자: microsoft

PREVAIL 검증기로부터 eBPF 프로그램 검증 실패를 진단합니다. 독립형 PREVAIL에서 검증된 리눅스 호환 eBPF 프로그램에 이 스킬을 사용하세요…

npx skills add https://github.com/microsoft/ebpf-for-windows --skill verify-prevail

Diagnose PREVAIL Verification Failures (Linux-Compatible Programs)

Diagnose eBPF program verification failures using the standalone PREVAIL verifier (external/ebpf-verifier). This skill covers linux-compatible eBPF programs that can be verified directly with the PREVAIL check or run_yaml tools.

When to Use

  • User shares a PREVAIL verifier error or log and asks why verification failed
  • User asks to diagnose, debug, or explain an eBPF verification failure in the PREVAIL repo (external/ebpf-verifier)
  • User asks to debug PREVAIL YAML test failures or abstract-interpretation issues
  • User is working on verifier internals (abstract domains, widening, transformers)
  • User mentions "verifier", "verification", "PREVAIL", or "abstract interpretation" errors for linux-compatible BPF programs

When NOT to Use

  • Program uses Windows-specific helpers or headers (e.g., ebpf_helpers.h, sample_ext_helpers.h, WFP hook types) → use verify-bpf instead
  • User wants to run the bpf2c pipeline (clang → bpf2c → native driver) → use verify-bpf instead
  • User needs to compile a .c BPF source to .o for ebpf-for-windows → use verify-bpf instead

Reference Document

Read the full PREVAIL diagnostic reference before diagnosing:

external/ebpf-verifier/docs/llm-context.md

This document contains:

  • How to interpret PREVAIL log output (register state, stack state, invariants)
  • Glossary of log terms, types, type groups, and assertions
  • Common failure patterns with symptoms, causes, and fixes
  • Advanced topics (widening, path-insensitivity, pointer provenance)
  • A step-by-step reasoning protocol for diagnosis

Always read this file first — it is the authoritative reference for PREVAIL diagnostics.

Diagnosis Instructions

Step 1: Read the Reference

Read external/ebpf-verifier/docs/llm-context.md to load the full diagnostic context.

Step 2: Gather the Error

Ask the user to provide (if not already given):

  1. The verifier error message (the line with <pc>: <message> (<assertion>))
  2. The pre-invariant at the failing instruction
  3. The 3–5 instructions leading up to the failure
  4. The source code of the eBPF program (or the relevant section)
  5. Any map or context definitions (for map/context-related errors)

Step 3: Identify the Failure Pattern

Using the reference document, match the error to one of the common failure patterns:

PatternKey Symptom
Uninitialized registerInvalid type (r<N>.type in {...})
Unbounded packet accessUpper bound must be at most packet_size
Stack out-of-boundsLower bound must be at least r10.stack_offset - EBPF_SUBPROGRAM_STACK_SIZE
Null pointer (map lookup)Possible null access
Type mismatchOnly pointers can be dereferenced
Pointer arithmetic errorOnly numbers can be added to pointers
Infinite loopLoop counter is too large (pc[N] < 100000)
Division by zeroPossible division by zero
Map key/value mismatchIllegal map update with a non-numerical value
Context bounds violationNonzero context offset or context Upper bound error
Lost correlation (verifier limitation)Bounds check present but verifier can't prove safety

Step 4: Trace the Root Cause

Follow the reasoning protocol from the reference:

  1. Check the pre-invariant — what types and constraints do the relevant registers have?
  2. Identify missing constraints — what constraint would make the assertion pass?
  3. Trace backwards — where was the constraint lost or never established?
  4. Check for verifier limitations — is this a code bug or a verifier precision issue?

Step 5: Recommend a Fix

Provide:

  1. A clear explanation of why verification failed
  2. The specific constraint that is missing or violated
  3. A concrete code fix (with before/after examples when possible)
  4. If it's a verifier limitation, suggest workarounds (direct pointer comparisons, restructured control flow, etc.)

Important Notes

  • PREVAIL is more conservative than the Linux kernel verifier — code accepted by Linux may be rejected by PREVAIL.
  • PREVAIL is path-insensitive — it uses a single abstract state per program point, so correlated conditions across branches may be lost.
  • Widening at loop headers can destroy constraints — if a loop-related failure occurs, check whether widening eliminated a needed bound.
  • Never assume a register has a type or constraint unless it appears in the pre-invariant.

microsoft의 다른 스킬

oss-growth
microsoft
OSS 성장 해커 페르소나
agent-framework-azure-ai-py
microsoft
Microsoft Agent Framework Python SDK(agent-framework-azure-ai)를 사용하여 Azure AI Foundry 에이전트를 구축합니다. AzureAIAgentsProvider로 지속적 에이전트를 만들 때, 호스팅 도구(코드 인터프리터, 파일 검색, 웹 검색)를 사용할 때, MCP 서버를 통합할 때, 대화 스레드를 관리할 때, 또는 스트리밍 응답을 구현할 때 사용합니다. 함수 도구, 구조화된 출력, 다중 도구 에이전트를 다룹니다.
development
airunway-aks-setup
microsoft
AKS에서 AI Runway 설정 — 빈 클러스터에서 실행 중인 모델까지. 클러스터 검증, 컨트롤러 설치, GPU 평가, 공급자 설정, 첫 배포를 다룹니다. 시기: "AI Runway 설정", "AKS 클러스터 온보딩", "AI Runway 설치", "airunway 설정", "AKS에 모델 배포", "AKS에서 GPU 추론", "AKS에서 KAITO 설정", "AKS에서 LLM 실행", "AKS에서 vLLM", "AKS에서 모델 서빙 설정", "AI Runway 컨트롤러".
devops
appinsights-instrumentation
microsoft
Azure Application Insights로 웹앱을 계측하기 위한 지침입니다. 원격 분석 패턴, SDK 설정, 구성 참조를 제공합니다. WHEN: 앱 계측 방법, App Insights SDK, 원격 분석 패턴, App Insights란 무엇인가, Application Insights 지침, 계측 예시, APM 모범 사례.
devops
applicationinsights-web-ts
microsoft
브라우저/웹 앱을 Application Insights JavaScript SDK(@microsoft/applicationinsights-web)로 계측합니다. Real User Monitoring(RUM) — 페이지 뷰, 클릭, AJAX/fetch 종속성, 예외, 사용자 지정 이벤트, 백엔드 OpenTelemetry 트레이스와 상관관계가 있는 브라우저 측 GenAI 에이전트 트레이스에 사용합니다. SDK Loader Script 및 npm 설정, 프레임워크 확장(React, React Native, Angular), Click Analytics, 텔레메트리 이니셜라이저, 브라우저에서 생성된 에이전트/도구/모델 스팬에 대한 OTel GenAI 의미론적 규칙을 다룹니다.
devops
azure-ai-anomalydetector-java
microsoft
Azure AI Anomaly Detector SDK for Java로 이상 탐지 애플리케이션을 구축하세요. 단변량/다변량 이상 탐지, 시계열 분석 또는 AI 기반 모니터링을 구현할 때 사용하세요.
development
azure-ai-language-conversations-py
microsoft
azure-ai-language-conversations Python SDK를 사용하여 대화형 언어 이해(CLU)를 구현합니다. ConversationAnalysisClient로 대화 의도와 엔터티를 분석하거나, NLP 기능을 구축하거나, 애플리케이션에 언어 이해를 통합할 때 사용합니다.
development
azure-ai-ml-py
microsoft
Azure Machine Learning SDK v2 for Python. ML 작업 영역, 작업, 모델, 데이터 세트, 컴퓨팅 및 파이프라인에 사용합니다. 트리거: "azure-ai-ml", "MLClient", "workspace", "model registry", "training jobs", "datasets".
development