The AI reviews on netdev (BPF and some other subsystems) use LLM review prompts developed by Chris Mason:
github.com/masoncl/review-prompts
Clone this repository to get the latest prompts, and ask your favorite LLM to use them to review your code.
There are two modes for running reviews:
The original single-prompt mode. Works well for small to medium patches.
The newer agent-based mode that breaks the review into individual tasks. This mode is recommended for large diffs because it:
To use orc mode, first run the preprocessing script:
cd /path/to/linux
kernel/scripts/create_changes.py HEAD
Then invoke the LLM with the orc prompt:
Use orc mode for patches with large diffs, multiple files, or complex changes. The preprocessing step extracts context that helps the LLM focus on relevant code without spending tokens discovering it on its own.
Where <base>..<head> should be replaced by a real
git commit hash range (classic mode only).
The review-prompt instructs the LLM to write its findings to a file called
review-inline.txt in the repository root. This file contains
the regression analysis formatted for email replies.
Chris has also developed a MCP integration which indexes commits and
the code to make the LLMs burn fewer tokens fetching context. (semcode)
See the README of the review prompt repo for more information.
This page is very rudimentary.
For any questions and comments please reply to a thread on the mailing list which brought you here and CC Chris Mason <clm@meta.com>.