From: "Lorenzo Stoakes (ARM)" <ljs@kernel.org>
To: Hyunwoo Kim <imv4bel@gmail.com>
Cc: akpm@linux-foundation.org, david@kernel.org, liam@infradead.org,
vbabka@kernel.org, rppt@kernel.org, surenb@google.com,
mhocko@suse.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/pagewalk: fix stale walk->action escaping walk_pmd_range()
Date: Mon, 10 Aug 2026 16:55:25 +0100 [thread overview]
Message-ID: <annzcER_eGeBq_pY@lucifer> (raw)
In-Reply-To: <annzORC0NgSIsX39@v4bel>
On Tue, Aug 11, 2026 at 12:50:17AM +0900, Hyunwoo Kim wrote:
> On Mon, Aug 10, 2026 at 12:19:54PM +0100, Lorenzo Stoakes (ARM) wrote:
> > Since it's 2026 + this is your first patch in mm AFAICT,
>
> Yeah, my home town is netdev :)
Ah I see :) well welcome, this is regardless a useful bug fix so it's
appreciated!
> > So it's only if you're at the end of the PMD range that it's a problem
> > right?
>
> Yes, or more precisely when nothing after it sets walk->action = ACTION_SUBTREE.
Yeah I word this a bit better in my proposed commit message :)
>
> > You should say that.
> >
> > The user-visible problem here is that you can end up calling the callbacks
> > too many times which explicitly breaks mincore.
> >
> > Given I had to decode this it does make me wonder if you fully understand
> > this or if it's just unclear language. This sort of word salad is very
> > LLM-ish :)
>
> The commit message was written with help from the lovely Claude. Not the
> most readable, admittedly :)
Yeah I did wonder :)
I'm totally fine with using an LLM to help with language, especially if English
is not your primary language, but obviously it can go... wrong :)
So will always feedback if the commit message is unclear.
LLMs seem to have a habit of constructing word salads that end up effectively
like 'the code in English' which ends up confusing more than helping.
Key thing is keeping things as short and clear as possible.
> > Is it possible to add a self test that does something like this or is it too
> > racey to be practical?
>
> It looks quite race dependent. Triggering it deterministically would need
> some of the race window widening tricks from exploit work, which I don't
> think belongs in a selftest. I can still write one if you'd like.
Yeah that's what I wondered about. It might still be useful even if it's racey,
as long as obviously the _test itself_ isn't flakey :) and also - it can't take
too long to run, either.
It'd be good to have a regression test for this.
>
> >
> > >
> > > Move the reset to the first statement of the loop body. walk_pud_range()
> > > has the same shape and gets the same change; walk_p4d_range() never looks
> > > at walk->action, so that hunk keeps the two functions in sync rather than
> > > fixing a second bug.
> >
> > Your commit message doesn't mention how you discovered this. If it was AI
> > suggesting it (whether locally or sashiko in reply to some review) you
> > should reference it.
> >
> > If it was simply hardcore code inspection then you should say so too :)
>
> It was found by accident while fuzzing a different subsystem. Either way,
> the fuzzer itself was written by AI, so,
>
> Assisted-by: Claude:claude-opus-5
Ack thanks :)
>
> >
> > >
> > > Fixes: 3b89863c3fa4 ("mm/pagewalk: fix race between concurrent split and refault")
> > > Cc: stable@vger.kernel.org
> >
> > This all seems right.
> >
> > > Signed-off-by: Hyunwoo Kim <imv4bel@gmail.com>
> >
> > The fix itself looks right, but you need to address the other feedback and
> > respin (also please send a respin with at least 1 day's delay).
>
> OK, will do.
Great thanks!
>
>
> Best regards,
> Hyunwoo Kim
--
Cheers, Lorenzo
next prev parent reply other threads:[~2026-08-10 15:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-10 9:45 [PATCH] mm/pagewalk: fix stale walk->action escaping walk_pmd_range() Hyunwoo Kim
2026-08-10 11:19 ` Lorenzo Stoakes (ARM)
2026-08-10 15:50 ` Hyunwoo Kim
2026-08-10 15:55 ` Lorenzo Stoakes (ARM) [this message]
2026-08-10 18:16 ` Andrew Morton
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=annzcER_eGeBq_pY@lucifer \
--to=ljs@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=david@kernel.org \
--cc=imv4bel@gmail.com \
--cc=liam@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=rppt@kernel.org \
--cc=surenb@google.com \
--cc=vbabka@kernel.org \
/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