From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8290AC77B77 for ; Mon, 17 Apr 2023 07:30:18 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 140EA10E3A2; Mon, 17 Apr 2023 07:30:18 +0000 (UTC) Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7AE2710E06B; Sat, 15 Apr 2023 05:27:40 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 46480601E3; Sat, 15 Apr 2023 05:27:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1F3E2C433D2; Sat, 15 Apr 2023 05:27:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1681536457; bh=kZR8ns5F4Bcc2fBZdAJkdaZdvVij/HL8fonVpVxmF5o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=tgzqhriUxI6WynT+M/ainvFueDAIE9XMhjUOpMUhaLqWyQ20KH4aBkrNQuS7emj8c Fsou7e2+b2D1W4taJQ8/uY1y/D6oLiBtxcOmIMBypROx5BrQgUyq+ZzEZM/YooxQXg rEEG9EQqNAPRQU/N7UGXUF+we+3k6HkxqotYRyuE= Date: Sat, 15 Apr 2023 07:27:34 +0200 From: Greg Kroah-Hartman To: Lorenzo Stoakes Subject: Re: [PATCH 1/7] mm/gup: remove unused vmas parameter from get_user_pages() Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Mailman-Approved-At: Mon, 17 Apr 2023 07:30:15 +0000 X-BeenThere: amd-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for AMD gfx List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Dimitri Sivanich , Xinhui Pan , Arnd Bergmann , kvm@vger.kernel.org, David Hildenbrand , dri-devel@lists.freedesktop.org, x86@kernel.org, linux-kernel@vger.kernel.org, Matthew Wilcox , linux-mm@kvack.org, Jarkko Sakkinen , Ingo Molnar , Borislav Petkov , amd-gfx@lists.freedesktop.org, Daniel Vetter , "H . Peter Anvin" , Paolo Bonzini , Andrew Morton , David Airlie , Thomas Gleixner , linux-sgx@vger.kernel.org Errors-To: amd-gfx-bounces@lists.freedesktop.org Sender: "amd-gfx" On Sat, Apr 15, 2023 at 12:27:13AM +0100, Lorenzo Stoakes wrote: > No invocation of get_user_pages() uses the vmas parameter, so remove > it. > > The GUP API is confusing and caveated. Recent changes have done much to > improve that, however there is more we can do. Exporting vmas is a prime > target as the caller has to be extremely careful to preclude their use > after the mmap_lock has expired or otherwise be left with dangling > pointers. > > Removing the vmas parameter focuses the GUP functions upon their primary > purpose - pinning (and outputting) pages as well as performing the actions > implied by the input flags. > > This is part of a patch series aiming to remove the vmas parameter > altogether. > > Signed-off-by: Lorenzo Stoakes > Suggested-by: Matthew Wilcox (Oracle) Acked-by: Greg Kroah-Hartman From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9C824C7619A for ; Sat, 15 Apr 2023 05:27:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229746AbjDOF1k (ORCPT ); Sat, 15 Apr 2023 01:27:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229462AbjDOF1k (ORCPT ); Sat, 15 Apr 2023 01:27:40 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E6082559D; Fri, 14 Apr 2023 22:27:38 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 496C7603F7; Sat, 15 Apr 2023 05:27:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1F3E2C433D2; Sat, 15 Apr 2023 05:27:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1681536457; bh=kZR8ns5F4Bcc2fBZdAJkdaZdvVij/HL8fonVpVxmF5o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=tgzqhriUxI6WynT+M/ainvFueDAIE9XMhjUOpMUhaLqWyQ20KH4aBkrNQuS7emj8c Fsou7e2+b2D1W4taJQ8/uY1y/D6oLiBtxcOmIMBypROx5BrQgUyq+ZzEZM/YooxQXg rEEG9EQqNAPRQU/N7UGXUF+we+3k6HkxqotYRyuE= Date: Sat, 15 Apr 2023 07:27:34 +0200 From: Greg Kroah-Hartman To: Lorenzo Stoakes Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrew Morton , Matthew Wilcox , David Hildenbrand , x86@kernel.org, linux-sgx@vger.kernel.org, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, kvm@vger.kernel.org, Thomas Gleixner , Ingo Molnar , Borislav Petkov , Jarkko Sakkinen , "H . Peter Anvin" , Xinhui Pan , David Airlie , Daniel Vetter , Dimitri Sivanich , Arnd Bergmann , Paolo Bonzini Subject: Re: [PATCH 1/7] mm/gup: remove unused vmas parameter from get_user_pages() Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-sgx@vger.kernel.org On Sat, Apr 15, 2023 at 12:27:13AM +0100, Lorenzo Stoakes wrote: > No invocation of get_user_pages() uses the vmas parameter, so remove > it. > > The GUP API is confusing and caveated. Recent changes have done much to > improve that, however there is more we can do. Exporting vmas is a prime > target as the caller has to be extremely careful to preclude their use > after the mmap_lock has expired or otherwise be left with dangling > pointers. > > Removing the vmas parameter focuses the GUP functions upon their primary > purpose - pinning (and outputting) pages as well as performing the actions > implied by the input flags. > > This is part of a patch series aiming to remove the vmas parameter > altogether. > > Signed-off-by: Lorenzo Stoakes > Suggested-by: Matthew Wilcox (Oracle) Acked-by: Greg Kroah-Hartman From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E2F2BC77B73 for ; Sat, 15 Apr 2023 05:27:42 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D9B8810E06B; Sat, 15 Apr 2023 05:27:41 +0000 (UTC) Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7AE2710E06B; Sat, 15 Apr 2023 05:27:40 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 46480601E3; Sat, 15 Apr 2023 05:27:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1F3E2C433D2; Sat, 15 Apr 2023 05:27:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1681536457; bh=kZR8ns5F4Bcc2fBZdAJkdaZdvVij/HL8fonVpVxmF5o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=tgzqhriUxI6WynT+M/ainvFueDAIE9XMhjUOpMUhaLqWyQ20KH4aBkrNQuS7emj8c Fsou7e2+b2D1W4taJQ8/uY1y/D6oLiBtxcOmIMBypROx5BrQgUyq+ZzEZM/YooxQXg rEEG9EQqNAPRQU/N7UGXUF+we+3k6HkxqotYRyuE= Date: Sat, 15 Apr 2023 07:27:34 +0200 From: Greg Kroah-Hartman To: Lorenzo Stoakes Subject: Re: [PATCH 1/7] mm/gup: remove unused vmas parameter from get_user_pages() Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Dimitri Sivanich , Xinhui Pan , Arnd Bergmann , kvm@vger.kernel.org, David Hildenbrand , dri-devel@lists.freedesktop.org, x86@kernel.org, linux-kernel@vger.kernel.org, Matthew Wilcox , linux-mm@kvack.org, Jarkko Sakkinen , Ingo Molnar , Borislav Petkov , amd-gfx@lists.freedesktop.org, "H . Peter Anvin" , Paolo Bonzini , Andrew Morton , Thomas Gleixner , linux-sgx@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Sat, Apr 15, 2023 at 12:27:13AM +0100, Lorenzo Stoakes wrote: > No invocation of get_user_pages() uses the vmas parameter, so remove > it. > > The GUP API is confusing and caveated. Recent changes have done much to > improve that, however there is more we can do. Exporting vmas is a prime > target as the caller has to be extremely careful to preclude their use > after the mmap_lock has expired or otherwise be left with dangling > pointers. > > Removing the vmas parameter focuses the GUP functions upon their primary > purpose - pinning (and outputting) pages as well as performing the actions > implied by the input flags. > > This is part of a patch series aiming to remove the vmas parameter > altogether. > > Signed-off-by: Lorenzo Stoakes > Suggested-by: Matthew Wilcox (Oracle) Acked-by: Greg Kroah-Hartman