From: Andrew Morton <akpm@linux-foundation.org>
To: Hyunwoo Kim <imv4bel@gmail.com>
Cc: david@kernel.org, ljs@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, stable@vger.kernel.org,
Max Boone <mboone@akamai.com>
Subject: Re: [PATCH v2 1/2] mm/pagewalk: fix stale walk->action escaping walk_pmd_range()
Date: Tue, 11 Aug 2026 14:57:56 -0700 [thread overview]
Message-ID: <20260811145756.6a9af6f7d3d04c8b00a0f3ee@linux-foundation.org> (raw)
In-Reply-To: <anuDYOPa0kTD9bul@v4bel>
On Wed, 12 Aug 2026 05:17:36 +0900 Hyunwoo Kim <imv4bel@gmail.com> wrote:
> On Tue, Aug 11, 2026 at 12:37:02PM -0700, Andrew Morton wrote:
> > On Wed, 12 Aug 2026 01:18:57 +0900 Hyunwoo Kim <imv4bel@gmail.com> wrote:
> >
> > > If ->pmd_entry() sets walk->action = ACTION_AGAIN, the pmd_none()
> > > check is retried. The PMD entry may be cleared at the point of retry.
> > >
> > > In this case, if walk->ops->install_pte is not specified, the code
> > > continues to the next PMD entry in the range without resetting
> > > walk->action to ACTION_SUBTREE.
> > >
> > > This leaves walk->action erroneously set to ACTION_AGAIN, which is
> > > incorrect.
> > >
> > > This was incorrect but not problematic up until commit 3b89863c3fa4
> > > ("mm/pagewalk: fix race between concurrent split and refault")
> > > which updated walk_pud_range() to check for walk->action ==
> > > ACTION_AGAIN upon walk_pmd_range()'s return, causing the PUD walk
> > > to be retried.
> > >
> > > In this case this results in duplicate walk callbacks being
> > > invoked, which is erroneous and will break any caller that is not
> > > idempotent with respect to this (and waste time for those which
> > > are).
> >
> > "break". Please describe the breakage completely. It's really the
> > most important information in the whole effort.
> >
> > IOW, when fixing a bug please describe the userspace-visible runtime
> > effects of that bug.
> >
> > eg, what were the results of the fuzzer?
>
> To be precise, this is an out-of-bounds write.
>
> > Is there a Link:?
>
> This came from a local fuzzer, so there is no Link:
OK, thanks.
>
> > A stack trace?
>
> ...
>
> Should I send a v3 with the changelog fixed? (in 24 hours, I guess?)
>
That's OK, I pasted it in there.
next prev parent reply other threads:[~2026-08-11 21:58 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-11 16:18 [PATCH v2 0/2] mm/pagewalk: fix stale walk->action escaping walk_pmd_range() Hyunwoo Kim
2026-08-11 16:18 ` [PATCH v2 1/2] " Hyunwoo Kim
2026-08-11 16:23 ` Lorenzo Stoakes (ARM)
2026-08-11 17:10 ` David Hildenbrand (Arm)
2026-08-11 19:37 ` Andrew Morton
2026-08-11 20:17 ` Hyunwoo Kim
2026-08-11 21:57 ` Andrew Morton [this message]
2026-08-11 16:18 ` [PATCH v2 2/2] selftests/mm: add stale walk->action race test Hyunwoo Kim
2026-08-11 16:33 ` Lorenzo Stoakes (ARM)
2026-08-11 17:11 ` David Hildenbrand (Arm)
2026-08-11 18:23 ` Lorenzo Stoakes (ARM)
2026-08-11 18:49 ` David Hildenbrand (Arm)
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=20260811145756.6a9af6f7d3d04c8b00a0f3ee@linux-foundation.org \
--to=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=ljs@kernel.org \
--cc=mboone@akamai.com \
--cc=mhocko@suse.com \
--cc=rppt@kernel.org \
--cc=stable@vger.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 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.