[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6XERX1H7CVJM18F5P154D01":3,"skill-same:01M6XERX1H7CVJM18F5P154D01":50},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":24,"linkOnly":25,"markdownContent":26,"markdownBody":27,"frontMatter":28,"refName":29,"commitSha":30,"skillDirectory":31,"forksCount":13,"repositoryHtmlUrl":32,"repositoryHomepageUrl":6,"ownerHtmlUrl":33,"ownerBlogUrl":6,"ownerDescription":34,"updatedAt":35,"install":36,"resources":49},"01M6XERX1H7CVJM18F5P154D01","syz-extract-constants",null,"Defining and extracting kernel constants for syzkaller syzlang descriptions","Waaaalnut\u002Fskillsbench","Waaaalnut","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F103995656?v=4","01M6XCS9K1V51EY3JMB7DGMX24","01M6XCS9Q4WPW88W62C55G1H44",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench\u002Fblob\u002Fmain\u002Ftasks\u002Fsyzkaller-ppdev-syzlang\u002Fenvironment\u002Fskills\u002Fsyz-extract-constants\u002FSKILL.md",[],[18,19,20,21,22,23],"extract","constants","syz extract constants","kernel","extracting","for","2026-11-10 10:12:30",false,"---\nname: syz-extract-constants\ndescription: Defining and extracting kernel constants for syzkaller syzlang descriptions\n---\n\n# Defining Constants in Syzlang\n\n## Overview\n\nSyzkaller needs to know the actual values of kernel constants (ioctl numbers, flags, etc.) to generate valid fuzzing programs. There are two ways to provide these values:\n\n1. **Manual `.const` file** - Define constants directly in a companion file\n2. **`syz-extract` tool** - Extract values from kernel source headers (requires kernel source)\n\n## Method 1: Manual Constants File (Recommended when no kernel source)\n\nCreate a `.const` file alongside your `.txt` file with the constant values:\n\n### File naming\n- Syzlang description: `sys\u002Flinux\u002Fdev_ppdev.txt`\n- Constants file: `sys\u002Flinux\u002Fdev_ppdev.txt.const`\n\n### Constants file format\n\n```\n# Constants for your syzlang descriptions\narches = 386, amd64, arm, arm64, mips64le, ppc64le, riscv64, s390x\nPPCLAIM = 28811\nPPRELEASE = 28812\nIEEE1284_MODE_NIBBLE = 0\nIEEE1284_MODE_BYTE = 1\n```\n\nThe `arches` line declares which architectures these constants are valid for. For architecture-independent constants (like ioctls), list all architectures.\n\n### Calculating ioctl values\n\nLinux ioctl numbers are encoded as:\n- `_IO(type, nr)` = `(type \u003C\u003C 8) | nr`\n- `_IOR(type, nr, size)` = `(2 \u003C\u003C 30) | (size \u003C\u003C 16) | (type \u003C\u003C 8) | nr`\n- `_IOW(type, nr, size)` = `(1 \u003C\u003C 30) | (size \u003C\u003C 16) | (type \u003C\u003C 8) | nr`\n- `_IOWR(type, nr, size)` = `(3 \u003C\u003C 30) | (size \u003C\u003C 16) | (type \u003C\u003C 8) | nr`\n\nFor ppdev (type='p'=0x70):\n- `PPCLAIM = _IO('p', 0x8b)` = `0x708b` = `28811`\n\n## Method 2: Using syz-extract (Requires kernel source)\n\nIf kernel source is available:\n\n```bash\ncd \u002Fopt\u002Fsyzkaller\n\n# Extract constants for a specific file\nmake extract TARGETOS=linux SOURCEDIR=\u002Fpath\u002Fto\u002Flinux FILES=sys\u002Flinux\u002Fdev_ppdev.txt\n```\n\n**Note:** This environment does not include kernel source. Use Method 1 (manual constants file) instead.\n\n## After Defining Constants\n\nAfter creating the `.const` file, build syzkaller:\n\n```bash\ncd \u002Fopt\u002Fsyzkaller\nmake descriptions  # Compiles descriptions + constants\nmake all           # Full build\n```\n\n## Common Errors\n\n### \"is defined for none of the arches\"\nThis means the constant is used in the `.txt` file but not defined in the `.const` file.\n- Add the missing constant to your `.const` file\n- Ensure `arches` line lists the target architectures\nPPCLAIM is defined for none of the arches\n```\n\nSolution: Run `make extract` with the correct kernel source path and FILES parameter.\n\n### Missing headers\n```\ncannot find include file: uapi\u002Flinux\u002Fppdev.h\n```\n\nSolution: Check the kernel source path and ensure headers are properly configured.\n\n### \"unknown file\"\n```\nunknown file: sys\u002Flinux\u002Fdev_ppdev.txt\n```\n\nSolution: Use `make extract FILES=...` instead of calling `bin\u002Fsyz-extract` directly.\n\n## Example Workflow\n\n1. Write the syzlang description file (`sys\u002Flinux\u002Fdev_ppdev.txt`)\n2. Run `make extract TARGETOS=linux SOURCEDIR=\u002Fopt\u002Flinux\u002Fsource FILES=sys\u002Flinux\u002Fdev_ppdev.txt`\n3. Run `make generate` to regenerate Go code\n4. Run `make` to build syzkaller\n5. Test with `make descriptions` to verify everything compiles\n","# Defining Constants in Syzlang\n\n## Overview\n\nSyzkaller needs to know the actual values of kernel constants (ioctl numbers, flags, etc.) to generate valid fuzzing programs. There are two ways to provide these values:\n\n1. **Manual `.const` file** - Define constants directly in a companion file\n2. **`syz-extract` tool** - Extract values from kernel source headers (requires kernel source)\n\n## Method 1: Manual Constants File (Recommended when no kernel source)\n\nCreate a `.const` file alongside your `.txt` file with the constant values:\n\n### File naming\n- Syzlang description: `sys\u002Flinux\u002Fdev_ppdev.txt`\n- Constants file: `sys\u002Flinux\u002Fdev_ppdev.txt.const`\n\n### Constants file format\n\n```\n# Constants for your syzlang descriptions\narches = 386, amd64, arm, arm64, mips64le, ppc64le, riscv64, s390x\nPPCLAIM = 28811\nPPRELEASE = 28812\nIEEE1284_MODE_NIBBLE = 0\nIEEE1284_MODE_BYTE = 1\n```\n\nThe `arches` line declares which architectures these constants are valid for. For architecture-independent constants (like ioctls), list all architectures.\n\n### Calculating ioctl values\n\nLinux ioctl numbers are encoded as:\n- `_IO(type, nr)` = `(type \u003C\u003C 8) | nr`\n- `_IOR(type, nr, size)` = `(2 \u003C\u003C 30) | (size \u003C\u003C 16) | (type \u003C\u003C 8) | nr`\n- `_IOW(type, nr, size)` = `(1 \u003C\u003C 30) | (size \u003C\u003C 16) | (type \u003C\u003C 8) | nr`\n- `_IOWR(type, nr, size)` = `(3 \u003C\u003C 30) | (size \u003C\u003C 16) | (type \u003C\u003C 8) | nr`\n\nFor ppdev (type='p'=0x70):\n- `PPCLAIM = _IO('p', 0x8b)` = `0x708b` = `28811`\n\n## Method 2: Using syz-extract (Requires kernel source)\n\nIf kernel source is available:\n\n```bash\ncd \u002Fopt\u002Fsyzkaller\n\n# Extract constants for a specific file\nmake extract TARGETOS=linux SOURCEDIR=\u002Fpath\u002Fto\u002Flinux FILES=sys\u002Flinux\u002Fdev_ppdev.txt\n```\n\n**Note:** This environment does not include kernel source. Use Method 1 (manual constants file) instead.\n\n## After Defining Constants\n\nAfter creating the `.const` file, build syzkaller:\n\n```bash\ncd \u002Fopt\u002Fsyzkaller\nmake descriptions  # Compiles descriptions + constants\nmake all           # Full build\n```\n\n## Common Errors\n\n### \"is defined for none of the arches\"\nThis means the constant is used in the `.txt` file but not defined in the `.const` file.\n- Add the missing constant to your `.const` file\n- Ensure `arches` line lists the target architectures\nPPCLAIM is defined for none of the arches\n```\n\nSolution: Run `make extract` with the correct kernel source path and FILES parameter.\n\n### Missing headers\n```\ncannot find include file: uapi\u002Flinux\u002Fppdev.h\n```\n\nSolution: Check the kernel source path and ensure headers are properly configured.\n\n### \"unknown file\"\n```\nunknown file: sys\u002Flinux\u002Fdev_ppdev.txt\n```\n\nSolution: Use `make extract FILES=...` instead of calling `bin\u002Fsyz-extract` directly.\n\n## Example Workflow\n\n1. Write the syzlang description file (`sys\u002Flinux\u002Fdev_ppdev.txt`)\n2. Run `make extract TARGETOS=linux SOURCEDIR=\u002Fopt\u002Flinux\u002Fsource FILES=sys\u002Flinux\u002Fdev_ppdev.txt`\n3. Run `make generate` to regenerate Go code\n4. Run `make` to build syzkaller\n5. Test with `make descriptions` to verify everything compiles\n",{"name":5,"description":7},"main","7eeb258ada72b7f58119b0e7a2c00ea89d9beedd","tasks\u002Fsyzkaller-ppdev-syzlang\u002Fenvironment\u002Fskills\u002Fsyz-extract-constants","https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench","https:\u002F\u002Fgithub.com\u002FWaaaalnut","student of Zhejiang University","2026-04-21 23:16:23",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":48},[38,41,44],{"tool":39,"command":40},"npx","npx skills add Waaaalnut\u002Fskillsbench --skill syz-extract-constants",{"tool":42,"command":43},"bunx","bunx skills add Waaaalnut\u002Fskillsbench --skill syz-extract-constants",{"tool":45,"command":46},"pnpm","pnpm dlx skills add Waaaalnut\u002Fskillsbench --skill syz-extract-constants","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench\u002Fblob\u002Fmain\u002Ftasks\u002Fsyzkaller-ppdev-syzlang\u002Fenvironment\u002Fskills\u002Fsyz-extract-constants\u002FSKILL.md",true,[],[51,65,80,108,130,148],{"skillNo":52,"name":53,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":54,"categories":55,"keywords":61,"publishedAt":24},"01M6XEWMJ6VY3ZC53MPDCPG3GH","data-reconciliation","https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench\u002Fblob\u002Fmain\u002Ftasks\u002Fxlsx-recover-data\u002Fenvironment\u002Fskills\u002Fdata-reconciliation\u002FSKILL.md",[56],{"categoryNo":57,"categoryName":58,"taxonomyType":59,"taxonomyTypeDesc":60},"01JBSEEDCAT000000000000033","数据分析师","PROFESSION","适用职业",[62,63,64],"data reconciliation","reconciliation","data",{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":24},"01M6XEW8MNPMF1KRXV6ATGFRQF","speech-to-text","Transcribe video to timestamped text using Whisper tiny model (pre-installed).","https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench\u002Fblob\u002Fmain\u002Ftasks\u002Fvideo-tutorial-indexer\u002Fenvironment\u002Fskills\u002Fspeech-to-text\u002FSKILL.md",[],[72,73,74,75,76,77,78,79],"speech","text","speech to text","transcribe video","whisper","model","Video","transcribe",{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":91,"publishedAt":24},"01M6XEW3FQZP0T1RKQQJFXVY9T","video-processor","Process videos by removing segments and concatenating remaining parts. Use when you need to remove detected pauses\u002Fopenings from videos, create highlight reels, or batch process segment removals using ffmpeg filter_complex.","https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench\u002Fblob\u002Fmain\u002Ftasks\u002Fvideo-silence-remover\u002Fenvironment\u002Fskills\u002Fvideo-processor\u002FSKILL.md",[86],{"categoryNo":87,"categoryName":88,"taxonomyType":89,"taxonomyTypeDesc":90},"01JBSEEDCAT000000000000016","图像与多媒体","SCENARIO","使用场景",[78,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107],"processor","video processor","batch","create","reels","when","parts","segments","process","videos","you","segment","filter","ffmpeg","use","remove",{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":115,"publishedAt":24},"01M6XEVXJ5KZ0NTY3XZKRY4AS1","silence-detector","Detect initial silence segments in audio\u002Fvideo using energy-based analysis. Use when you need to find low-energy periods at the start of recordings (title slides, setup time, pre-roll silence).","https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench\u002Fblob\u002Fmain\u002Ftasks\u002Fvideo-silence-remover\u002Fenvironment\u002Fskills\u002Fsilence-detector\u002FSKILL.md",[114],{"categoryNo":87,"categoryName":88,"taxonomyType":89,"taxonomyTypeDesc":90},[116,117,118,119,97,102,120,121,122,123,124,99,125,126,78,127,128,129,106],"detector","silence detector","title","slides","time","energy","at","recordings","detect","find","Audio","analysis","start","setup",{"skillNo":131,"name":132,"nameZh":6,"description":133,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":134,"categories":135,"keywords":136,"publishedAt":24},"01M6XEVT3NGRN1FT7JPMAPXS6M","segment-combiner","Combine multiple segment detection results into a unified list. Use when you need to merge segments from different detectors, prepare removal lists for video processing, or consolidate detection outputs.","https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench\u002Fblob\u002Fmain\u002Ftasks\u002Fvideo-silence-remover\u002Fenvironment\u002Fskills\u002Fsegment-combiner\u002FSKILL.md",[],[103,137,78,138,139,140,141,23,97,142,143,99,102,144,145,106,146,147],"segment combiner","detection","prepare","merge","video processing","outputs","combine","processing","consolidate","results","list",{"skillNo":149,"name":150,"nameZh":6,"description":151,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":152,"categories":153,"keywords":157,"publishedAt":24},"01M6XEVMPVASGS2KX86QK4FMT7","report-generator","Generate compression reports for video processing. Use when you need to create structured JSON reports with duration statistics, compression ratios, and segment details after video processing.","https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench\u002Fblob\u002Fmain\u002Ftasks\u002Fvideo-silence-remover\u002Fenvironment\u002Fskills\u002Freport-generator\u002FSKILL.md",[154],{"categoryNo":155,"categoryName":156,"taxonomyType":59,"taxonomyTypeDesc":60},"01JBSEEDCAT000000000000034","行政与办公人员",[158,159,160,103,97,23,102,161,144,162,163,164,106,141,165,78,166,167,95],"generator","report generator","report","with","statistics","structured","reports","json","compression","generate"]