From: Anshuman Khandual <anshuman.khandual@arm.com>
To: Christophe Leroy <christophe.leroy@csgroup.eu>,
Gavin Shan <gshan@redhat.com>
Cc: shan.gavin@gmail.com, chuhu@redhat.com,
akpm@linux-foundation.org, will@kernel.org,
catalin.marinas@arm.com, cai@lca.pw, aneesh.kumar@linux.ibm.com,
gerald.schaefer@linux.ibm.com, linux-kernel@vger.kernel.org,
linux-mm@kvack.org
Subject: Re: [PATCH v4 12/12] mm/debug_vm_pgtable: Fix corrupted page flag
Date: Wed, 28 Jul 2021 15:35:37 +0530 [thread overview]
Message-ID: <58a1eaa9-ba63-403b-1f4b-c22f23a3a0d3@arm.com> (raw)
In-Reply-To: <20210728095326.Horde.k1npSPaQKh2i7W3XoBsdiQ3@messagerie.c-s.fr>
On 7/28/21 1:23 PM, Christophe Leroy wrote:
> Gavin Shan <gshan@redhat.com> a écrit :
>
>> In page table entry modifying tests, set_xxx_at() are used to populate
>> the page table entries. On ARM64, PG_arch_1 (PG_dcache_clean) flag is
>> set to the target page flag if execution permission is given. The logic
>> exits since commit 4f04d8f00545 ("arm64: MMU definitions"). The page
>> flag is kept when the page is free'd to buddy's free area list. However,
>> it will trigger page checking failure when it's pulled from the buddy's
>> free area list, as the following warning messages indicate.
>>
>> BUG: Bad page state in process memhog pfn:08000
>> page:0000000015c0a628 refcount:0 mapcount:0 \
>> mapping:0000000000000000 index:0x1 pfn:0x8000
>> flags: 0x7ffff8000000800(arch_1|node=0|zone=0|lastcpupid=0xfffff)
>> raw: 07ffff8000000800 dead000000000100 dead000000000122 0000000000000000
>> raw: 0000000000000001 0000000000000000 00000000ffffffff 0000000000000000
>> page dumped because: PAGE_FLAGS_CHECK_AT_PREP flag(s) set
>>
>> This fixes the issue by clearing PG_arch_1 through flush_dcache_page()
>> after set_xxx_at() is called. For architectures other than ARM64, the
>> unexpected overhead of cache flushing is acceptable.
>>
>> Signed-off-by: Gavin Shan <gshan@redhat.com>
>
> Maybe a Fixes: tag would be good to have
Agreed.
Fixes: a5c3b9ffb0f4 ("mm/debug_vm_pgtable: add tests validating advanced arch page table helpers")
>
> And would it be possible to have this fix as first patch of the series so that it can be applied to stable without applying the whole series ?
Changing the allocation scheme does solve another problem (using non-owned pages)
but is achieved via the entire series applied. But this particular patch could be
moved to the beginning without much problem.
next prev parent reply other threads:[~2021-07-28 10:04 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-27 6:13 [PATCH v4 00/12] mm/debug_vm_pgtable: Enhancements Gavin Shan
2021-07-27 6:13 ` [PATCH v4 01/12] mm/debug_vm_pgtable: Introduce struct pgtable_debug_args Gavin Shan
2021-07-28 7:32 ` Anshuman Khandual
2021-07-28 7:38 ` Gavin Shan
2021-07-29 4:45 ` Anshuman Khandual
2021-07-29 9:40 ` Gavin Shan
2021-07-27 6:13 ` [PATCH v4 02/12] mm/debug_vm_pgtable: Use struct pgtable_debug_args in basic tests Gavin Shan
2021-07-29 4:53 ` Anshuman Khandual
2021-07-27 6:13 ` [PATCH v4 03/12] mm/debug_vm_pgtable: Use struct pgtable_debug_args in leaf and savewrite tests Gavin Shan
2021-07-29 5:00 ` Anshuman Khandual
2021-07-27 6:13 ` [PATCH v4 04/12] mm/debug_vm_pgtable: Use struct pgtable_debug_args in protnone and devmap tests Gavin Shan
2021-07-29 5:02 ` Anshuman Khandual
2021-07-27 6:13 ` [PATCH v4 05/12] mm/debug_vm_pgtable: Use struct pgtable_debug_args in soft_dirty and swap tests Gavin Shan
2021-07-29 5:07 ` Anshuman Khandual
2021-07-27 6:13 ` [PATCH v4 06/12] mm/debug_vm_pgtable: Use struct pgtable_debug_args in migration and thp tests Gavin Shan
2021-07-28 11:08 ` Anshuman Khandual
2021-07-28 23:54 ` Gavin Shan
2021-07-27 6:13 ` [PATCH v4 07/12] mm/debug_vm_pgtable: Use struct pgtable_debug_args in PTE modifying tests Gavin Shan
2021-07-29 5:16 ` Anshuman Khandual
2021-07-27 6:13 ` [PATCH v4 08/12] mm/debug_vm_pgtable: Use struct pgtable_debug_args in PMD " Gavin Shan
2021-07-29 5:30 ` Anshuman Khandual
2021-07-27 6:13 ` [PATCH v4 09/12] mm/debug_vm_pgtable: Use struct pgtable_debug_args in PUD " Gavin Shan
2021-07-29 5:44 ` Anshuman Khandual
2021-07-27 6:13 ` [PATCH v4 10/12] mm/debug_vm_pgtable: Use struct pgtable_debug_args in PGD and P4D " Gavin Shan
2021-07-29 5:51 ` Anshuman Khandual
2021-07-27 6:14 ` [PATCH v4 11/12] mm/debug_vm_pgtable: Remove unused code Gavin Shan
2021-07-29 5:59 ` Anshuman Khandual
2021-07-27 6:14 ` [PATCH v4 12/12] mm/debug_vm_pgtable: Fix corrupted page flag Gavin Shan
2021-07-28 7:53 ` Christophe Leroy
2021-07-28 10:05 ` Anshuman Khandual [this message]
2021-07-29 0:00 ` Gavin Shan
2021-07-29 6:05 ` Anshuman Khandual
2021-07-29 7:14 ` [PATCH v4 00/12] mm/debug_vm_pgtable: Enhancements Anshuman Khandual
2021-08-02 0:09 ` Gavin Shan
2021-08-02 4:53 ` Anshuman Khandual
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=58a1eaa9-ba63-403b-1f4b-c22f23a3a0d3@arm.com \
--to=anshuman.khandual@arm.com \
--cc=akpm@linux-foundation.org \
--cc=aneesh.kumar@linux.ibm.com \
--cc=cai@lca.pw \
--cc=catalin.marinas@arm.com \
--cc=christophe.leroy@csgroup.eu \
--cc=chuhu@redhat.com \
--cc=gerald.schaefer@linux.ibm.com \
--cc=gshan@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=shan.gavin@gmail.com \
--cc=will@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 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).