Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753429AbdLMPGm (ORCPT ); Wed, 13 Dec 2017 10:06:42 -0500 Received: from merlin.infradead.org ([205.233.59.134]:44372 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752816AbdLMPGl (ORCPT ); Wed, 13 Dec 2017 10:06:41 -0500 Date: Wed, 13 Dec 2017 16:04:53 +0100 From: Peter Zijlstra To: "Kirill A. Shutemov" Cc: Dan Williams , Dave Hansen , Andy Lutomirski , Thomas Gleixner , LKML , X86 ML , Linus Torvalds , Borislav Petkov , Greg KH , Kees Cook , Hugh Dickins , Brian Gerst , Josh Poimboeuf , Denys Vlasenko , Boris Ostrovsky , Juergen Gross , David Laight , Eduardo Valentin , aliguori@amazon.com, Will Deacon , "linux-mm@kvack.org" , kirill.shutemov@linux.intel.com, aneesh.kumar@linux.vnet.ibm.com Subject: Re: [patch 05/16] mm: Allow special mappings with user access cleared Message-ID: <20171213150453.bj45oflflaevvqig@hirez.programming.kicks-ass.net> References: <20171212173221.496222173@linutronix.de> <20171212173333.669577588@linutronix.de> <20171213122211.bxcb7xjdwla2bqol@hirez.programming.kicks-ass.net> <20171213125739.fllckbl3o4nonmpx@node.shutemov.name> <20171213143455.oqigy6m53qhuu7k4@hirez.programming.kicks-ass.net> <20171213144339.ii5gk2arwg5ivr6b@node.shutemov.name> <20171213150007.fonxub6yzjh2iu2c@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171213150007.fonxub6yzjh2iu2c@hirez.programming.kicks-ass.net> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 638 Lines: 19 On Wed, Dec 13, 2017 at 04:00:07PM +0100, Peter Zijlstra wrote: > On Wed, Dec 13, 2017 at 05:43:39PM +0300, Kirill A. Shutemov wrote: > > > am I perchance looking at the wrong tee? > > > > I'm looking at Linus' tree. > > Clearly I'm not synced up enough... :/ > > > It was changed recently: > > 5c9d2d5c269c ("mm: replace pte_write with pte_access_permitted in fault + gup paths") > > > > Indeed. So FOLL_GET should also get these tests and, as you said, the > other levels too. > > I would like FOLL_POPULATE (doesn't have FOLL_GET) to be allowed > 'access'. Similarly, should we avoid arch_vma_access_permitted() if !FOLL_GET ?