evo-syzkaller-ppdev-syzlang

SkillDev tools

Generates syzkaller syzlang descriptions for the Linux ppdev (parallel port) driver, covering all 28 ioctls (including 5 obsolete ones), structs, IEEE 1284 mode flags, and PP flags with architecture-specific constants for amd64 and 386.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the evo-syzkaller-ppdev-syzlang skill

What this skill tells your AI

The instructions your AI receives, as published by openlair/openskill in tasks-evolved/syzkaller-ppdev-syzlang/environment/skills/evo-syzkaller-ppdev-syzlang/SKILL.md and read by ahel’s review.

Generates complete syzkaller syzlang device driver descriptions for the Linux ppdev (parallel port) subsystem.

Overview

Produces two files:

  • dev_ppdev.txt — syzlang descriptions with includes, resource, opener, all 28 ioctl variants, struct, and flag groups
  • dev_ppdev.txt.const — architecture-specific constant values for amd64 and 386

Key Domain Knowledge

IOCTL Encoding (x86)

  • ppdev uses magic type char 'p' (0x70) for all ioctls
  • _IO: dir=0, size=0
  • _IOR: dir=2 (bit 31), size encoded in bits 16-29
  • _IOW: dir=1 (bit 30), size encoded in bits 16-29
  • Formula: (dir << 30) | (size << 16) | (type << 8) | nr

Architecture Differences

  • struct timeval is 16 bytes on amd64 (two 8-byte longs) but 8 bytes on 386 (two 4-byte longs)
  • This causes PPGETTIME and PPSETTIME to have different ioctl numbers per architecture
  • All other ioctls have identical values across amd64 and 386

Complete IOCTL Coverage (28 total)

  • 4 _IO (no-arg): PPCLAIM, PPRELEASE, PPYIELD, PPEXCL
  • 14 _IOW (input): PPSETMODE, PPWSTATUS(obsolete), PPWCONTROL, PPWDATA, PPWECONTROL(obsolete), PPWFIFO(obsolete), PPFCONTROL, PPDATADIR, PPNEGOT, PPWCTLONIRQ, PPSETPHASE, PPSETTIME, PPSETFLAGS
  • 10 _IOR (output): PPRSTATUS, PPRCONTROL, PPRDATA, PPRECONTROL(obsolete), PPRFIFO(obsolete), PPCLRIRQ, PPGETTIME, PPGETMODES, PPGETMODE, PPGETPHASE, PPGETFLAGS

Syzlang Direction Mapping

  • _IOR (kernel writes to user) → ptr[out, ...]
  • _IOW (user writes to kernel) → ptr[in, ...]
  • _IO (no data) → omit third argument entirely

Flag Groups

  • ieee1284_modes: 12 IEEE 1284 protocol mode constants from linux/parport.h
  • ppdev_flags: PP_FASTWRITE, PP_FASTREAD, PP_W91284PIC from linux/ppdev.h

Const File Format

  • Header: # Code generated by syz-sysgen. DO NOT EDIT.
  • Architecture line: arches = 386, amd64
  • Per-constant: NAME = 386:value, amd64:value (arch-qualified format)
  • Values are decimal integers
  • Constants must be sorted alphabetically (syzkaller convention)

Usage

import sys
sys.path.insert(0, '/app/environment/skills/evo-syzkaller-ppdev-syzlang/scripts')
from generate import write_files
write_files('/opt/syzkaller/sys/linux/dev_ppdev.txt', '/opt/syzkaller/sys/linux/dev_ppdev.txt.const')

Verification

cd /opt/syzkaller
make descriptions
make all TARGETOS=linux TARGETARCH=amd64

Signals

GitHub stars
89
Forks
4
Last commit
Sep 2026
Advanced
Catalog kind
skill
Gateway key
evo-syzkaller-ppdev-syzlang
Source
github.com/openlair/openskill