Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Lorenzo Stoakes (ARM)" <ljs@kernel.org>
To: Andi Kleen <andi@firstfloor.org>
Cc: Pedro Falcato <pfalcato@suse.de>, Andi Kleen <ak@kernel.org>,
	 akpm@linux-foundation.org, liam@infradead.org, jannh@google.com,
	linux-mm@kvack.org,  linux-kernel@vger.kernel.org
Subject: Re: [PATCH] RCU safety for vma maple tree walks
Date: Wed, 2 Sep 2026 17:21:51 +0100	[thread overview]
Message-ID: <aphJ7olxr-_VhDKt@gremlin> (raw)
In-Reply-To: <apc-F_D5mWwWL74i@firstfloor.org>

Hi Andi,

Looking at https://lore.kernel.org/lkml/20260831150651.1134594-6-ak@kernel.org/
I can see the cause of your issue - it's your own patch, exactly as we've been
telling you.

You're inserting a VMA on a uprobe_mmap() call, which is completely incorrect:

<munmap()>
  -> vma_complete()
    -> uprobe_mmap(vp->insert)
      -> install_breakpoint()
        -> ...
	  -> create_uprobe_ptwrite_page()
	    -> _install_special_mapping()

Now you're inserting a VMA, using an entirely distinct iterator, while an
existing VMA iterator is in use.

That means you can end up rebalancing the tree and _trashing the iterator_ in
the core mm code.

Your (LLM's) proposed solution to this was to keep on doing the completely
broken thing, but by inserting various RCU locks, preventing a KASAN report on
use-after-free's due to avoiding an RCU grace period expiring.

You can't reproduce this upstream, because the bug is in your (RFC) series.

So, exactly as we've been trying to tell you.

> Assisted-by: omp:gpt-5.6-luna

I'm a little grumpy about this as you've taken up a bunch of our time to assess
two sets of completely broken LLM-generated code, and you've mostly responded by
denying what the authors of this code have repeatedly told you.

You also seem to be using one of the lightest weight LLM models - it isn't a
great choice for core kernel work, especially in areas you are unfamiliar with.

In future, please audit the code and make sure you understand every part of it
as per https://docs.kernel.org/process/generated-content.html

	As with the output of any tooling, the result may be incorrect or
	inappropriate. You are expected to understand and to be able to defend
	everything you submit. If you are unable to do so, then do not submit
	the resulting changes.

Please respect our time moving forwards, thanks.

--
Cheers, Lorenzo


  reply	other threads:[~2026-09-02 16:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-31 14:35 [PATCH] RCU safety for vma maple tree walks Andi Kleen
2026-08-31 14:58 ` Pedro Falcato
2026-08-31 19:35   ` Andi Kleen
2026-08-31 19:55     ` Lorenzo Stoakes (ARM)
2026-09-01 21:05       ` Andi Kleen
2026-09-02 16:21         ` Lorenzo Stoakes (ARM) [this message]
2026-08-31 15:50 ` Lorenzo Stoakes (ARM)
2026-08-31 16:29 ` Liam R. Howlett
2026-08-31 16:52   ` Andi Kleen
2026-08-31 22:13     ` Liam R. Howlett

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aphJ7olxr-_VhDKt@gremlin \
    --to=ljs@kernel.org \
    --cc=ak@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=andi@firstfloor.org \
    --cc=jannh@google.com \
    --cc=liam@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=pfalcato@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox