All of lore.kernel.org
 help / color / mirror / Atom feed
* [MAINTAINERS SUMMIT] The place of AI code review in the Linux Kernel process
@ 2026-07-15 16:55 Roman Gushchin
  2026-07-15 17:51 ` Miguel Ojeda
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Roman Gushchin @ 2026-07-15 16:55 UTC (permalink / raw)
  To: ksummit

Sashiko and AI code reviews in general have gained a lot of traction in
the kernel community over the last few months. I think it is fair to say
that at this point there are no more questions about the usefulness of
AI code review in general. However, there are many questions about how
to improve current workflows and better integrate them into the kernel
development process.

Some specific topics I propose we discuss:
* Review of LTS patches and kernel releases.
Currently, Sashiko reviews only publicly proposed changes, and it is
completely up to individual maintainers whether to take the findings
into account. By starting to review kernel releases and LTS backports,
we can likely significantly improve security and minimize the number of
regressions. However, this adds to the workload of maintainers, and we
need to agree on a specific process. For example, we could agree to
bring up only critical and high-severity issues and expect the authors
of corresponding changes to provide a fix-up or explain why it is not an
issue.

* How to maintain the long-term stability of Sashiko?
Several kernel engineers and maintainers have rightfully expressed
concerns about relying on infrastructure provided by a single company
without clear formal guarantees. It would be great to discuss what a
more sustainable model could realistically look like and how we might
get there.

* Handling of pre-existing bugs.
Currently, Sashiko reports pre-existing bugs alongside new issues
(while trying hard to highlight that these issues were not introduced by
the proposed change). This approach comes with significant pros (a
steady stream of bug fixes) and cons (additional noise and workload for
maintainers). I am considering a database of pre-existing issues to
ensure they are reported only once (or once per year), with an option
for the respective maintainers to flag them as false positives. This
will also provide maintainers an access to a deduplicated and ranked
list of potential issues in their subsystem’s codebase.

* Prompt development and testing.
Currently, prompts are maintained in two GitHub repositories and are
changed manually or with the help of AI coding agents. However, there is
no established practice for testing them, especially across various LLM
models. At the last LSFMMBPF conference, there was a discussion about
moving them into the kernel tree. I see some pros and cons to this
approach, but the ownership and testing models are not entirely clear.

* Interactive mode.
Many engineers have asked for some sort of interactive mode where they
can ask additional questions or follow up on the initial feedback from
Sashiko. I plan to add this to the local review mode, but for the
central public instance, it is problematic from both security and token
cost perspectives. Sashiko could analyze false-positive cases reported by
engineers, attempt to verify them, and automatically suggest specific
prompt adjustments. However, there is a non-trivial number of cases
where people are wrong to dismiss AI findings. How should we treat these
cases?

Thanks!

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

* Re: [MAINTAINERS SUMMIT] The place of AI code review in the Linux Kernel process
  2026-07-15 16:55 [MAINTAINERS SUMMIT] The place of AI code review in the Linux Kernel process Roman Gushchin
@ 2026-07-15 17:51 ` Miguel Ojeda
  2026-07-15 21:37   ` Roman Gushchin
  2026-07-15 17:56 ` Mauro Carvalho Chehab
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 7+ messages in thread
From: Miguel Ojeda @ 2026-07-15 17:51 UTC (permalink / raw)
  To: Roman Gushchin; +Cc: ksummit

On Wed, Jul 15, 2026 at 6:55 PM Roman Gushchin <roman.gushchin@linux.dev> wrote:
>
> * Review of LTS patches and kernel releases.

For the backporting case, I think this could help, and there are
certain things we could ask for, i.e. custom prompts.

It may also have less noise, in the sense that the AI has the original
commit in mainline as a baseline, i.e. it is not a completely new
patch of unknown quality.

I imagine Sasha et al. have experience with this.

> * How to maintain the long-term stability of Sashiko?

How hard do you think it would be to get at least one more AI company
to donate some tokens (for their own model)? Could that be a simple
start to begin reducing the single-provider issue?

