lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <37511fa2-baed-c387-150c-3fa6b5b1c64f@kernel.org>
Date:   Wed, 1 Dec 2021 09:38:16 +0100
From:   Jiri Slaby <jirislaby@...nel.org>
To:     Pasha Tatashin <pasha.tatashin@...een.com>,
        linux-kernel@...r.kernel.org, linux-mm@...ck.org,
        linux-doc@...r.kernel.org, akpm@...ux-foundation.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
Subject: Re: [PATCH 2/3] mm: page table check

On 23. 11. 21, 22:48, Pasha Tatashin 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.
> 
> Signed-off-by: Pasha Tatashin <pasha.tatashin@...een.com>
...
> --- a/mm/Kconfig.debug
> +++ b/mm/Kconfig.debug
> @@ -62,6 +62,30 @@ config PAGE_OWNER
>   
>   	  If unsure, say N.
>   
> +config PAGE_TABLE_CHECK
> +	bool "Check for invalid mappings in user page tables"
> +	depends on ARCH_SUPPORTS_PAGE_TABLE_CHECK
> +	select PAGE_EXTENSION
> +	help
> +	  Check that anonymous page is not being mapped twice with read write
> +	  permissions. Check that anonymous and file pages are not being
> +	  erroneously shared. Since the checking is performed at the time
> +	  entries are added and removed to user page tables, leaking, corruption
> +	  and double mapping problems are detected synchronously.
> +
> +	  If unsure say "n".
> +
> +config PAGE_TABLE_CHECK_ENFORCED
> +	bool "Enforce the page table checking by defauled"

s/defauled/default/

regards,
-- 
js
suse labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