From: Byungchul Park <byungchul@sk.com>
To: David Hildenbrand <david@redhat.com>
Cc: "Helge Deller" <deller@kernel.org>,
"Toke Høiland-Jørgensen" <toke@redhat.com>,
"Linux Memory Management List" <linux-mm@kvack.org>,
"Linux parisc List" <linux-parisc@vger.kernel.org>,
"Andrew Morton" <akpm@linux-foundation.org>,
kernel_team@skhynix.com
Subject: Re: [PATCH] Fix 32-bit boot failure due inaccurate page_pool_page_is_pp()
Date: Wed, 17 Sep 2025 13:26:40 +0900 [thread overview]
Message-ID: <20250917042640.GA62248@system.software.com> (raw)
In-Reply-To: <cf235550-f29b-4f22-b5b5-c3e7a576239d@redhat.com>
On Fri, Sep 12, 2025 at 05:49:15PM +0200, David Hildenbrand wrote:
> On 12.09.25 17:04, Helge Deller wrote:
> > Commit ee62ce7a1d90 ("page_pool: Track DMA-mapped pages and unmap them when
> > destroying the pool") changed PP_MAGIC_MASK from 0xFFFFFFFC to 0xc000007c on
> > 32-bit platforms.
> >
> > The function page_pool_page_is_pp() uses PP_MAGIC_MASK to identify page pool
> > pages, but the remaining bits are not sufficient to unambiguously identify
> > such pages any longer.
> >
> > So page_pool_page_is_pp() now sometimes wrongly reports pages as page pool
> > pages and as such triggers a kernel BUG as it believes it found a page pool
> > leak.
> >
> > There are patches upcoming where page_pool_page_is_pp() will not depend on
> > PP_MAGIC_MASK and instead use page flags to identify page pool pages. Until
> > those patches are merged, the easiest temporary fix is to disable the check
> > on 32-bit platforms.
> >
> > Cc: David Hildenbrand <david@redhat.com>
> > Cc: Toke Høiland-Jørgensen <toke@redhat.com>
> > Cc: Linux Memory Management List <linux-mm@kvack.org>
> > Cc: Linux parisc List <linux-parisc@vger.kernel.org>
> > Cc: <stable@vger.kernel.org> # v6.15+
> > Signed-off-by: Helge Deller <deller@gmx.de>
> > Link: https://www.spinics.net/lists/kernel/msg5849623.html
> > Fixes: ee62ce7a1d90 ("page_pool: Track DMA-mapped pages and unmap them when destroying the pool")
> >
> > diff --git a/include/linux/mm.h b/include/linux/mm.h
> > index 1ae97a0b8ec7..f3822ae70a81 100644
> > --- a/include/linux/mm.h
> > +++ b/include/linux/mm.h
> > @@ -4190,7 +4190,7 @@ int arch_lock_shadow_stack_status(struct task_struct *t, unsigned long status);
> > */
> > #define PP_MAGIC_MASK ~(PP_DMA_INDEX_MASK | 0x3UL)
> >
> > -#ifdef CONFIG_PAGE_POOL
> > +#if defined(CONFIG_PAGE_POOL) && defined(CONFIG_64BIT)
> > static inline bool page_pool_page_is_pp(const struct page *page)
> > {
> > treturn (page->pp_magic & PP_MAGIC_MASK) == PP_SIGNATURE;
> >
>
> As a temporary fix this LGTM.
Sure. As a temporary fix, why not.
I need to start the work replacing page_pool_page_is_pp() with using
page type again tho.
Byungchul
> But I want to hear other opinions.
>
> Acked-by: David Hildenbrand <david@redhat.com>
>
> --
> Cheers
>
> David / dhildenb
>
next prev parent reply other threads:[~2025-09-17 4:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-12 15:04 [PATCH] Fix 32-bit boot failure due inaccurate page_pool_page_is_pp() Helge Deller
2025-09-12 15:49 ` David Hildenbrand
2025-09-17 4:26 ` Byungchul Park [this message]
2025-09-12 22:47 ` Andrew Morton
2025-09-12 23:05 ` Helge Deller
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=20250917042640.GA62248@system.software.com \
--to=byungchul@sk.com \
--cc=akpm@linux-foundation.org \
--cc=david@redhat.com \
--cc=deller@kernel.org \
--cc=kernel_team@skhynix.com \
--cc=linux-mm@kvack.org \
--cc=linux-parisc@vger.kernel.org \
--cc=toke@redhat.com \
/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;
as well as URLs for NNTP newsgroup(s).