Skip to content

Commit ee1959d

Browse files
committed
kpd: extend documentation
I've asked Claude Code to just extend the documentation as best as possible. Here as some updates. Generated-by: Claude AI Signed-off-by: Luis Chamberlain <[email protected]>
1 parent ba69839 commit ee1959d

File tree

1 file changed

+50
-5
lines changed

1 file changed

+50
-5
lines changed

README.md

Lines changed: 50 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,55 @@
11
# Kernel Patches Daemon (KPD)
22

3-
Kernel Patches Daemon (KPD) is a service connecting [Patchwork](https://github.com/getpatchwork/patchwork) with a GitHub repository, primarily for the puprose of running automated continuous integration (CI) testing via [GitHub Actions](https://github.com/features/actions).
3+
Kernel Patches Daemon (KPD) is a service connecting [Patchwork](https://github.com/getpatchwork/patchwork) with a GitHub repository, primarily for the purpose of running automated continuous integration (CI) testing via [GitHub Actions](https://github.com/features/actions).
44

5-
KPD watches Patchwork for new patch series and keeps them in sync with pull requests for a specified repository.
6-
It also updates series checks at Patchwork with CI workflow results, and can send email notifications to the authors of a patch.
5+
## What KPD Does
76

8-
KPD was originally developed at Meta in order to facilitate automated testing of [BPF subsystem](https://docs.cilium.io/en/latest/reference-guides/bpf/index.html) of the [Linux Kernel](https://kernel.org/) (see [BPF CI](https://github.com/kernel-patches/bpf/actions/workflows/test.yml)).
7+
KPD automates the kernel patch development workflow by:
8+
- Monitoring Patchwork for new patch series
9+
- Creating GitHub pull requests for each patch series
10+
- Running automated CI testing via GitHub Actions
11+
- Reporting test results back to Patchwork as checks
12+
- Sending optional email notifications to patch authors
13+
- Managing branch lifecycle and cleanup
14+
15+
This enables kernel subsystem maintainers to provide automated feedback to
16+
patch contributors without manual intervention, significantly improving the
17+
development workflow and code quality.
18+
19+
## Origins and Use Cases
20+
21+
KPD was originally developed at Meta to facilitate automated testing of the [BPF subsystem](https://docs.cilium.io/en/latest/reference-guides/bpf/index.html) of the [Linux Kernel](https://kernel.org/) (see [BPF CI](https://github.com/kernel-patches/bpf/actions/workflows/test.yml)).
22+
23+
The tool is designed for:
24+
- **Kernel subsystem maintainers** who want to automate patch testing
25+
- **Organizations** implementing structured kernel development workflows
26+
- **Teams** requiring granular access control and security for kernel contributions
27+
- **Projects** needing integration between traditional mailing list workflows and modern CI/CD systems
28+
29+
## Talks about KPD
930

1031
There have been a number of talks at various Linux-related conferences about KPD, see the slide decks for an introduction and overview:
1132
- ["KPD: Connect LKML to GitHub"](https://github.com/user-attachments/files/21110162/KPD_.Connect.LKML.to.GitHub.pdf) (Automated Testing Summit 2025)
1233
- ["Get Started with KPD"](https://github.com/user-attachments/files/21110192/Get.Started.with.KPD.pdf) (2024)
1334
- ["How BPF CI works?"](http://oldvger.kernel.org/bpfconf2022_material/lsfmmbpf2022-bpf-ci.pdf) (LSF/MM/BPF 2022)
1435

15-
Also [kdevops](https://github.com/linux-kdevops/kdevops) project has great documentation with [a page on KPD integration](https://github.com/linux-kdevops/kdevops/blob/main/docs/kernel-ci/kernel-ci-kpd.md).
36+
## Integration and Deployment
37+
38+
For comprehensive deployment guidance, including GitHub organization setup, security considerations, and access control best practices, see the [kdevops KPD integration documentation](https://github.com/linux-kdevops/kdevops/blob/main/docs/kernel-ci/kernel-ci-kpd.md). The kdevops project provides detailed instructions for:
39+
40+
- Setting up GitHub Apps with proper permissions
41+
- Configuring organizational security policies
42+
- Managing authentication tokens and keys securely
43+
- Implementing access control for kernel development teams
44+
45+
## Security Considerations
46+
47+
KPD requires careful security configuration:
48+
- Use a **private, secure system** to host the daemon
49+
- Configure GitHub organization with **strict access controls**
50+
- Set repository base permissions to **"No access"** by default
51+
- Create dedicated teams for kernel development access
52+
- Regularly audit GitHub App permissions and access
1653

1754
## Configuration
1855

@@ -32,10 +69,18 @@ poetry run python -m unittest
3269
```
3370

3471
## Running
72+
73+
### Normal Operation
3574
```
3675
poetry run python -m kernel_patches_daemon --config <config_path> --label-color configs/labels.json
3776
```
3877

78+
### Debugging and Testing
79+
```bash
80+
# Purge all existing PRs and branches (destructive operation)
81+
poetry run python -m kernel_patches_daemon --config <config_path> --action purge
82+
```
83+
3984
## Docker
4085

4186
Kernel Patches Daemon is available as pre-build image:

0 commit comments

Comments
 (0)