renef_kcov
Collect Linux kernel coverage with KCOV by starting, pausing, resetting, and reading recorded PCs or AFL-style edge hashes for dynamic analysis of Android ARM64 targets.
Instructions
Kernel coverage collection via Linux KCOV (KCov.* API; requires kernel CONFIG_KCOV=y).
Manages a session-wide _kcov handle in the target's Lua VM.
Actions:
start: Open/sys/kernel/debug/kcovwith optionalbuf_size(default 256K entries) and enable recordingenable: Re-enable recording on the open_kcovhandledisable: Pause recording (buffer preserved forcollect/edges)count: Return number of recorded kernel PCs without copyingcollect: Collect recorded kernel PC addresses (hex list, capped atmax_entries)edges: Compute AFL-style unique kernel edge hashes and total edge countreset: Clear the KCOV buffer for a fresh measurementstop: Disable and close the KCOV handle
Args:
action: "start", "enable", "disable", "count", "collect", "edges", "reset", or "stop"
buf_size: Number of PC entries for action="start" (0 = default 256K entries / 2MB)
max_entries: Maximum PCs/edges returned in JSON (default: 256, max: 8192)
Returns: JSON object with coverage state or collected kernel PCs/edges
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"action": "<action>"
},
"name": "renef_kcov"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | ||
| buf_size | No | ||
| max_entries | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |