---
title: "Hardening eBPF for runtime security: Lessons from Datadog Workload Protection"
description: "Five 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."
url: "https://swe.quest/articles/hardening-ebpf-for-runtime-security-lessons-from-datadog-workload-protection-d7f876ff0025b179"
canonical: "https://www.datadoghq.com/blog/engineering/ebpf-workload-protection-lessons/"
source: "Datadog Engineering"
published: "2026-01-07"
difficulty: "hard"
kind: "Case study"
reading_minutes: 34
tags: ["linux","threat-detection","security","operating-systems","performance"]
---

# Hardening eBPF for runtime security: Lessons from Datadog Workload Protection

A post on [Datadog Engineering](https://swe.quest/sources/datadog.md), published 2026-01-07, 34 min read, Case study. Original: [https://www.datadoghq.com/blog/engineering/ebpf-workload-protection-lessons/](https://www.datadoghq.com/blog/engineering/ebpf-workload-protection-lessons/)

## Summary

Five 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.

Written by swe.quest, not by the author.

**Difficulty:** Hard: written for specialists in the field

## Topics

- [Linux](https://swe.quest/tags/linux.md) (Infrastructure)
- [Threat detection](https://swe.quest/tags/threat-detection.md) (Security)
- [Security](https://swe.quest/tags/security.md) (Security)
- [Operating systems](https://swe.quest/tags/operating-systems.md) (Infrastructure)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)

## Prerequisites

- eBPF programs and maps ([easy posts on Linux](https://swe.quest/tags/linux.md?difficulty=easy))
- Linux syscalls ([easy posts on Linux](https://swe.quest/tags/linux.md?difficulty=easy))
- kprobes and tracepoints
- Linux kernel versions ([easy posts on Linux](https://swe.quest/tags/linux.md?difficulty=easy))

## Keywords

eBPF, Datadog Workload Protection, ebpf-manager, BPF LSM, CO-RE, io\_uring, kprobes, binfmt\_misc

## Related posts

- [Scaling real-time file monitoring with eBPF: How we filtered billions of kernel events per minute](https://swe.quest/articles/scaling-real-time-file-monitoring-with-ebpf-how-we-filtered-billions-of-kernel-2f88f92ad0613fab.md): Datadog Engineering · 2025-11-18 · Medium · 9 min read · Linux, Threat detection, Performance engineering, Scaling
  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.
- [OpenAI and Cisco introduce Shirudo](https://swe.quest/articles/openai-and-cisco-introduce-shirudo-b1360eae5b5122c5.md): OpenAI · 2026-11-23 · Easy · 4 min read · Linux, Security, AI agents, Open source
  Shirudo is an open-source runtime from OpenAI and Cisco that uses eBPF "shields" to block vulnerable code paths on running Linux systems while patches are prepared, without restarts.
- [How GitHub uses eBPF to improve deployment safety](https://swe.quest/articles/how-github-uses-ebpf-to-improve-deployment-safety-e56d5b65b00aac89.md): GitHub Engineering · 2026-04-16 · Medium · 8 min read · Linux, Deployment, Go, Networking, DNS
  GitHub prevents deployment scripts from introducing circular dependencies on github.com or internal services by running them in a dedicated cgroup with eBPF programs attached.
- [Replit’s Architecture Behind Secure Agent Work](https://swe.quest/articles/replit-s-architecture-behind-secure-agent-work-cde69ab09bf64c7d.md): Replit · 2026-10-28 · Easy · 9 min read · AI agents, Sandboxing & isolation, Security, Identity & auth, Virtualization
  Replit's Agent Habitat secures agent work through four layers: least-privilege connectors with a credential broker that injects vault secrets only into authorized requests, microVM isolation with a hardened kernel, production changes gated behind engineering review and combined static, dependency and AI security scanning, and audit logs that stream to a SIEM.
- [Well, That Wasn't Fun: October 16 '26](https://swe.quest/articles/well-that-wasn-t-fun-october-16-26-83d1120fe160ef39.md): Fly.io · 2026-11-06 · Medium · 7 min read · Incidents & postmortems, Vulnerability research, Linux, Virtualization, Networking
  A 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.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