> * Handling of pre-existing bugs.

Do you mean the AI would be able to query that database? Or directly
being part of the prompt for that subsystem/file if it is not too big?

Ideally some of those cases would just be a comment in the source code
(like we already do) -- local and in-band, and it may help other
readers too.

> * Prompt development and testing.

Yeah, it is pretty much a black box at the moment, especially since a
maintainer doesn't control the runs, i.e. even worse than a local LLM
that one can do several quick tries etc.

Regarding putting the prompts into the tree, that sounds similar to
the in-tree CI files. That could help, but I wonder if it should be as
general, shared guidelines for a subsystem (i.e. useful for humans
too) or truly LLM-only notes (i.e. to overcome certain weaknesses of
the AI etc.).

> * Interactive mode.

Could this access be restricted to, say, people with Gitolite access
or similar, and rate limited somehow?

I am pretty sure you already thought of this, but I wonder how feasible it is.

Thanks!

Cheers,
Miguel

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

* Re: [MAINTAINERS SUMMIT] The place of AI code review in the Linux Kernel process
  2026-07-15 16:55 [MAINTAINERS SUMMIT] The place of AI code review in the Linux Kernel process Roman Gushchin
  2026-07-15 17:51 ` Miguel Ojeda
@ 2026-07-15 17:56 ` Mauro Carvalho Chehab
  2026-07-15 18:57 ` Jason Gunthorpe
  2026-07-15 19:45 ` Dmitry Torokhov
  3 siblings, 0 replies; 7+ messages in thread
From: Mauro Carvalho Chehab @ 2026-07-15 17:56 UTC (permalink / raw)
  To: Roman Gushchin; +Cc: ksummit

On Wed, 15 Jul 2026 16:55:03 +0000
Roman Gushchin <roman.gushchin@linux.dev> wrote:

> Sashiko and AI code reviews in general have gained a lot of traction in
> the kernel community over the last few months. I think it is fair to say
> that at this point there are no more questions about the usefulness of
> AI code review in general. However, there are many questions about how
> to improve current workflows and better integrate them into the kernel
> development process.

Heh, I was about to propose the same theme. IMO, we do need to discuss
more about AI, specially after the discussions related to linux-media
and Sashiko that it is happening those days.

---

Besides code review, there's one area I also want to propose some
discussions: 

Use AI to fix documentation issues
----------------------------------

If we run:

	$ scripts/kernel-doc -Wall .

it will generate a ~77k warnings due to bad documentation. This
includes files that are not currently on Documentation, but even if
we pick just the ones included there, the number is really big.

Several of them are there since the beginning, and we ended removing
-Wall from kernel-doc generation to avoid a too noisy documentation
build.

I'm proposing to discuss using AI to at least partially address
the documentation warning noise and then finally enable -Wall for
kernel-doc warnings.

---


> Some specific topics I propose we discuss:
> * Review of LTS patches and kernel releases.
> Currently, Sashiko reviews only publicly proposed changes, and it is
> completely up to individual maintainers whether to take the findings
> into account. By starting to review kernel releases and LTS backports,
> we can likely significantly improve security and minimize the number of
> regressions. However, this adds to the workload of maintainers, and we
> need to agree on a specific process. For example, we could agree to
> bring up only critical and high-severity issues and expect the authors
> of corresponding changes to provide a fix-up or explain why it is not an
> issue.

Makes sense to me, but I would start with very specific prompts to
check issues where LLM is particularly good on checking, and where
compiler warnings don't report.

One such area is to check error paths: Kernel works reasonably
well when registration/memory allocation/resource allocation/...
succeeds, but there is a large number of fix patches that sometimes
take several years to be applied related to error condition
failures.

Also, if we're willing to do that, it is probably be worth to
have something similar to what we had in Coverity: an interface
where maintainers could navigate at the found issues, with their
fixes, ordered by priority, and eventually tag as false positive,
preventing future reports of the same issue.

> * How to maintain the long-term stability of Sashiko?
> Several kernel engineers and maintainers have rightfully expressed
> concerns about relying on infrastructure provided by a single company
> without clear formal guarantees. It would be great to discuss what a
> more sustainable model could realistically look like and how we might
> get there.

