syz-extract-constants

Define and extract kernel constants for syzkaller syzlang descriptions.

317|40|Updated Jan 21, 2025
One-click install
npx skills add https://github.com/benchflow-ai/benchflow --skill syz-extract-constants-benchflow-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: syz-extract-constants
Source: https://github.com/benchflow-ai/benchflow/tree/main/tests/fixtures/skillsbench_slice/syzkaller-ppdev-syzlang/environment/skills/syz-extract-constants
Command: npx skills add https://github.com/benchflow-ai/benchflow --skill syz-extract-constants-benchflow-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill resolves the challenge of mapping kernel constants like ioctl numbers and flags into syzkaller syzlang descriptions, which is essential for generating valid fuzzing programs.

Core Features & Use Cases

  • Manual Constant Definition: Provides a structured format for defining constants when kernel source code is unavailable.
  • Automated Extraction: Guides the user through the syz-extract workflow to pull constants directly from kernel headers.
  • Use Case: When developing a new syzlang description for a Linux kernel driver, use this skill to ensure all ioctl numbers and flags are correctly defined so the fuzzer can generate valid inputs.

Quick Start

Use the syz-extract-constants skill to define the required kernel constants for your syzlang description file by creating a corresponding .const file with the necessary architecture and constant values.

Frequently Asked Questions about syz-extract-constants

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract kernel constants for syzlang descriptions?

To extract kernel constants for syzlang, you can use the syz-extract workflow to pull ioctl numbers and flags directly from kernel source headers, or manually define them in a .const file architecture-specifically.

What are syzlang constants and when do I need them for syzkaller?

Syzlang constants map kernel values like ioctl numbers and flags into syzkaller descriptions. You need them to generate valid fuzzing programs targeting specific Linux kernel drivers.

Can I manually define ioctl constants for syzkaller if I don't have the kernel source?

Yes, you can manually define ioctl constants for syzkaller by creating a structured .const file, specifying the necessary architecture and constant values when kernel source headers are unavailable.

How do I validate architecture-specific constants for syzkaller build processes?

You validate architecture-specific constants for syzkaller by ensuring your .const file definitions match the required formats, preventing build failures when generating syzlang fuzzing programs.

What is the best way to map Linux kernel driver flags into syzlang?

The best way to map Linux kernel driver flags into syzlang is through the syz-extract workflow, which automates extraction from kernel headers to ensure accurate fuzzer input generation.