Book description
What is eBPF? With this revolutionary technology, you can write custom code that dynamically changes the way the kernel behaves. It's an extraordinary platform for building a whole new generation of security, observability, and networking tools.
This practical book is ideal for developers, system administrators, operators, and students who are curious about eBPF and want to know how it works. Author Liz Rice, chief open source officer with cloud native networking and security specialists Isovalent, also provides a foundation for those who want to explore writing eBPF programs themselves.
With this book, you will:
- Learn why eBPF has become so important in the past couple of years
- Write basic eBPF code, and manipulate eBPF programs and attach them to events
- Explore how eBPF components interact with Linux to dynamically change the operating system's behavior
- Learn how tools based on eBPF can instrument applications without changes to the apps or their configuration
- Discover how this technology enables new tools for observability, security, and networking
Publisher resources
Table of contents
- Preface
- 1. What Is eBPF, and Why Is It Important?
- 2. eBPF’s “Hello World”
-
3. Anatomy of an eBPF Program
- The eBPF Virtual Machine
- eBPF “Hello World” for a Network Interface
- Compiling an eBPF Object File
- Inspecting an eBPF Object File
- Loading the Program into the Kernel
- Inspecting the Loaded Program
- Attaching to an Event
- Global Variables
- Detaching the Program
- Unloading the Program
- BPF to BPF Calls
- Summary
- Exercises
- 4. The bpf() System Call
- 5. CO-RE, BTF, and Libbpf
-
6. The eBPF Verifier
- The Verification Process
- The Verifier Log
- Visualizing Control Flow
- Validating Helper Functions
- Helper Function Arguments
- Checking the License
- Checking Memory Access
- Checking Pointers Before Dereferencing Them
- Accessing Context
- Running to Completion
- Loops
- Checking the Return Code
- Invalid Instructions
- Unreachable Instructions
- Summary
- Exercises
- 7. eBPF Program and Attachment Types
- 8. eBPF for Networking
- 9. eBPF for Security
- 10. eBPF Programming
- 11. The Future Evolution of eBPF
- Index
- About the Author
Product information
- Title: Learning eBPF
- Author(s):
- Release date: March 2023
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9781098135126
You might also like
book
Learning OpenTelemetry
OpenTelemetry is a revolution in observability data. Instead of running multiple uncoordinated pipelines, OpenTelemetry provides users …
book
Learning Go, 2nd Edition
Go has rapidly become the preferred language for building web services. Plenty of tutorials are available …
book
Learning Go
Go is rapidly becoming the preferred language for building web services. While there are plenty of …
book
Designing Data-Intensive Applications
Data is at the center of many challenges in system design today. Difficult issues need to …