Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1206616imu; Fri, 9 Nov 2018 12:39:20 -0800 (PST) X-Google-Smtp-Source: AJdET5eRZiGUu0HdS3z6jRolO3AOhfHUWegBye49fIrFrm9xLEHsKth2dLS6OKXdrXPEbNRYTcG+ X-Received: by 2002:a17:902:bc44:: with SMTP id t4-v6mr10079761plz.300.1541795959993; Fri, 09 Nov 2018 12:39:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541795959; cv=none; d=google.com; s=arc-20160816; b=Qo1/3i4fsO3wzD9KpyvuV2drVIuRyuWXUmMSlNm2AJoE0fuKwb/YAHMHDWmXMGEBLf 61f92WxSq5puZd60oRBD3bQWhjIQMBP8JLZtLxiQsN3MiYp/jdeFJBQftwmC696YdVO7 ssUKddHC3b8DoVDguVObSmVe9ZNDhcDYlyiz54X6GM1q8zQ5Mh3VIx5/FBMHG6ljq0ys 80hipJJPiBSjMQD3gPC2UJQmzI4I1pUbxx1NtcDwtqWpjMTWbptX3hAFQAaq/xGM20S+ IBajylVpgEraOQzVmN+zquViLMM5o3cB97HC3dh0Z3kpWGVV85fkNDrlX9qMR1VhS4HD nlfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=9OlLtRD3v4C9cv5/5Wg7/TOVX6Ev6cHwtTLx5+MwGsY=; b=oPniMDYvUmpb8ZUB+MJnR70TPyWjjQEKbhtnTszW6UssPhN6rjZjmkv+5u9331OjXb HuEbZv2zegjexhJ9qeLv5xL114W1nvU+mAiHlEBIOe3SMXP72Yy91QR5xFukf9FfjBxQ YGSPWgIpKPzi7XKWDCmctN+FsU2M+OO/YDK3HhG6DmT4GohQMA7qUNcX3AaiLo46MPyV OG1KlgT43g23smxwxF0exUIqUU9h/9spxogruwXTrKSYINUpXKzQiil0+lpOrGYE1pRk EcMHo/Y2e6f8js5wcfrSTmapw3beJEU7s6Lt8AHxVOP18WLoCqm86BNg3IkDBl/JcnOW 8sRg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t25-v6si9396696pfj.53.2018.11.09.12.39.03; Fri, 09 Nov 2018 12:39:19 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728454AbeKJGSs (ORCPT + 99 others); Sat, 10 Nov 2018 01:18:48 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:48196 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726110AbeKJGSs (ORCPT ); Sat, 10 Nov 2018 01:18:48 -0500 Received: from akpm3.svl.corp.google.com (unknown [104.133.8.65]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 01AFCC46; Fri, 9 Nov 2018 20:36:34 +0000 (UTC) Date: Fri, 9 Nov 2018 12:36:34 -0800 From: Andrew Morton To: "Joel Fernandes (Google)" Cc: linux-kernel@vger.kernel.org, jreck@google.com, john.stultz@linaro.org, tkjos@google.com, gregkh@linuxfoundation.org, hch@infradead.org, Al Viro , dancol@google.com, "J. Bruce Fields" , Jeff Layton , Khalid Aziz , Lei Yang , linux-fsdevel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-mm@kvack.org, =?ISO-8859-1?Q?Marc-Andr=E9?= Lureau , Mike Kravetz , minchan@kernel.org, Shuah Khan , valdis.kletnieks@vt.edu Subject: Re: [PATCH v3 resend 1/2] mm: Add an F_SEAL_FUTURE_WRITE seal to memfd Message-Id: <20181109123634.6fe7467bb9237851250c9c56@linux-foundation.org> In-Reply-To: <20181108041537.39694-1-joel@joelfernandes.org> References: <20181108041537.39694-1-joel@joelfernandes.org> X-Mailer: Sylpheed 3.6.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 7 Nov 2018 20:15:36 -0800 "Joel Fernandes (Google)" wrote: > Android uses ashmem for sharing memory regions. We are looking forward > to migrating all usecases of ashmem to memfd so that we can possibly > remove the ashmem driver in the future from staging while also > benefiting from using memfd and contributing to it. Note staging drivers > are also not ABI and generally can be removed at anytime. > > One of the main usecases Android has is the ability to create a region > and mmap it as writeable, then add protection against making any > "future" writes while keeping the existing already mmap'ed > writeable-region active. This allows us to implement a usecase where > receivers of the shared memory buffer can get a read-only view, while > the sender continues to write to the buffer. > See CursorWindow documentation in Android for more details: > https://developer.android.com/reference/android/database/CursorWindow It appears that the memfd_create and fcntl manpages will require updating. Please attend to this at the appropriate time? Actually, it would help the review process if those updates were available now.