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]
Date:	Thu, 2 Oct 2014 09:41:54 -0700
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Mel Gorman <mgorman@...e.de>
Cc:	Dave Jones <davej@...hat.com>, Hugh Dickins <hughd@...gle.com>,
	Al Viro <viro@...iv.linux.org.uk>,
	Rik van Riel <riel@...hat.com>,
	Ingo Molnar <mingo@...hat.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Aneesh Kumar <aneesh.kumar@...ux.vnet.ibm.com>,
	Michel Lespinasse <walken@...gle.com>,
	Kirill A Shutemov <kirill.shutemov@...ux.intel.com>,
	Linux Kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/4] mm: migrate: Close race between migration completion
 and mprotect

On Thu, Oct 2, 2014 at 6:29 AM, Mel Gorman <mgorman@...e.de> wrote:
> +
> +       /* Recheck VMA as permissions can change during migration started  */
> +       if (is_write_migration_entry(entry) && (vma->vm_flags & (VM_WRITE)))
>                 pte = pte_mkwrite(pte);

Side note: we have a "maybe_mkwrite()" helper for the VM_WRITE testing
case. So I'd almost do this as

        if (is_write_migration_entry(entry))
                pte = maybe_mkwrite(pte, vma);

instead.

              Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