IMO, the solution is to use open source LLM models, preferably in
a way they could run outside the cloud.

> * Handling of pre-existing bugs.
> Currently, Sashiko reports pre-existing bugs alongside new issues
> (while trying hard to highlight that these issues were not introduced by
> the proposed change). This approach comes with significant pros (a
> steady stream of bug fixes) and cons (additional noise and workload for
> maintainers). 

> I am considering a database of pre-existing issues to
> ensure they are reported only once (or once per year), with an option
> for the respective maintainers to flag them as false positives. This
> will also provide maintainers an access to a deduplicated and ranked
> list of potential issues in their subsystem’s codebase.

Makes total sense to me.

> 
> * Prompt development and testing.
> Currently, prompts are maintained in two GitHub repositories and are
> changed manually or with the help of AI coding agents. However, there is
> no established practice for testing them, especially across various LLM
> models. At the last LSFMMBPF conference, there was a discussion about
> moving them into the kernel tree. I see some pros and cons to this
> approach, but the ownership and testing models are not entirely clear.

I don't think it is a good idea to move to the Kernel tree, but
it makes sense to have them on a shared repository (or database)
where each maintainer can be able to adjust the prompts as needed.

For this to work properly, IMO we need an interface to be able to
trigger a test on Sashiko using the new prompts and see the output
differences before/after the changes, before committing it to
production. Perhaps we can use github/gitlab workflows for such
purpose, I dunno.

> * Interactive mode.
> Many engineers have asked for some sort of interactive mode where they
> can ask additional questions or follow up on the initial feedback from
> Sashiko. I plan to add this to the local review mode, but for the
> central public instance, it is problematic from both security and token
> cost perspectives. Sashiko could analyze false-positive cases reported by
> engineers, attempt to verify them, and automatically suggest specific
> prompt adjustments. However, there is a non-trivial number of cases
> where people are wrong to dismiss AI findings. How should we treat these
> cases?

An interactive mode is important, together with the capability of
running it locally on affordable GPUs. For this to work, we may need
to have a Linux-Kernel sashiko trained model that could be executed
locally with a limited number of active parameters.

Thanks,
Mauro

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

* Re: [MAINTAINERS SUMMIT] The place of AI code review in the Linux Kernel process
  2026-07-15 16:55 [MAINTAINERS SUMMIT] The place of AI code review in the Linux Kernel process Roman Gushchin
  2026-07-15 17:51 ` Miguel Ojeda
  2026-07-15 17:56 ` Mauro Carvalho Chehab
@ 2026-07-15 18:57 ` Jason Gunthorpe
  2026-07-15 21:21   ` Roman Gushchin
  2026-07-15 19:45 ` Dmitry Torokhov
  3 siblings, 1 reply; 7+ messages in thread
From: Jason Gunthorpe @ 2026-07-15 18:57 UTC (permalink / raw)
  To: Roman Gushchin; +Cc: ksummit

On Wed, Jul 15, 2026 at 04:55:03PM +0000, Roman Gushchin wrote:
> * Handling of pre-existing bugs.
> Currently, Sashiko reports pre-existing bugs alongside new issues
> (while trying hard to highlight that these issues were not introduced by
> the proposed change). This approach comes with significant pros (a
> steady stream of bug fixes) and cons (additional noise and workload for
> maintainers). I am considering a database of pre-existing issues to
> ensure they are reported only once (or once per year), with an option
> for the respective maintainers to flag them as false positives. This
> will also provide maintainers an access to a deduplicated and ranked
> list of potential issues in their subsystem’s codebase.

I would really like a syzkaller like dashboard of all these
pre-existing issues and a nag/summary email so they actually get
fixed.

I've gone and fixed a bunch on my own, mostly out of fear that they
will just disappear and be lost, but it is an annoying urgency. I'd
rather have as a giant todo list (that maybe other people could help
with too)

Often alot of tokens are spent to find these things, it feels wrong
that they are effectively lost in the endless stream of reviews..

> * Prompt development and testing.
> Currently, prompts are maintained in two GitHub repositories and are
> changed manually or with the help of AI coding agents. However, there is
> no established practice for testing them, especially across various LLM
> models. At the last LSFMMBPF conference, there was a discussion about
> moving them into the kernel tree. I see some pros and cons to this
> approach, but the ownership and testing models are not entirely clear.

Having them in the kernel always felt better to me, I wonder what the
cons are.

> Many engineers have asked for some sort of interactive mode where they
> can ask additional questions or follow up on the initial feedback from
> Sashiko. I plan to add this to the local review mode, but for the
> central public instance, it is problematic from both security and token
> cost perspectives. 

Could there some way to download the entire context from all the passes
to a local environment and have a local llm chew on it to answer
questions?

Jason

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

* Re: [MAINTAINERS SUMMIT] The place of AI code review in the Linux Kernel process
  2026-07-15 16:55 [MAINTAINERS SUMMIT] The place of AI code review in the Linux Kernel process Roman Gushchin
                   ` (2 preceding siblings ...)
  2026-07-15 18:57 ` Jason Gunthorpe
@ 2026-07-15 19:45 ` Dmitry Torokhov
  3 siblings, 0 replies; 7+ messages in thread
