Skip to content

KernelScript: Cross-Boundary Typed DSL for eBPF Applications

Jul 2026 · arXiv.org · Vol abs/2607.23900 · 0 citations · 26 references
Computer Science

TL;DR

KernelScript is presented, a DSL that types maps, program handles, and execution domains in one source, then compiles to standard C through the original toolchain, and rejects cross-boundary bugs at compile time that standard C/libbpf still builds and loads.

Abstract

eBPF lets developers extend Linux with custom packet processing, tracing, and scheduling logic, and a verifier proves before execution that the code will not crash the kernel. The programming model, however, is fragmented: a single application spans kernel code, a userspace loader, and shared maps, yet the relationships among these pieces go unchecked. E.g. A map or event type defined differently on each side silently corrupts shared state. We observe that these cross-boundary relationships duplicate information that a type system can unify. We present KernelScript, a DSL that types maps, program handles, and execution domains in one source, then compiles to standard C through the original toolchain. We evaluate KernelScript on 43 eBPF workloads covering XDP, TC, kprobe, tracepoint, and struct_ops. KernelScript rejects cross-boundary bugs at compile time that standard C/libbpf still builds and loads, a unified source shrinks the diffs for cross-boundary changes by 5x, and generated code remains compatible with the existing toolchain.

View source

Similar papers

Book Open access Sep 2026

Quantifying the Code-Size Overhead of eBPF JIT Compilation

eBPF allows user-defined programs to safely extend Linux kernel functionality at runtime, but its final machine code comes from a compilation pipeline that differs from native targets, and how efficient that pipeline is has no clear reference point. Our work constructs one: using the standard LLVM x86 backend as an app...

Hoang Duong, Hao Sun, Zhen-Dong Su · 0 citations
Book Open access Sep 2026

Unifying eBPF across Platforms: Formal Semantics, Conformance Testing, and Specifications

This work is building an executable formal semantics for eBPF in F* that explicitly distinguishes cross-platform and platform-specific behaviors and envision this semantics as a practical foundation for a uniform, trustworthy eBPF across platforms.

Yan-Ze Li, Reto Achermann, Ivan Beschastnikh et al. · 0 citations
Preprint Sep 2026

SkelOT: Reusing AOT Compilation Across EVM Contract Families

An AOT framework that lifts the unit of compilation reuse from code hash to family skeleton at contract-code-hash granularity and delivers a median per-contract speedup across family members under a compile budget targeting 75% execution-time coverage.

Si-Peng Xie, Qian-Hong Wu, Ming-Hang Li et al. · 0 citations
Preprint Sep 2026

CPyGraph: A Version-Aware Static Analysis Framework for Native CPython Bytecode

CPyGraph, a C++ framework for package-level analysis of native CPython bytecode, is presented, a C++ framework for package-level analysis of native CPython bytecode that matches PyCG on its 112-program call-graph benchmark.

Bai-Hong Chen, Wen Li · 1 citation
Preprint Sep 2026

MallocSan: A Memory Safety Tool for Native Closed-Source Applications

Memory-corruption errors remain a leading cause of high-impact vulnerabilities in C and C++ software. Deterministic detection, however, remains difficult to deploy: compiler-based sanitizers require source code and control of the build pipeline, hardware-assisted schemes depend on specific platforms, and dynamic binary...

Adel Belkhiri, Michel Dagenais, Maxime Lamothe · 0 citations
#artificial intelligence Preprint Sep 2026

TyPatch: Transforming Patches into Typestate Rules for Kernel Bug Detection

TyPatch is presented, which decouples patch-specific defect semantics from analyzer implementation and uses 88.3-90.1% fewer generation tokens than the state-of-the-art complete-checker construction workflow, while its initial report pools achieve 3.95 times the precision of those produced by that workflow.

Ruo-Yu Wang, Tuo Li, Jia Li · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.