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: <58FFF1A3-DC37-4D9F-ABF0-3C5DA519BFFB@gmail.com>
Date:   Thu, 10 Nov 2022 10:43:25 -0800
From:   Nadav Amit <nadav.amit@...il.com>
To:     Peter Xu <peterx@...hat.com>
Cc:     linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        Mike Rapoport <rppt@...ux.vnet.ibm.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Axel Rasmussen <axelrasmussen@...gle.com>,
        Andrea Arcangeli <aarcange@...hat.com>,
        Ives van Hoorne <ives@...esandbox.io>
Subject: Re: [PATCH 2/2] mm/uffd: Sanity check write bit for uffd-wp protected
 ptes

On Nov 10, 2022, at 7:17 AM, Peter Xu <peterx@...hat.com> wrote:

> +#ifdef CONFIG_DEBUG_VM
> +	/*
> +	 * Having write bit for wr-protect-marked present ptes is fatal,
> +	 * because it means the uffd-wp bit will be ignored and write will
> +	 * just go through.
> +	 *
> +	 * Use any chance of pgtable walking to verify this (e.g., when
> +	 * page swapped out or being migrated for all purposes). It means
> +	 * something is already wrong.  Tell the admin even before the
> +	 * process crashes. We also nail it with wrong pgtable setup.
> +	 */
> +	WARN_ON_ONCE(wp && pte_write(pte));

How about VM_WARN_ON_ONCE() and no ifdef?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