From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kara Subject: Re: [PATCH v4 2/3] mm: introduce MAP_VALIDATE a mechanism for adding new mmap flags Date: Mon, 18 Sep 2017 11:31:37 +0200 Message-ID: <20170918093137.GF32516@quack2.suse.cz> References: <150277752553.23945.13932394738552748440.stgit@dwillia2-desk3.amr.corp.intel.com> <150277753660.23945.11500026891611444016.stgit@dwillia2-desk3.amr.corp.intel.com> <20170815122701.GF27505@quack2.suse.cz> <20170917173945.GA22200@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20170917173945.GA22200-jcswGhMUV9g@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-nvdimm-bounces-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org Sender: "Linux-nvdimm" To: Christoph Hellwig Cc: Jan Kara , Arnd Bergmann , "linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org" , Linux API , "Darrick J. Wong" , Linux Kernel Mailing List , linux-xfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-mm , Andy Lutomirski , linux-fsdevel , Andrew Morton List-Id: linux-api@vger.kernel.org On Sun 17-09-17 19:39:45, Christoph Hellwig wrote: > On Sat, Sep 16, 2017 at 08:44:14PM -0700, Dan Williams wrote: > > So it wasn't all that easy, and Linus declined to take it. I think we > > should add a new ->mmap_validate() file operation and save the > > tree-wide cleanup until later. > > Note that we already have a mmap_capabilities callout for nommu, > I wonder if we could generalize that. So if I understood Dan right, Linus refused to merge the patch which adds 'flags' argument to ->mmap callback. That is actually logically independent change from validating flags passed to mmap(2) syscall. Dan did it just to save himself from adding a VMA flag for MAP_DIRECT. For validating flags passed to mmap(2), I agree we could use ->mmap_capabilities() instead of mmap_supported_mask Dan has added. But I don't have a strong opinion there. Honza -- Jan Kara SUSE Labs, CR From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 455AC21D046A6 for ; Mon, 18 Sep 2017 02:28:42 -0700 (PDT) Date: Mon, 18 Sep 2017 11:31:37 +0200 From: Jan Kara Subject: Re: [PATCH v4 2/3] mm: introduce MAP_VALIDATE a mechanism for adding new mmap flags Message-ID: <20170918093137.GF32516@quack2.suse.cz> References: <150277752553.23945.13932394738552748440.stgit@dwillia2-desk3.amr.corp.intel.com> <150277753660.23945.11500026891611444016.stgit@dwillia2-desk3.amr.corp.intel.com> <20170815122701.GF27505@quack2.suse.cz> <20170917173945.GA22200@lst.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20170917173945.GA22200@lst.de> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" To: Christoph Hellwig Cc: Jan Kara , Arnd Bergmann , "linux-nvdimm@lists.01.org" , Linux API , "Darrick J. Wong" , Linux Kernel Mailing List , linux-xfs@vger.kernel.org, linux-mm , Andy Lutomirski , linux-fsdevel , Andrew Morton List-ID: On Sun 17-09-17 19:39:45, Christoph Hellwig wrote: > On Sat, Sep 16, 2017 at 08:44:14PM -0700, Dan Williams wrote: > > So it wasn't all that easy, and Linus declined to take it. I think we > > should add a new ->mmap_validate() file operation and save the > > tree-wide cleanup until later. > > Note that we already have a mmap_capabilities callout for nommu, > I wonder if we could generalize that. So if I understood Dan right, Linus refused to merge the patch which adds 'flags' argument to ->mmap callback. That is actually logically independent change from validating flags passed to mmap(2) syscall. Dan did it just to save himself from adding a VMA flag for MAP_DIRECT. For validating flags passed to mmap(2), I agree we could use ->mmap_capabilities() instead of mmap_supported_mask Dan has added. But I don't have a strong opinion there. Honza -- Jan Kara SUSE Labs, CR _______________________________________________ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de ([195.135.220.15]:35605 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755160AbdIRJbq (ORCPT ); Mon, 18 Sep 2017 05:31:46 -0400 Date: Mon, 18 Sep 2017 11:31:37 +0200 From: Jan Kara Subject: Re: [PATCH v4 2/3] mm: introduce MAP_VALIDATE a mechanism for adding new mmap flags Message-ID: <20170918093137.GF32516@quack2.suse.cz> References: <150277752553.23945.13932394738552748440.stgit@dwillia2-desk3.amr.corp.intel.com> <150277753660.23945.11500026891611444016.stgit@dwillia2-desk3.amr.corp.intel.com> <20170815122701.GF27505@quack2.suse.cz> <20170917173945.GA22200@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170917173945.GA22200@lst.de> Sender: linux-xfs-owner@vger.kernel.org List-ID: List-Id: xfs To: Christoph Hellwig Cc: Dan Williams , Jan Kara , "Darrick J. Wong" , Arnd Bergmann , "linux-nvdimm@lists.01.org" , Linux API , Linux Kernel Mailing List , linux-xfs@vger.kernel.org, linux-mm , Andy Lutomirski , linux-fsdevel , Andrew Morton On Sun 17-09-17 19:39:45, Christoph Hellwig wrote: > On Sat, Sep 16, 2017 at 08:44:14PM -0700, Dan Williams wrote: > > So it wasn't all that easy, and Linus declined to take it. I think we > > should add a new ->mmap_validate() file operation and save the > > tree-wide cleanup until later. > > Note that we already have a mmap_capabilities callout for nommu, > I wonder if we could generalize that. So if I understood Dan right, Linus refused to merge the patch which adds 'flags' argument to ->mmap callback. That is actually logically independent change from validating flags passed to mmap(2) syscall. Dan did it just to save himself from adding a VMA flag for MAP_DIRECT. For validating flags passed to mmap(2), I agree we could use ->mmap_capabilities() instead of mmap_supported_mask Dan has added. But I don't have a strong opinion there. Honza -- Jan Kara SUSE Labs, CR From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Mon, 18 Sep 2017 11:31:37 +0200 From: Jan Kara To: Christoph Hellwig Cc: Dan Williams , Jan Kara , "Darrick J. Wong" , Arnd Bergmann , "linux-nvdimm@lists.01.org" , Linux API , Linux Kernel Mailing List , linux-xfs@vger.kernel.org, linux-mm , Andy Lutomirski , linux-fsdevel , Andrew Morton Subject: Re: [PATCH v4 2/3] mm: introduce MAP_VALIDATE a mechanism for adding new mmap flags Message-ID: <20170918093137.GF32516@quack2.suse.cz> References: <150277752553.23945.13932394738552748440.stgit@dwillia2-desk3.amr.corp.intel.com> <150277753660.23945.11500026891611444016.stgit@dwillia2-desk3.amr.corp.intel.com> <20170815122701.GF27505@quack2.suse.cz> <20170917173945.GA22200@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170917173945.GA22200@lst.de> Sender: owner-linux-mm@kvack.org List-ID: On Sun 17-09-17 19:39:45, Christoph Hellwig wrote: > On Sat, Sep 16, 2017 at 08:44:14PM -0700, Dan Williams wrote: > > So it wasn't all that easy, and Linus declined to take it. I think we > > should add a new ->mmap_validate() file operation and save the > > tree-wide cleanup until later. > > Note that we already have a mmap_capabilities callout for nommu, > I wonder if we could generalize that. So if I understood Dan right, Linus refused to merge the patch which adds 'flags' argument to ->mmap callback. That is actually logically independent change from validating flags passed to mmap(2) syscall. Dan did it just to save himself from adding a VMA flag for MAP_DIRECT. For validating flags passed to mmap(2), I agree we could use ->mmap_capabilities() instead of mmap_supported_mask Dan has added. But I don't have a strong opinion there. Honza -- Jan Kara SUSE Labs, CR -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org