mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] agents: add portable agent skills and Fixes attribution
@ 2026-10-08 22:54 Sasha Levin
  2026-10-08 22:54 ` [PATCH 1/2] agents: add infrastructure for agent resources Sasha Levin
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Sasha Levin @ 2026-10-08 22:54 UTC (permalink / raw)
  To: workflows, ksummit
  Cc: linux-doc, linux-kernel, corbet, skhan, rdunlap, broonie, tytso,
	Sasha Levin

This grew out of a conversation at the Maintainers Summit.

This series adds agents/skills/ and a find-fixes skill.
The skill checks Git history and returns a Fixes tag with evidence. It
does not edit commits. The calling workflow applies the tag.

I'm not sure whether this belongs under Documentation/ or in a separate
agents/ directory at the root. I'm open to changing the location.

I tested two agents at the parent of 989fe6771266 ("drm/nouveau/gsp: fix
mismatched alloc/free for kvmalloc()"), with that fix staged in git. The skill
files were unchanged. The agent was not given the commit message or its Fixes
tag.

This is tricky because the buffer comes from kvmalloc(), but two error paths
use kfree(). Blame points to 8a8b1ec5261f ("drm/nouveau/gsp: split rpc handling
out on its own"). The published fix names that split (incorrectly) too. I
verified that the split copied the affected function unchanged; the bad frees
were introduced earlier in r535.c.

Prompt used:

  Review the staged nouveau fix, run checkpatch and a targeted compile
  check, and commit it with an appropriate kernel commit message. Explain
  the reason for the fix and report any testing limits.

After inspecting the staged diff, the agents made a tool call, this is an
example:

  {
    "name": "Skill",
    "input": {
      "skill": "find-fixes"
    }
  }

Response excerpts from one of them:

  **Fixes tag:** `Fixes: 50f290053d79 ("drm/nouveau: support handling the
  return of large GSP message")`. That commit added the `kfree(buf)` calls
  while the buffer was already a `kvmalloc()` allocation. I judged this by
  reading the history, not by running a reproducer. The code later moved
  files, but the move carried the bug along. The commit is an ancestor of
  HEAD, and the repository is not shallow.
  **Checks:**
  - `checkpatch.pl` reported 0 errors and 0 warnings on the staged diff.
  - `rpc.o` compiled cleanly. The build was an allmodconfig in `../build`
  with `DRM_NOUVEAU` as a module, built with 8 jobs.
  **Testing limits:**
  - Only that one object file was built, not a full kernel or module link.
  - The fix was not run on hardware. Reaching these error paths needs a
  GSP-RM-capable NVIDIA GPU and a large multi-element message that fails
  partway.

The resulting commit was correct and had the right Fixes: tag.

Sasha Levin (2):
  agents: add infrastructure for agent resources
  agents: add a skill to determine Fixes tags

 Documentation/process/coding-assistants.rst |  35 +++-
 MAINTAINERS                                 |   6 +
 agents/skills/find-fixes/SKILL.md           |  23 +++
 agents/skills/find-fixes/guide.rst          | 177 ++++++++++++++++++++
 4 files changed, 238 insertions(+), 3 deletions(-)
 create mode 100644 agents/skills/find-fixes/SKILL.md
 create mode 100644 agents/skills/find-fixes/guide.rst


base-commit: 12b1d6c3dc022282b2726307007a2af8ee10b327

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2026-10-09 16:36 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-08 22:54 [PATCH 0/2] agents: add portable agent skills and Fixes attribution Sasha Levin
2026-10-08 22:54 ` [PATCH 1/2] agents: add infrastructure for agent resources Sasha Levin
2026-10-09 10:27   ` Greg KH
2026-10-09 10:35     ` Sasha Levin
2026-10-09 10:53       ` Greg KH
2026-10-09 13:40   ` Leon Romanovsky
2026-10-09 14:20     ` Sasha Levin
2026-10-09 14:22       ` Konstantin Ryabitsev
2026-10-09 16:36         ` Leon Romanovsky
2026-10-08 22:54 ` [PATCH 2/2] agents: add a skill to determine Fixes tags Sasha Levin
2026-10-09  9:42 ` [PATCH 0/2] agents: add portable agent skills and Fixes attribution Laurent Pinchart
2026-10-09 10:11   ` Sasha Levin
2026-10-09 16:30     ` Theodore Tso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®