Source code for kSTEP: Characterization and Deterministic Testing of Linux CPU Scheduler Bugs. (OSDI '26).
Tingjia Cao, Shawn Wanxiang Zhong, Caeden Whitaker, Ke Han, Andrea Arpaci-Dusseau, and Remzi Arpaci-Dusseau
π Paper Β Β·Β π» Code (osdi26) Β Β·Β π Website Β Β·Β π Study Β Β·Β π Results
# π¦ Clone the repository (add `--branch osdi26` to reproduce the paper exactly)
git clone --recurse-submodules https://github.com/kstep-dev/kstep && cd kstep# πΎ Install dependencies
./install_deps.sh# π Reproduce bugs
# ./reproduce.py <name|all> [--run <buggy|fixed|plot>]
# 1. Checks out the buggy and/or fixed kernels
# 2. Builds and runs the specified driver (or all drivers)
# 3. Plots the results
./reproduce.py sync_wakeup| kSTEPΒ Driver,Β Fix,Β andΒ Output | Figure |
|---|---|
| sync_wakeup.c Official Fix: linux@aa3ee4f Our Fix: sync_wakeup.patch buggy.jsonl, fixed.jsonl |
|
| vruntime_overflow.c Fix: linux@bbce3de buggy.jsonl, fixed.jsonl |
|
| freeze.c Fix: linux@cd9626e buggy.jsonl, fixed.jsonl |
|
| extra_balance.c Fix: linux@6d7e478 buggy.jsonl, fixed.jsonl |
|
| driver_util_avg.c Fix: linux@17e3e88 buggy.jsonl, fixed.jsonl |
|
| long_balance.c Fix: linux@2feab24 buggy.jsonl, fixed.jsonl |
|
| lag_vruntime.c Fix: linux@5068d84 buggy.jsonl, fixed.jsonl |
|
| even_idle_cpu.c Fix: even_idle_cpu.patch buggy.jsonl, fixed.jsonl |
|
| local_group_imbalance.c Fix: fix_local_group_imbalanced.patch buggy.jsonl, fixed.jsonl |
|
| util_avg_jump.c Fix: fix_util_avg_jump.patch buggy.jsonl, fixed.jsonl |
|
| rt_runtime_toggle.c Fix: linux@9b58e97 buggy.jsonl, fixed.jsonl |
|
| uclamp_inversion.c Fix: linux@0213b70 buggy.jsonl, fixed.jsonl |
|
| h_nr_runnable.c Fix: linux@3429dd5 buggy.jsonl, fixed.jsonl |
For driver development, please refer to AGENTS.md for recommended workflow and tips.
./checkout.py <version> [<name>] [--tar | --git]-
<version>: Linux tag (e.g.,v6.14) or commit hash (e.g.,6d7e478,5068d84~1). -
--tar(default): download tarball from kernel.org / GitHub (fast, one-shot). -
--git: add a worktree frombuild/master(multi-version dev, supportsgit log/git diff). -
Example:
./checkout.py v6.14 foo_buggychecks out Linux v6.14 underbuild/foo_buggy/linux/and pointsbuild/currentatbuild/foo_buggy/.
make [KERNEL=<name>] # Build kSTEP rootfs (kmod + user). Trigger `make linux` on first build.
make linux [KERNEL=<name>] # Full kernel build. Run this after Linux file changes.[KERNEL=<name>]: build directory name underbuild/; defaults to whateverbuild/currentpoints to.
./run.py <name> [--num_cpus <n>] [--mem_mb <mb>] [--kernel <name>] [--label <dir>]-
<name>: Driver to run (see*.cfiles inkmod/drivers/andkmod/drivers_new_bugs/). -
[--kernel <name>]: kernel build to run against (defaults tobuild/current). -
[--label <dir>]: subdir underresults/for output; defaults to a timestampedtmp_*dir.results/latestsymlinks to it. -
See
./run.py --helpfor--topology,--frequency,--capacity,--debug, etc. -
Example:
./run.py sync_wakeupruns thesync_wakeupdriver with default parameters.
-
kmod/: Kernel module (
kmod.ko) loaded at bootdrivers/,drivers_new_bugs/: bug-specific drivers (one.cper bug)fuzz/: fuzz executor, op handlers, coverage, sanity checkscpu.c: topology, capacity, frequency setupdriver.h: public API for drivers (task creation, ticking, cgroups, etc.)internal.hand other top-level*.c: framework primitives
-
user/: Minimal userspace (
user.c) that mounts filesystems and loadskmod.ko -
linux/: Project-static kernel files (committed to git)
config.kstep*: Kconfig fragments merged into the buildcov.c,Kconfig.kstep,Makefile.kstep: scheduler-coverage instrumentation*.patch: Fixes for specific bugs
-
build/: Per-kernel build artifacts. See
build/README.mdfor the full layout. Top-level:current(symlink),user(kernel-agnostic userspace binary),<KERNEL>/per-checkout dirs containing the bootkernel,rootfs.cpio, andlinux/source tree. -
results/: Run outputs. See
results/README.md.repro_<bug>/andfuzz_<bug>/are tracked;tmp_*are gitignored. -
scripts/: Python utilities for fuzz orchestration, coverage parsing, and plotting.