diff options
| author | Sasha Levin <sashal@kernel.org> | 2025-07-11 07:42:45 -0400 |
|---|---|---|
| committer | Sasha Levin <sashal@kernel.org> | 2026-10-07 18:26:44 -0400 |
| commit | ce4c52682d78fc08c9b1e2217aae6f00fa02bab3 (patch) | |
| tree | 04e29746babd97d3f4fc6b5beff753bb807ab31c /tools/lib/python/kdoc/python_version.py | |
| parent | a90ee4305c4a5df72c11b31dacfdc76e00fcf78a (diff) | |
| download | linux-next-ce4c52682d78fc08c9b1e2217aae6f00fa02bab3.tar.gz linux-next-ce4c52682d78fc08c9b1e2217aae6f00fa02bab3.zip | |
kernel/api: introduce kernel API specification framework
Add a framework for formally documenting kernel APIs with inline
specifications. This framework provides:
- Structured API documentation with parameter specifications, return
values, error conditions, and execution context requirements
- Runtime validation capabilities for debugging
(CONFIG_KAPI_RUNTIME_CHECKS)
- Support for both internal kernel APIs and system calls
The framework stores specifications in a dedicated ELF section and
provides infrastructure for:
- Runtime querying of API documentation
- Integration with existing SYSCALL_DEFINE macros
A KUnit suite (CONFIG_KAPI_KUNIT_TEST) covers registration, lookup,
parameter and return value validation, and JSON export.
No specifications are added here; subsequent patches add them for
individual syscalls. With CONFIG_KAPI_SPEC=n the SYSCALL_DEFINEx()
expansion is unchanged. CONFIG_KAPI_RUNTIME_CHECKS is a debug option:
a syscall whose arguments violate its specification returns -EINVAL
without running.
Assisted-by: LLM
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools/lib/python/kdoc/python_version.py')
0 files changed, 0 insertions, 0 deletions
