Talking to the Linux Kernel with Python and eBPF

Navin Pai (~navin57)




The Linux kernel is a complex piece of software, but it can be difficult to interact with from userspace. Extended Berkeley Packet Filters (eBPF) is a new technology that allows you to write programs that run in the kernel, but interact easily with a program in userspace. And as with most modern usecases, Python provides a powerful and easy-to-use interface for writing eBPF programs.

In this talk, we'll show you how to use Python and eBPF to talk to the Linux kernel. We'll start by covering the basics of eBPF, including how it works and how to write eBPF programs. Then, we'll show you how to use Python to interact with eBPF programs. We'll also provide examples of some real-world use cases for Python-powered eBPF, such as:

- Tracing kernel functions
- Implementing custom network filters
- Monitoring memory allocation calls made by userspace applications

We'll also touch on some of the OSS tools that leverage eBPF in different and varied ways and understand the building blocks that they use (eg. Pyroscope, Cilium, Katran, Calico). By the end of this talk, the expectation is that you'll be able to build your own custom eBPF programs, what are the interesting things you can do with eBPF, and have a deeper understanding on how to "communicate" with your kernel using Python.


None. This talk is intended to be a beginner talk to highlight what eBPF is, and how easy it is to write python programs that can leverage eBPF for a host of different use-cases

Speaker Info:

Navin is a Founding Engineer at OpsVerse Inc., where he's part of the core team that's building managed, modern, OSS-based tool ecosystems for DevOps. Prior to OpsVerse, he was a Principal Engineer at He's been a Pythonista for over a decade, and has been responsible for architecting out multiple large systems that have grown to become internet-scale over the years. He is also a vocal proponent for the use of OSS within the broader business ecosystem, both in India and beyond.

While he's not talking tech, you can find him ranting about soccer, economics, and pop culture. In his free time, he enjoys writing about himself in the third person in "Speaker Information" sections of CFPs :)

Speaker Links:


Some Previous Talks

Anthill Inside:

PyCon India:

OpsVerse Webinar:

Section: Developer tools and automation
Type: Talks
Target Audience: Beginner
Last Updated: