bpfinst-spec
Generic API for different eBPF-based instrumenter engines
|
This repository contains the specification for different implementations of eBPF-based instrumentation engines.
Status: alpha, compatibility can be broken at any time.
Unlike DynamoRIO, this is not a generic instruction list rewriter API. While the native API looks quite similar to DR sometimes, the main purpose here is to implement simple per-instruction instrumentations as simple as possible. An instrumenter is just a set of not-too-complex (generally, with static forward branches only) functions in C that perform what you want for some basic operations from the original program (arithmetic, logic, branching, ...) and some native library with slow path callbacks.
Some implementations support abstract propagation of 64-bit-wide tags. The format of tag is completely user-controlled with the exception for 0 being default value when no tag is available. The implementation for storing tags in the address space of program is user-controlled, too:
This repository is expected to be added to the engine implementation repository as a submodule named bpfinst-spec
. On the same hierarchy level a directory named bpfinst-bin
should be located with the following scripts:
prepare-for-test
compile-sources <program> <arg1> <arg2> ...
CC
, CFLAGS
, CXX
, CXXFLAGS
, LD
, LDFLAGS
, ...) for its subprocessrun-binary <program> <arg1> <arg2> ...
An API documentation generated by Doxygen is available.