CoolFace
Datasetpublic

theelderemo/linux-asm-pairs

Linux Kernel Assembly → Explanation Dataset A dataset of disassembled Linux kernel functions paired with structured natural-language explanations, built from the Linux Commits Dataset (Zenodo 10654193). Each row corresponds to a single compiled function extracted from a .c or .h file touched by a Bug-Fix Commit (BFC) or Bug-Introducing Commit (BIC) in the Linux kernel git history. Source files are compiled with gcc -O2 -g -fno-inline -fno-omit-frame-pointer and disassembled with… See the full description on the dataset page: https://huggingface.co/datasets/theelderemo/linux-asm-pairs.

sourceHugging Facegpl-2.0updated 5mo agoView on Hugging Face
0likes236downloads
Dataset Card

Linux Kernel Assembly → Explanation Dataset

A dataset of disassembled Linux kernel functions paired with structured natural-language explanations, built from the Linux Commits Dataset (Zenodo 10654193).

Each row corresponds to a single compiled function extracted from a .c or .h file touched by a Bug-Fix Commit (BFC) or Bug-Introducing Commit (BIC) in the Linux kernel git history. Source files are compiled with gcc -O2 -g -fno-inline -fno-omit-frame-pointer and disassembled with objdump -d -S (AT&T syntax, source-interleaved).

Intended for training or evaluating models on assembly code understanding, specifically, generating natural language explanations from disassembled Linux kernel functions.


Schema

ColumnTypeDescription
bfc_hashstringHash of the bug-fix commit in the pair
bic_hashstringHash of the bug-introducing commit in the pair
commit_hashstringThe specific commit this function was extracted from
commit_typestring"bfc" (bug-fix commit) or "bic" (bug-introducing commit)
filenamestringSource file path within the kernel tree (e.g. kernel/sched/core.c)
func_namestringName of the disassembled function
asmstringobjdump -d -S output for one function (AT&T syntax, source lines interleaved)
explanationstringStructured description: commit type, function name, author, date, commit message, and role
commit_messagestringFirst 512 characters of the commit message

Usage

python
from datasets import load_dataset

ds = load_dataset("theelderemo/linux-asm-pairs", split="train")
print(ds["asm"])
print(ds["explanation"])

Filter to only bug-fix commits:

python
bfc_only = ds.filter(lambda x: x["commit_type"] == "bfc")

Data Pipeline

  1. 1.BFC/BIC pairs sourced from bfc_bic.csv in Zenodo record 10654193
  2. 2.Full diffs fetched from a local bare clone of the Linux kernel git repo (snapshot: 2023-11-12)
  3. 3.Changed .c / .h files compiled with gcc -O2 -g -fno-inline -fno-omit-frame-pointer
  4. 4.Functions extracted via objdump -d -S --no-show-raw-insn
  5. 5.Explanations constructed from Perceval-parsed commit metadata

License

Source assembly is derived from the Linux kernel, which is licensed under GPL-2.0. This dataset inherits that license. See kernel.org/doc/html/latest/process/license-rules.html for details.


Citation

If you use this dataset, please also cite the upstream source:

bibtex
@dataset{linux_commits_2023,
  title   = {Linux Commits Dataset},
  year    = {2023},
  url     = {https://zenodo.org/records/10654193}
}

@dataset{christopher_dickinson_2026,
	author       = { Christopher Dickinson },
	title        = { linux-asm-pairs (Revision 9ea25c3) },
	year         = 2026,
	url          = { https://huggingface.co/datasets/theelderemo/linux-asm-pairs },
	doi          = { 10.57967/hf/8453 },
	publisher    = { Hugging Face }
}