theelderemo commited on
Commit
ece42b3
·
verified ·
1 Parent(s): 0072661

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +79 -20
README.md CHANGED
@@ -1,5 +1,5 @@
1
  ---
2
- license: other
3
  task_categories:
4
  - text-generation
5
  language:
@@ -21,22 +21,81 @@ size_categories:
21
 
22
  # Linux Kernel Assembly → Explanation Dataset
23
 
24
- Derived from the [Linux Commits Dataset](https://zenodo.org/records/10654193)
25
- (90K+ BFC/BIC pairs from the Linux kernel).
26
-
27
- Each row contains:
28
- - `asm`: objdump-disassembled function assembly (AT&T syntax, with source intermix via `-S`)
29
- - `explanation`: structured natural-language description of what the function does and
30
- its role in the bug-fix or bug-introducing commit
31
- - `bfc_hash` / `bic_hash`: linked commit pair hashes
32
- - `commit_type`: `"bfc"` (bug-fix) or `"bic"` (bug-introducing)
33
- - `filename`: source file in the kernel tree
34
- - `func_name`: C function name
35
- - `commit_message`: first 512 chars of the commit message
36
-
37
- ## Intended Use
38
- Training/fine-tuning LLMs for assembly understanding, decompilation,
39
- and compiler-output analysis.
40
-
41
- ## Source
42
- Zenodo record 10654193 codeurjc/LinuxCommitsDataset
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ license: gpl-2.0
3
  task_categories:
4
  - text-generation
5
  language:
 
21
 
22
  # Linux Kernel Assembly → Explanation Dataset
23
 
24
+ > **Upload in progress.** Additional batches are still being added. The final dataset will contain records derived from 90K+ BFC/BIC commit pairs.
25
+
26
+ A dataset of disassembled Linux kernel functions paired with structured natural-language explanations, built from the [Linux Commits Dataset (Zenodo 10654193)](https://zenodo.org/records/10654193).
27
+
28
+ 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).
29
+
30
+ Intended for training or evaluating models on **assembly code understanding**, specifically, generating natural language explanations from disassembled Linux kernel functions.
31
+
32
+ ---
33
+
34
+ ## Schema
35
+
36
+ | Column | Type | Description |
37
+ |---|---|---|
38
+ | `bfc_hash` | `string` | Hash of the bug-fix commit in the pair |
39
+ | `bic_hash` | `string` | Hash of the bug-introducing commit in the pair |
40
+ | `commit_hash` | `string` | The specific commit this function was extracted from |
41
+ | `commit_type` | `string` | `"bfc"` (bug-fix commit) or `"bic"` (bug-introducing commit) |
42
+ | `filename` | `string` | Source file path within the kernel tree (e.g. `kernel/sched/core.c`) |
43
+ | `func_name` | `string` | Name of the disassembled function |
44
+ | `asm` | `string` | `objdump -d -S` output for one function (AT&T syntax, source lines interleaved) |
45
+ | `explanation` | `string` | Structured description: commit type, function name, author, date, commit message, and role |
46
+ | `commit_message` | `string` | First 512 characters of the commit message |
47
+
48
+ ---
49
+
50
+ ## Usage
51
+
52
+ ```python
53
+ from datasets import load_dataset
54
+
55
+ ds = load_dataset("theelderemo/linux-asm-pairs", split="train")
56
+ print(ds["asm"])
57
+ print(ds["explanation"])
58
+ ```
59
+
60
+ Filter to only bug-fix commits:
61
+ ```python
62
+ bfc_only = ds.filter(lambda x: x["commit_type"] == "bfc")
63
+ ```
64
+
65
+ ---
66
+
67
+ ## Data Pipeline
68
+
69
+ 1. BFC/BIC pairs sourced from `bfc_bic.csv` in [Zenodo record 10654193](https://zenodo.org/records/10654193)
70
+ 2. Full diffs fetched from a local bare clone of the Linux kernel git repo (snapshot: 2023-11-12)
71
+ 3. Changed `.c` / `.h` files compiled with `gcc -O2 -g -fno-inline -fno-omit-frame-pointer`
72
+ 4. Functions extracted via `objdump -d -S --no-show-raw-insn`
73
+ 5. Explanations constructed from Perceval-parsed commit metadata
74
+
75
+ ---
76
+
77
+ ## License
78
+
79
+ 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](https://www.kernel.org/doc/html/latest/process/license-rules.html) for details.
80
+
81
+ ---
82
+
83
+ ## Citation
84
+
85
+ If you use this dataset, please also cite the upstream source:
86
+
87
+ ```bibtex
88
+ @dataset{linux_commits_2023,
89
+ title = {Linux Commits Dataset},
90
+ year = {2023},
91
+ url = {https://zenodo.org/records/10654193}
92
+ }
93
+
94
+ @dataset{theelderemo_linux_asm_pairs_2026,
95
+ author = {theelderemo},
96
+ title = {Linux Kernel Assembly → Explanation Dataset},
97
+ year = {2026},
98
+ url = {https://huggingface.co/datasets/theelderemo/linux-asm-pairs},
99
+ note = {Derived from the Linux Commits Dataset (Zenodo 10654193). Assembly extracted via GCC + objdump from BFC/BIC commit pairs in the Linux kernel git history.}
100
+ }
101
+ ```