Scaling real-time file monitoring with eBPF: How we filtered billions of kernel events per minute
Datadog built file integrity monitoring on eBPF to capture file changes with process and container context, which periodic scans, inotify and auditd could not provide at scale. Their infrastructure produces over 10 billion file events per minute at roughly 5 KB each. Agent-side rule matching cuts what reaches the backend to about one million events per minute. In-kernel prefiltering goes further: static approvers are derived from detection rules, and dynamic discarders are pushed at runtime into LRU eBPF maps. Together they drop up to 94% of events before they hit the ring buffer, which lowers CPU use and prevents dropped events.
Related posts
- Hardening eBPF for runtime security: Lessons from Datadog Workload Protection
Datadog Engineering hardMasterFive years of running Datadog Workload Protection, an eBPF-based runtime security agent supporting kernels from 4.15 to 6.18, distilled into six production lessons. They cover getting programs to load, attach and keep firing across kernels and distributions; capturing and enriching data correctly; auditing eBPF use to reduce attack surface; coexisting with other eBPF users on a host; controlling performance cost; and shipping changes safely. Concrete pitfalls include verifier differences between kernels, inlined or renamed hook points, missed 32-bit compat syscalls and per-syscall tracepoints, and gaps from io_uring, openat2 and unusual exec paths like binfmt_misc. Mitigations include a CI matrix of tested kernels, the shared open source ebpf-manager Go library that refuses to start without a minimal set of loaded programs, and wrappers that hide verifier quirks.
- Well, That Wasn't Fun: October 16 '26
Fly.io mediumAdeptA Linux kernel bug in IPv4 checksum offload validation let a guest VM direct the host to write its computed checksum into an already-trusted IPv4 header field. This enabled a firewall bypass and a 32-byte out-of-bounds read that could leak host memory or packets from neighboring VMs. XDP rules ran too early to catch the rewrite, and disabling offload required a reboot anyway, so Fly.io patched and rebooted its entire fleet in 10 hours. Reboots were sequenced in waves so no Managed Postgres cluster lost both nodes (17 waves in iad), with some hosts stuck in BIOS or lost to a failed power supply. The write-up also covers the decision to label the work as 'maintenance' rather than disclose vulnerability, the move of incident comms to the exec team, and advice to encrypt internal traffic, scope and expire agent credentials, and rehearse rotation.
- How GitHub uses eBPF to improve deployment safety
GitHub Engineering mediumAdeptGitHub prevents deployment scripts from introducing circular dependencies on github.com or internal services by running them in a dedicated cgroup with eBPF programs attached. A BPF_PROG_TYPE_CGROUP_SOCK_ADDR hook rewrites DNS connect4 calls to a userspace DNS proxy that checks domains against a blocklist. The proxy then signals a CGROUP_SKB egress program via eBPF maps to allow or deny traffic, and maps DNS transaction IDs to PIDs so blocked requests can be logged with the originating command line. The system, built in Go with cilium/ebpf, went live after a six-month rollout. It also audits contacted domains and enforces CPU and memory limits on deploy scripts.
- How to catch crypto miners using syscall signatures
Modal mediumAdept
Modal detects cryptominers abusing its GPU serverless platform by analyzing container syscalls at runtime rather than relying only on user metadata, which abusers can fake with stolen credit cards. Source and binary analysis and image scanning are ruled out because containers run arbitrary x86 code fetched at runtime, and ptrace-based strace costs about 10µs per context switch, which can slow syscall-heavy programs by more than 100x. Instead, gVisor's sentry kernel already intercepts every syscall, so Modal streams its seccheck tracepoints over a Unix socket to a per-container Rust thread. That thread matches events such as non-Python execve calls against rules, kills flagged containers and feeds auto-banning, with zero false positives reported so far.
- A fine-grained network traffic analysis with Millisampler
Meta Engineering hardMasterMillisampler is a lightweight eBPF-based tc filter deployed across Meta's server fleet that records fine-grained network traffic time series at 100μs, 1ms and 10ms granularities: ingress/egress bytes, ECN-marked bytes, retransmissions, in-region vs cross-region traffic, and active connection counts estimated with a 128-bit sketch. Each run takes 2,000 samples using lock-free per-CPU counters, giving observation windows from 200ms to 20s with a fixed memory footprint, and stores data locally for on-demand analysis. Combined with coarser telemetry, it has exposed synchronized microbursts and incast patterns, helped root-cause a NIC driver bug that stalled packet delivery for milliseconds, and guided transport tuning.