[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMgjq7B7+=_hfo+BZr-cyYayUCUhVQWRDsC7FGpMKAXdvY5_wQ@mail.gmail.com>
Date: Wed, 3 Dec 2025 10:53:51 +0800
From: Kairui Song <ryncsn@...il.com>
To: Deepanshu Kartikey <kartikey406@...il.com>
Cc: akpm@...ux-foundation.org, chrisl@...nel.org, shikemeng@...weicloud.com,
nphamcs@...il.com, bhe@...hat.com, baohua@...nel.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, YoungJun Park <youngjun.park@....com>,
syzbot+d7bc9ec4a100437aa7a2@...kaller.appspotmail.com
Subject: Re: [PATCH] mm/swapfile: validate swap offset in unuse_pte_range()
On Mon, Dec 1, 2025 at 6:48 PM Deepanshu Kartikey <kartikey406@...il.com> wrote:
>
> Hi Kairui,
>
> Thank you for the detailed feedback!
You are welcome :),
> > But it seems the report is no longer triggering after the softleaf v3
> > change right? Checking the syzbot link, last reproduce was 11/11
>
> You're right - I should have checked the syzbot status more carefully.
> If softleaf v3 has already fixed this, then this patch may not be
> needed.
>
> Could you point me to which specific change in softleaf v3 fixed it?
> I'd like to understand the root cause better.
This one, I think Lorenzo included it or a similar fix along with
another fix in swapfile.c:
https://lore.kernel.org/all/CAMgjq7AP383YfU3L5ZxJ9U3x-vRPnEkEUtmnPdXD29HiNC8OrA@mail.gmail.com/
>
> > What kind of race will lead to a invalid swap entry in the page table?
>
> You make a good point. I was speculating about possible causes without
> concrete evidence.
>
> > I'm not against a sanity check like this though, just want to double
> > check before we process.
>
> If softleaf v3 has fixed the underlying issue, I can withdraw this
> patch. Or if you think a defensive sanity check still has value, I can
> update the commit message to reflect that it is defensive hardening
> rather than a fix for an active bug.
A sanity check here is acceptable since swapoff is cold and the
overhead is hardly visible. No strong opinion on this one.
Powered by blists - more mailing lists