Re: [RFC v2 00/22] Kernel API specification framework
From: Sasha Levin
Date: Tue Jul 01 2025 - 10:59:07 EST
On Mon, Jun 30, 2025 at 07:43:42PM -0700, Jake Edge wrote:
Hi Sasha,
On Tue, Jun 24 2025 14:07 -0400, Sasha Levin <sashal@xxxxxxxxxx> wrote:
Hey folks,
This is a second attempt at a "Kernel API Specification" framework,
addressing the feedback from the initial RFC and expanding the scope
to include sysfs attribute specifications.
In light of your talk at OSS last week [1] (for non-subscribers [2]), I
am wondering if any of this code has been written by coding LLMs. It
seems like the kind of unpleasant boilerplate that they are said to be
good at generating, but also seems like an enormous blob of "code" to
review. What is the status of this specification in that regard?
Hey Jake!
The macro definitions were done mostly manually: it ended up being
more of a copy/paste/replace exercise to get all the different macros in
place (which, yes, ended up being a huge blob).
For the syscall/ioctl/sysfs APIs I used to demonstrate the
infrastructure, I started with defining the basic spec skeleton manually
based on our existing docs and code review, but then had LLMs extend it
based on it's review of the code.
If we do proceed with something along the lines of this spec, I can see
LLMs being useful at reviewing incoming code changes and alerting us of
required updates/changes to the spec (or, alerting us that we're
breaking the spec). Think of something like AUTOSEL but for
classification of commits that affect the userspace API.
The tools/kapi/ code is mostly mostly LLM generated.
--
Thanks,
Sasha