From: Dmitry Torokhov @ 2026-07-15 19:45 UTC (permalink / raw)
  To: Roman Gushchin; +Cc: ksummit

On Wed, Jul 15, 2026 at 04:55:03PM +0000, Roman Gushchin wrote:
> 
> * Handling of pre-existing bugs.
> Currently, Sashiko reports pre-existing bugs alongside new issues
> (while trying hard to highlight that these issues were not introduced by
> the proposed change). This approach comes with significant pros (a
> steady stream of bug fixes) and cons (additional noise and workload for
> maintainers). I am considering a database of pre-existing issues to
> ensure they are reported only once (or once per year), with an option
> for the respective maintainers to flag them as false positives. This
> will also provide maintainers an access to a deduplicated and ranked
> list of potential issues in their subsystem’s codebase.

Having database and either flagging issues or tweaking the prompts would
be nice.

Also I feel that if we simply had separate sections in the review, one
giving feedback (including "all clear") strictly on the patch itself,
and another one stating something like:

*** Pre-existng issues identified during patch analysis (address at will) ***

and then listing all other issues would help recipients (and maintainers
too).

Thanks.

-- 
Dmitry

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

* Re: [MAINTAINERS SUMMIT] The place of AI code review in the Linux Kernel process
  2026-07-15 18:57 ` Jason Gunthorpe
@ 2026-07-15 21:21   ` Roman Gushchin
  0 siblings, 0 replies; 7+ messages in thread
From: Roman Gushchin @ 2026-07-15 21:21 UTC (permalink / raw)
  To: Jason Gunthorpe; +Cc: ksummit

Jason Gunthorpe <jgg@nvidia.com> writes:

> On Wed, Jul 15, 2026 at 04:55:03PM +0000, Roman Gushchin wrote:
>> * Handling of pre-existing bugs.
>> Currently, Sashiko reports pre-existing bugs alongside new issues
>> (while trying hard to highlight that these issues were not introduced by
>> the proposed change). This approach comes with significant pros (a
>> steady stream of bug fixes) and cons (additional noise and workload for
>> maintainers). I am considering a database of pre-existing issues to
>> ensure they are reported only once (or once per year), with an option
>> for the respective maintainers to flag them as false positives. This
>> will also provide maintainers an access to a deduplicated and ranked
>> list of potential issues in their subsystem’s codebase.
>
> I would really like a syzkaller like dashboard of all these
> pre-existing issues and a nag/summary email so they actually get
> fixed.
>
> I've gone and fixed a bunch on my own, mostly out of fear that they
> will just disappear and be lost, but it is an annoying urgency. I'd
> rather have as a giant todo list (that maybe other people could help
> with too)
>
> Often alot of tokens are spent to find these things, it feels wrong
> that they are effectively lost in the endless stream of reviews..
>
>> * Prompt development and testing.
>> Currently, prompts are maintained in two GitHub repositories and are
>> changed manually or with the help of AI coding agents. However, there is
>> no established practice for testing them, especially across various LLM
>> models. At the last LSFMMBPF conference, there was a discussion about
>> moving them into the kernel tree. I see some pros and cons to this
>> approach, but the ownership and testing models are not entirely clear.
>
> Having them in the kernel always felt better to me, I wonder what the
> cons are.

