<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-next.git/kernel/api/kapi_debugfs.c, branch master</title>
<subtitle>Linux kernel latest source</subtitle>
<id>http://mirrors.hust.edu.cn/git/linux-next.git/atom?h=master</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/linux-next.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/'/>
<updated>2026-10-07T22:26:44+00:00</updated>
<entry>
<title>kernel/api: add debugfs interface for kernel API specifications</title>
<updated>2026-10-07T22:26:44+00:00</updated>
<author>
<name>Sasha Levin</name>
<email>sashal@kernel.org</email>
</author>
<published>2025-06-24T18:07:35+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/linux-next.git/commit/?id=89224dc705016dd40cce6c924148e31f0a0dbbb0'/>
<id>urn:sha1:89224dc705016dd40cce6c924148e31f0a0dbbb0</id>
<content type='text'>
Add a debugfs interface, enabled by CONFIG_KAPI_SPEC_DEBUGFS, to expose
kernel API specifications at runtime. This allows tools and users to
query the complete API specifications through the debugfs filesystem.

The interface provides:
- /sys/kernel/debug/kapi/list - lists all available API specifications
- /sys/kernel/debug/kapi/specs/&lt;name&gt; - detailed info for each API
- /sys/kernel/debug/kapi/specs-json/&lt;name&gt; - the same spec as JSON

Each specification file includes:
- Function name, version, and descriptions
- Execution context requirements and flags
- Parameter details with types, flags, and constraints
- Return value specifications and success conditions
- Error codes with descriptions and conditions
- Locking requirements and constraints
- Signal handling specifications
- Examples and notes

This enables runtime introspection of kernel APIs for documentation
tools, static analyzers, and debugging purposes.

Assisted-by: LLM
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
</feed>
