Extending Applications Safely and Efficiently

EIM model abstracts extension resources for fine-grained safety/interconnectedness tradeoffs; bpftime enforces it efficiently

Featured image

Venue: OSDI 2025

Topic: Application extensions (eBPF, plugins) must balance interconnectedness vs. safety vs. isolation vs. efficiency — no existing framework achieves all four simultaneously. EIM provides a resource-based abstraction; bpftime enforces it with lightweight mechanisms.


Summary

Software extensions improve performance, add features, and enhance security — but current tools are neither safe, isolated, nor efficient enough. The core tension: fine-grained interconnectedness (extensions need to read/modify application state) vs. safety (extensions must not corrupt the host). EIM (Extension Interface Model) represents extension features as abstract resources to handle this tradeoff. bpftime is a userspace extension runtime that enforces EIM specifications using eBPF-style verification and ERIM-style intraprocess hardware isolation.


Background

Three key requirements for extension frameworks

  1. Fine-grained safety/interconnectedness tradeoffs: no single definition of safety fits all use cases.
  2. Extension isolation: host applications must not modify extension state.
  3. Efficiency: extensions must run at near-native speed.

Prior work limitations

| Approach | Safety/Interconnectedness | Isolation | Efficiency | |—|—|—|—| | Native execution | ✗ (no tradeoff) | ✗ | ✓ | | SFI-based tools | ✗ (can’t handle tradeoff) | Partial | ✗ (runtime validation) | | Subprocess isolation | Partial (needs host code changes) | ✓ | ✗ (context-switch overhead) | | eBPF uprobes | ✗ | Partial | ✗ (kernel trap per extension entry) |


Key Idea

EIM: Extension Interface Model

bpftime: extension runtime


Design

EIM

bpftime

  1. Safety via eBPF verification: static analysis at load time → no per-extension-call overhead at runtime.
  2. Isolation via ERIM: intraprocess memory domain isolation → extensions can’t corrupt host state.
  3. Efficiency via concealed entries: binary rewriting hides extension entry points when not needed → eliminates unused entry overhead.

Questions


Meeting Notes

(to be filled)