Kernel Patches Daemon (KPD) is a service connecting Patchwork with a GitHub repository, primarily for the puprose of running automated continuous integration (CI) testing via GitHub Actions.
KPD watches Patchwork for new patch series and keeps them in sync with pull requests for a specified repository. It also updates series checks at Patchwork with CI workflow results, and can send email notifications to the authors of a patch.
KPD was originally developed at Meta in order to facilitate automated testing of BPF subsystem of the Linux Kernel (see BPF CI).
There have been a number of talks at various Linux-related conferences about KPD, see the slide decks for an introduction and overview:
- "KPD: Connect LKML to GitHub" (Automated Testing Summit 2025)
- "Get Started with KPD" (2024)
- "How BPF CI works?" (LSF/MM/BPF 2022)
Also kdevops project has great documentation with a page on KPD integration.
See an example of the configuration files in configs/
directory.
You may use Github personal token to authenticate KPD to github, but using Github App is preferrable.
When using a GH app, it needs to have the following read and write access:
- Content (write to repo)
- Pull request (create PRs)
- Workflow
# Install poetry
pip install --user poetry
# Setup virtualenv
python -m venv .venv
poetry install
# Test
poetry run python -m unittest
poetry run python -m kernel_patches_daemon --config <config_path> --label-color configs/labels.json
Kernel Patches Daemon is available as pre-build image:
$ docker pull ghcr.io/kernel-patches/kernel-patches-daemon:latest
To build Kernel Patches Daemon with Docker:
- Install Docker and docker-compose
- Build image
$ docker-compose build
- Start KPD service
$ docker-compose up
See the CONTRIBUTING file for how to help out.