- STACK LIFE
- single call
- SHARED STATE
- none alone
- HEAP ALLOC
- forbidden
- SOLUTION
- BPF maps
- CPU hook write
- userspace read / poll
- ringbuf event stream
An eBPF program runs to completion on one event and discards its 512-byte stack. It cannot call malloc() or keep ordinary global variables without a kernel data structure backing them.
To count packets, match request start to response end, or send telemetry to a daemon, hooks store everything inside BPF maps.