[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211207160508.6ef48f273c1ae14c0d02c6ac@linux-foundation.org>
Date: Tue, 7 Dec 2021 16:05:08 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: Pasha Tatashin <pasha.tatashin@...een.com>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org,
linux-doc@...r.kernel.org, rientjes@...gle.com, pjt@...gle.com,
weixugc@...gle.com, gthelen@...gle.com, mingo@...hat.com,
corbet@....net, will@...nel.org, rppt@...nel.org,
keescook@...omium.org, tglx@...utronix.de, peterz@...radead.org,
masahiroy@...nel.org, samitolvanen@...gle.com,
dave.hansen@...ux.intel.com, x86@...nel.org, frederic@...nel.org,
hpa@...or.com, aneesh.kumar@...ux.ibm.com, jirislaby@...nel.org,
songmuchun@...edance.com, qydwhotmail@...il.com
Subject: Re: [PATCH v2 3/4] mm: page table check
On Sat, 4 Dec 2021 18:23:13 +0000 Pasha Tatashin <pasha.tatashin@...een.com> wrote:
> Check user page table entries at the time they are added and removed.
>
> Allows to synchronously catch memory corruption issues related to double
> mapping.
>
> When a pte for an anonymous page is added into page table, we verify that
> this pte does not already point to a file backed page, and vice versa if
> this is a file backed page that is being added we verify that this page
> does not have an anonymous mapping
>
> We also enforce that read-only sharing for anonymous pages is allowed
> (i.e. cow after fork). All other sharing must be for file pages.
>
> Page table check allows to protect and debug cases where "struct page"
> metadata became corrupted for some reason. For example, when refcnt or
> mapcount become invalid.
>
> ...
>
> --- a/arch/Kconfig
> +++ b/arch/Kconfig
> @@ -1307,6 +1307,9 @@ config HAVE_ARCH_PFN_VALID
> config ARCH_SUPPORTS_DEBUG_PAGEALLOC
> bool
>
> +config ARCH_SUPPORTS_PAGE_TABLE_CHECK
> + bool
> +
I guess a dependency on CONFIG_DEBUG_VM would be appropriate?
Powered by blists - more mailing lists