A minor problem is that for prompts there is no point to stick to the
kernel release schedule (merge window, etc), which will only slow down
things. So it requires Linus being onboard with the idea to accept these
pull requests all the time.

But also I hope that eventually (and I work on it) we can at least
enhance prompts in a semi-automatic way, based on the human feedback in
email replies to sashiko reviews. It's not trivial, requires
verification and likely a human in the loop at least initially,
but I hope that mid-term it might turn the whole process into
more-or-less continuously self-improving system.

Having prompts in the kernel tree will also have an interesting
side-effect: newer models will learn on SOME version of these prompts
and then get a newer version as a prompt. Idk how it will play out.

That said, I'm not against putting prompts into the kernel tree at all.
I'm just saying the testing and ownership questions are real and need
a real discussion.

>> Many engineers have asked for some sort of interactive mode where they
>> can ask additional questions or follow up on the initial feedback from
>> Sashiko. I plan to add this to the local review mode, but for the
>> central public instance, it is problematic from both security and token
>> cost perspectives. 
>
> Could there some way to download the entire context from all the passes
> to a local environment and have a local llm chew on it to answer
> questions?

Yeah, it's an option I though about. Like a download button which just
dumps all relevant context as an .md file, for example.

Thanks!

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

* Re: [MAINTAINERS SUMMIT] The place of AI code review in the Linux Kernel process
  2026-07-15 17:51 ` Miguel Ojeda
@ 2026-07-15 21:37   ` Roman Gushchin
  0 siblings, 0 replies; 7+ messages in thread
From: Roman Gushchin @ 2026-07-15 21:37 UTC (permalink / raw)
  To: Miguel Ojeda; +Cc: ksummit

Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> writes:

> On Wed, Jul 15, 2026 at 6:55 PM Roman Gushchin <roman.gushchin@linux.dev> wrote:
>>
>> * Review of LTS patches and kernel releases.
>
> For the backporting case, I think this could help, and there are
> certain things we could ask for, i.e. custom prompts.

+1

> It may also have less noise, in the sense that the AI has the original
> commit in mainline as a baseline, i.e. it is not a completely new
> patch of unknown quality.
>
> I imagine Sasha et al. have experience with this.
>
>> * How to maintain the long-term stability of Sashiko?
>
> How hard do you think it would be to get at least one more AI company
> to donate some tokens (for their own model)? Could that be a simple
> start to begin reducing the single-provider issue?

It's hard to say. Technically it's fairly trivial to make Sashiko using
multiple models for discovery stages 1-7 in parallel, which will almost
certainly improve the review quality. In such case models will
effectively cooperate to produce better reviews, which is our goal.

>> * Handling of pre-existing bugs.
>
> Do you mean the AI would be able to query that database? Or directly
> being part of the prompt for that subsystem/file if it is not too big?

Yes, Sashiko can query the database before reporting pre-existing
issues, e.g. if there is an obvious but not urgent pre-existing bug
there is no point to report it again and again.

Thanks!

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

end of thread, other threads:[~2026-07-15 21:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-15 16:55 [MAINTAINERS SUMMIT] The place of AI code review in the Linux Kernel process Roman Gushchin
2026-07-15 17:51 ` Miguel Ojeda
2026-07-15 21:37   ` Roman Gushchin
2026-07-15 17:56 ` Mauro Carvalho Chehab
2026-07-15 18:57 ` Jason Gunthorpe
2026-07-15 21:21   ` Roman Gushchin
2026-07-15 19:45 ` Dmitry Torokhov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.