From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Steven Price <steven.price@arm.com>,
linux-mm@kvack.org,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
Michael Ellerman <mpe@ellerman.id.au>,
dja@axtens.net, Oliver O'Halloran <oohall@gmail.com>,
linux-arch@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] mm: pagewalk: Fix walk for hugepage tables
Date: Mon, 28 Jun 2021 07:56:20 +0200 [thread overview]
Message-ID: <ecf71f68-d25e-c0c6-4c2a-b181b836ac43@csgroup.eu> (raw)
In-Reply-To: <20210627181226.983d899cc30c02420e1a6af5@linux-foundation.org>
Le 28/06/2021 à 03:12, Andrew Morton a écrit :
> On Fri, 25 Jun 2021 05:10:12 +0000 (UTC) Christophe Leroy <christophe.leroy@csgroup.eu> wrote:
>
>> Pagewalk ignores hugepd entries and walk down the tables
>> as if it was traditionnal entries, leading to crazy result.
>>
>> Add walk_hugepd_range() and use it to walk hugepage tables.
>
> More details, please? I assume "crazy result" is userspace visible?
> For how long has this bug existed? Is a -stable backport needed? Has
> a Fixes: commit been identified? etcetera!
>
I discovered the problem while porting powerpc to generic page table dump.
The generic page table dump uses walk_page_range_novma() .
Yes, "crazy result" is that when dumping /sys/kernel/debug/kernel_page_tables, you get random
entries because at the time being the pagewalk code sees huge page directories as standard page tables.
The bug has always existed as far as I can see, but as no other architectures than powerpc use huge
page directories, it only pops up now when powerpc is trying to use that generic page walking code.
So I don't think it is worth a backport to -stable, and about a Fixes: tag I don't know.
IIUC, hugepd was introduced for the first time in mm by commit cbd34da7dc9a ("mm: move the powerpc
hugepd code to mm/gup.c")
Before that, hugepd was internal to powerpc.
I guess you are asking about Fixes: tag and backporting because of the patch subject.
Should I reword the page subject to something like "mm: enable the generic page walk code to walk
huge page directories" ?
next prev parent reply other threads:[~2021-06-28 5:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-25 5:10 Christophe Leroy
2021-06-28 1:12 ` Andrew Morton
2021-06-28 5:56 ` Christophe Leroy [this message]
2021-06-28 6:03 ` Aneesh Kumar K.V
2021-06-28 6:19 ` Christophe Leroy
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=ecf71f68-d25e-c0c6-4c2a-b181b836ac43@csgroup.eu \
--to=christophe.leroy@csgroup.eu \
--cc=akpm@linux-foundation.org \
--cc=benh@kernel.crashing.org \
--cc=dja@axtens.net \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=oohall@gmail.com \
--cc=paulus@samba.org \
--cc=steven.price@arm.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