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 X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 93F0EC47096 for ; Thu, 3 Jun 2021 14:48:17 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1EE63613D8 for ; Thu, 3 Jun 2021 14:48:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1EE63613D8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=emersion.fr Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id B55606B00C0; Thu, 3 Jun 2021 10:48:16 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B04E56B00C1; Thu, 3 Jun 2021 10:48:16 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 980396B00C2; Thu, 3 Jun 2021 10:48:16 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0230.hostedemail.com [216.40.44.230]) by kanga.kvack.org (Postfix) with ESMTP id 631166B00C0 for ; Thu, 3 Jun 2021 10:48:16 -0400 (EDT) Received: from smtpin39.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 044C798B9 for ; Thu, 3 Jun 2021 14:48:16 +0000 (UTC) X-FDA: 78212692992.39.3B136EF Received: from mail-40134.protonmail.ch (mail-40134.protonmail.ch [185.70.40.134]) by imf25.hostedemail.com (Postfix) with ESMTP id BAABB6000159 for ; Thu, 3 Jun 2021 14:48:00 +0000 (UTC) Date: Thu, 03 Jun 2021 14:48:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emersion.fr; s=protonmail3; t=1622731693; bh=SoE1BjkhHMmw5ZLkSwNONJBeXYAJkMmLHBte1ttyC3k=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=QSt9SIK6hEM/+73dJMTc6lhBe/YxU0lLQEKaOC/XC5zCeij0l4WXnVBH6fXB5cgD9 f9Eb7hUIjqK6S8FB78+wotYa7WdNLDRKghn5xo1PYbaIEPVQrvsls8xZrV9vCTokOF hAS5pP6wIbA34pQEU/usJJ86ddKFyUiXco5m2IVYpmJdobwU4RcpZH7zowc7xZjzlK AYfOv2s5KCCxlOhkoBGUUIy/PkAEgz51n0rpR8s2FNFpBgpx7tc2WA9U9CqnJOWlAd DpSapI05/TeWMDesi3LsLvlx6KMfd/NJmA9VwvXfV0tfkdkHe2hR92GjXCRRT/I/HH /e441Z2V6SePw== To: Matthew Wilcox From: Simon Ser Cc: Hugh Dickins , Linus Torvalds , "Lin, Ming" , Peter Xu , "Kirill A. Shutemov" , Dan Williams , "Kirill A. Shutemov" , Will Deacon , Linux Kernel Mailing List , David Herrmann , "linux-mm@kvack.org" , Greg Kroah-Hartman , "tytso@mit.edu" Reply-To: Simon Ser Subject: Re: Sealed memfd & no-fault mmap Message-ID: In-Reply-To: References: <7718ec5b-0a9e-ffa6-16f2-bc0b6afbd9ab@gmail.com> <80c87e6b-6050-bf23-2185-ded408df4d0f@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=emersion.fr header.s=protonmail3 header.b=QSt9SIK6; spf=pass (imf25.hostedemail.com: domain of contact@emersion.fr designates 185.70.40.134 as permitted sender) smtp.mailfrom=contact@emersion.fr; dmarc=pass (policy=none) header.from=emersion.fr X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: BAABB6000159 X-Stat-Signature: ncg8a4ft7j49n83azu748g7gwu13wun5 X-HE-Tag: 1622731680-767454 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thursday, June 3rd, 2021 at 3:57 PM, Matthew Wilcox wrote: > How about this: > > - The client sets up a 1KiB shm file and sends it to the compositor. > - The client expands the file to 5KiB > - The compositor sees the new data up to 4KiB but zeroes past the 4KiB > mark. > > Does that still make userspace happy? As long as the new data in the expanded region is visible after a remapping= the file with the new size, it should be fine. It doesn't matter that it's not visible without a munmap+mmap cycle.