From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751699AbdBCS30 (ORCPT ); Fri, 3 Feb 2017 13:29:26 -0500 Received: from mail-ot0-f196.google.com ([74.125.82.196]:34091 "EHLO mail-ot0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751129AbdBCS3Y (ORCPT ); Fri, 3 Feb 2017 13:29:24 -0500 MIME-Version: 1.0 In-Reply-To: <20170203072952.GI27291@ZenIV.linux.org.uk> References: <20170124212327.14517-1-jlayton@redhat.com> <20170125133205.21704-1-jlayton@redhat.com> <20170202095125.GF27291@ZenIV.linux.org.uk> <20170202105651.GA32111@infradead.org> <20170202111625.GG27291@ZenIV.linux.org.uk> <1486040452.2812.6.camel@redhat.com> <20170203072952.GI27291@ZenIV.linux.org.uk> From: Linus Torvalds Date: Fri, 3 Feb 2017 10:29:23 -0800 X-Google-Sender-Auth: WJM23zHS0enl73uc70tcsanp0ng Message-ID: Subject: Re: [PATCH v3 0/2] iov_iter: allow iov_iter_get_pages_alloc to allocate more pages per call To: Al Viro Cc: Jeff Layton , Christoph Hellwig , linux-fsdevel , Linux Kernel Mailing List , Linux NFS Mailing List , ceph-devel , lustre-devel@lists.lustre.org, V9FS Developers , Jan Kara , Chris Wilson , "Kirill A. Shutemov" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 2, 2017 at 11:29 PM, Al Viro wrote: > > get_user_pages() relies upon find_extend_vma() to reject kernel > addresses; the fast side of get_user_pages_fast() doesn't have anything > of that sort It is *supposed* to have it. See pte_allows_gup(), for example. In particular, it requires the _PAGE_USER bit in the PTE (and the devpte case should require _PAGE_BIT_DEVMAP). So no, get_user_pages_fast() can not look up kernel pages. If it does, that would be a bug. Linus From mboxrd@z Thu Jan 1 00:00:00 1970 From: Linus Torvalds Subject: Re: [PATCH v3 0/2] iov_iter: allow iov_iter_get_pages_alloc to allocate more pages per call Date: Fri, 3 Feb 2017 10:29:23 -0800 Message-ID: References: <20170124212327.14517-1-jlayton@redhat.com> <20170125133205.21704-1-jlayton@redhat.com> <20170202095125.GF27291@ZenIV.linux.org.uk> <20170202105651.GA32111@infradead.org> <20170202111625.GG27291@ZenIV.linux.org.uk> <1486040452.2812.6.camel@redhat.com> <20170203072952.GI27291@ZenIV.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20170203072952.GI27291-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lustre-devel-bounces-aLEFhgZF4x6X6Mz3xDxJMA@public.gmane.org Sender: "lustre-devel" To: Al Viro Cc: Linux NFS Mailing List , Jan Kara , Jeff Layton , Linux Kernel Mailing List , Chris Wilson , Christoph Hellwig , linux-fsdevel , V9FS Developers , ceph-devel , "Kirill A. Shutemov" , lustre-devel-aLEFhgZF4x6X6Mz3xDxJMA@public.gmane.org List-Id: ceph-devel.vger.kernel.org On Thu, Feb 2, 2017 at 11:29 PM, Al Viro wrote: > > get_user_pages() relies upon find_extend_vma() to reject kernel > addresses; the fast side of get_user_pages_fast() doesn't have anything > of that sort It is *supposed* to have it. See pte_allows_gup(), for example. In particular, it requires the _PAGE_USER bit in the PTE (and the devpte case should require _PAGE_BIT_DEVMAP). So no, get_user_pages_fast() can not look up kernel pages. If it does, that would be a bug. Linus From mboxrd@z Thu Jan 1 00:00:00 1970 From: Linus Torvalds Date: Fri, 3 Feb 2017 10:29:23 -0800 Subject: [lustre-devel] [PATCH v3 0/2] iov_iter: allow iov_iter_get_pages_alloc to allocate more pages per call In-Reply-To: <20170203072952.GI27291@ZenIV.linux.org.uk> References: <20170124212327.14517-1-jlayton@redhat.com> <20170125133205.21704-1-jlayton@redhat.com> <20170202095125.GF27291@ZenIV.linux.org.uk> <20170202105651.GA32111@infradead.org> <20170202111625.GG27291@ZenIV.linux.org.uk> <1486040452.2812.6.camel@redhat.com> <20170203072952.GI27291@ZenIV.linux.org.uk> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Al Viro Cc: Linux NFS Mailing List , Jan Kara , Jeff Layton , Linux Kernel Mailing List , Chris Wilson , Christoph Hellwig , linux-fsdevel , V9FS Developers , ceph-devel , "Kirill A. Shutemov" , lustre-devel-aLEFhgZF4x6X6Mz3xDxJMA@public.gmane.org On Thu, Feb 2, 2017 at 11:29 PM, Al Viro wrote: > > get_user_pages() relies upon find_extend_vma() to reject kernel > addresses; the fast side of get_user_pages_fast() doesn't have anything > of that sort It is *supposed* to have it. See pte_allows_gup(), for example. In particular, it requires the _PAGE_USER bit in the PTE (and the devpte case should require _PAGE_BIT_DEVMAP). So no, get_user_pages_fast() can not look up kernel pages. If it does, that would be a bug. Linus