PPatch Partner is a research automation toolkit for Linux kernel patch experiments. It connects patch application, per-POC kernel builds, QEMU crash checks, and optional syzkaller reproduction into a single Python command-line workflow.
Full setup, command reference, workspace layout, Docker notes, and troubleshooting live in docs/USAGE.md.
- Initialize a Linux kernel source tree at a configured stable tag.
- Apply
patches/*.patchwith GNUpatch,ppatch auto, or both. - Create commits and tags for successfully applied patches.
- Prepare per-POC overlayfs work directories and kernel configs.
- Build kernels and collect compiler diagnostics.
- Retry failed builds with compiler JSON diagnostics.
- Run QEMU VM crash checks for POCs.
- Optionally run syzkaller reproduction and corpus workflows.
This repository contains the orchestration code, helper scripts, Docker setup, and documentation.
It does not include Linux source trees, patch datasets, POCs, VM images, syzkaller builds, local configs, database dumps, or generated experiment outputs. Those artifacts should be supplied by the user through the configured workspace paths.
- Linux host for full overlayfs/QEMU workflows.
- Python 3.12 and PDM 2.x.
- Git, GNU patch, compiler toolchain, and Linux kernel build dependencies.
- QEMU/KVM for VM crash checks.
- Optional PostgreSQL for result storage.
- Optional syzkaller for reproduction workflows.
See docs/USAGE.md for system package installation.
pdm use -f 3.12
pdm install
pdm run python -m ppatch_partner --helpStart from the safe example config:
cp src/ppatch_partner/config/config.example.env src/ppatch_partner/config/config.envOr point to an external private config:
export PPATCH_PARTNER_ENV_FILE=/abs/path/to/ppatch-partner.envPrivate config.env files are ignored by git. See docs/USAGE.md for all settings.
pdm run python -m ppatch_partner.scripts.initialize main
pdm run python -m ppatch_partner.scripts.ppatch_auto main --use-gnu-first
pdm run python -m ppatch_partner.scripts.overlay auto --cve-id poc_0
pdm run python -m ppatch_partner.scripts.monitor_crash main --cve-id poc_0For retry, batch, database, and syzkaller workflows, see docs/USAGE.md.
docker compose up --build ppatch-partner
docker compose run --rm ppatch-partner bashThe Compose setup also provides local PostgreSQL for development. Full overlayfs and QEMU flows require a Linux Docker host with the necessary kernel capabilities.
MIT. See LICENSE.