From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f72.google.com (mail-pg0-f72.google.com [74.125.83.72]) by kanga.kvack.org (Postfix) with ESMTP id 0AD976B02BC for ; Mon, 11 Sep 2017 07:45:20 -0400 (EDT) Received: by mail-pg0-f72.google.com with SMTP id j16so5520432pga.6 for ; Mon, 11 Sep 2017 04:45:20 -0700 (PDT) Received: from mx1.suse.de (mx2.suse.de. [195.135.220.15]) by mx.google.com with ESMTPS id 3si159913plf.495.2017.09.11.04.45.18 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 11 Sep 2017 04:45:18 -0700 (PDT) Date: Mon, 11 Sep 2017 13:45:15 +0200 From: Jan Kara Subject: Re: [RFC PATCH v8 2/2] mm: introduce MAP_SHARED_VALIDATE, a mechanism to safely define new mmap flags Message-ID: <20170911114515.GG8503@quack2.suse.cz> References: <150489930202.29460.5141541423730649272.stgit@dwillia2-desk3.amr.corp.intel.com> <150489931339.29460.8760855724603300792.stgit@dwillia2-desk3.amr.corp.intel.com> <20170911094714.GD8503@quack2.suse.cz> <20170911111030.GA20127@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170911111030.GA20127@lst.de> Sender: owner-linux-mm@kvack.org List-ID: To: Christoph Hellwig Cc: Jan Kara , Dan Williams , torvalds@linux-foundation.org, Arnd Bergmann , linux-nvdimm@lists.01.org, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Andy Lutomirski , Andrew Morton On Mon 11-09-17 13:10:30, Christoph Hellwig wrote: > On Mon, Sep 11, 2017 at 11:47:14AM +0200, Jan Kara wrote: > > On Fri 08-09-17 12:35:13, Dan Williams wrote: > > > The mmap(2) syscall suffers from the ABI anti-pattern of not validating > > > unknown flags. However, proposals like MAP_SYNC and MAP_DIRECT need a > > > mechanism to define new behavior that is known to fail on older kernels > > > without the support. Define a new MAP_SHARED_VALIDATE flag pattern that > > > is guaranteed to fail on all legacy mmap implementations. > > > > > > With this in place new flags can be defined as: > > > > > > #define MAP_new (MAP_SHARED_VALIDATE | val) > > > > Is this changelog stale? Given MAP_SHARED_VALIDATE will be new mapping > > type, I'd expect we define new flags just as any other mapping flags... > > I see no reason why MAP_SHARED_VALIDATE should be or'ed to that. > > Btw, I still think it should be a new hidden flag and not a new mapping > type. I brought this up last time, so maybe I missed the answer > to my concern. Hum, I don't remember your concern and the only comment from you to the last posting which I've found is: "no mmap3 syscall here :) Do you also need to update the nommu mmap implementation?" So I guess it's something else. So can you remind me or send a link? Thanks! 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