Skillsbench syzkaller-build-loop
Full build workflow for adding new syscall descriptions to syzkaller
install
source · Clone the upstream repo
git clone https://github.com/benchflow-ai/skillsbench
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/benchflow-ai/skillsbench "$T" && mkdir -p ~/.claude/skills && cp -r "$T/tasks/syzkaller-ppdev-syzlang/environment/skills/syzkaller-build-loop" ~/.claude/skills/benchflow-ai-skillsbench-syzkaller-build-loop && rm -rf "$T"
manifest:
tasks/syzkaller-ppdev-syzlang/environment/skills/syzkaller-build-loop/SKILL.mdsource content
Syzkaller Description Workflow
Full Build Loop for New Descriptions
When adding new syscall descriptions, follow this workflow:
cd /opt/syzkaller # 1. Write/edit your .txt file in sys/linux/ # 2. Create a .const file with constant values (see syz-extract-constants skill) # The .const file should be named: sys/linux/your_file.txt.const # 3. Compile descriptions make descriptions # 4. Build syzkaller make all
Quick Rebuild (After Minor Edits)
If you only changed descriptions (not constants):
cd /opt/syzkaller make descriptions # Runs syz-sysgen to compile descriptions
If you add new constants, update the
.const file first.
Common Errors
Unknown type
unknown type foo_bar
- Type not defined, or defined after first use
- Define all types before using them
Constant not available / defined for none of the arches
SOME_CONST is defined for none of the arches
- The constant isn't in the
file.const - Add it to
with the correct valuesys/linux/your_file.txt.const
Missing reference
undefined reference to 'some_type'
- Type defined in another file not being found
- Check includes or existing type definitions
Exploring Existing Code
Find examples of patterns:
grep -r "pattern" /opt/syzkaller/sys/linux/
Useful searches:
- How other fd resources are definedresource fd_
- Ioctl definition patternsioctl\$
/read\$
- Read/write specializationswrite\$
- Struct definition patternsstruct.*{
Files to Reference
- Network types (ifreq_t, sockaddr, etc.)sys/linux/socket.txt
- Basic syscall patternssys/linux/sys.txt
- File operationssys/linux/fs.txt