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
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
Deciphering Data Architectures
Data fabric, data lakehouse, and data mesh have recently appeared as viable alternatives to the modern …
book
Database Internals
When it comes to choosing, using, and maintaining a database, understanding its internals is essential. But …
book
Generative Deep Learning, 2nd Edition
Generative AI is the hottest topic in tech. This practical book teaches machine learning engineers and …
book
Learning JavaScript Design Patterns, 2nd Edition
Do you want to write beautiful, structured, and maintainable JavaScript by applying modern design patterns to …