[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aHbcBJV04fZoV6wF@hyeyoo>
Date: Wed, 16 Jul 2025 07:53:56 +0900
From: Harry Yoo <harry.yoo@...cle.com>
To: Luiz Capitulino <luizcap@...hat.com>
Cc: david@...hat.com, willy@...radead.org, akpm@...ux-foundation.org,
linux-kernel@...r.kernel.org, linux-mm@...ck.org, shivankg@....com,
sj@...nel.org
Subject: Re: [PATCH v3 0/4] mm: introduce snapshot_page()
On Mon, Jul 14, 2025 at 09:16:50AM -0400, Luiz Capitulino wrote:
> Hi,
>
> The series introduction will follow the changelog. This is against bc9ff192a6c9 .
>
> Changelog
> =========
>
> v2 -> v3
> - Small snapshot_page() refactor to simplify and fix stack-out-of-bugs bug
> reported by Harry Yoo
> - Use clear_compound_head() in snapshot_page() (Shivank)
> - Read head pointer from ps->page_snapshot() for tail page case (Shivank)
> - Improve comments and macro name in snapshot_page() (David)
>
> v1 -> v2
> - Include is_huge_zero_pfn() patch and use it (David)
> - Move free page detection to snapshot_page() (David)
> - Changelog improvements (Shivank)
> - Added Acked-bys
>
> RFC -> v1
> - Include <linux/page_idle.h> to avoid build error on sh arch
>
> Introduction
> ============
>
> This series introduces snapshot_page(), a helper function that can be used
> to create a snapshot of a struct page and its associated struct folio.
>
> This function is intended to help callers with a consistent view of a
> a folio while reducing the chance of encountering partially updated or
> inconsistent state, such as during folio splitting which could lead to
> crashes and BUG_ON()s being triggered.
>
> David Hildenbrand (1):
> mm/memory: introduce is_huge_zero_pfn() and use it in
> vm_normal_page_pmd()
>
> Luiz Capitulino (3):
> mm/util: introduce snapshot_page()
> proc: kpagecount: use snapshot_page()
> fs: stable_page_flags(): use snapshot_page()
>
> fs/proc/page.c | 50 +++++++++++++++-----------
> include/linux/huge_mm.h | 12 ++++++-
> include/linux/mm.h | 19 ++++++++++
> mm/debug.c | 42 +++-------------------
> mm/memory.c | 2 +-
> mm/util.c | 79 +++++++++++++++++++++++++++++++++++++++++
> 6 files changed, 144 insertions(+), 60 deletions(-)
>
> --
Haha, I was waiting for this!
The previously reported KASAN splats have completely disappeared on my
testbed.
Please feel free to add,
Tested-by: Harry Yoo <harry.yoo@...cle.com>
--
Cheers,
Harry / Hyeonggon
Powered by blists - more mailing lists