Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp334173pxj; Thu, 3 Jun 2021 07:51:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxOtBdYsSPgeRhKFMYQ+dUATcOc8mprsZYYto6CoqLtoUEZdxdCRuGkgUqbpzAO3BBikyxI X-Received: by 2002:a05:6402:26d1:: with SMTP id x17mr231654edd.14.1622731915264; Thu, 03 Jun 2021 07:51:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622731915; cv=none; d=google.com; s=arc-20160816; b=gmaQmKVTZ0gHt8RibAK3VICFDD8edmdzjD3Bvn+1Ly6/QeyA2Mdn7vePx6CBfUwAhZ ZU5a+QH/kQ+GVYmaQpfPvOA8E7LLe9yrotj4oJMxkU/RYhnctb2/5mp+tZehRVmBkYIJ xamcr8viuiVwRXB8fxdT3EuNPaSjDKIg29goi98eNgV7ulM4gg7JoTeVH7C462U5ZCHh 0Zk0urcabnS3YwsMH2XRKMzC18eSSyTtWPzxxJGeOpi1k+TwpsfORTSCjL2UbGCKO6m5 oit+WMnYGPed0Z5JCEIwdSUaB4RSRQsWtEjaFrY9KHHSWO6YuFDdBaDcBhteCm4lFPBX BFwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:reply-to:cc:from:to :dkim-signature:date; bh=SoE1BjkhHMmw5ZLkSwNONJBeXYAJkMmLHBte1ttyC3k=; b=wpRlzbmC/OB0fZ/AttipqPPXsqlSw46rc5kstT1pSLZvtCukmfbTOYPwSi4yRzzD8X 5DpdHWhCqifi+2EcA1rQO9uyIvPPn5tarKwPsljRUUN2vmXJ7wAt9N9IpCEjg+U1aTuV v1tCgPbT6Y9oaxuXiNlBP2KA8ciZDRAmboY8Z4E6fCO3+uuoYIX+ootKCSybPpczzW08 9IhHvt1eTz9H2Gz7IA9QjFV88/F2LijHb/Yx/EBZVDXbY9e/WXAZ+t+4wEgdDSDwQylm t3BkeYpIfLkV3Wn/dcf94nqNLY4idC6lZ0bMt0xqag+VjuiJh7uJD0w78qhU4anbz+51 hg+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@emersion.fr header.s=protonmail3 header.b=QSt9SIK6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=emersion.fr Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f9si2479987edv.112.2021.06.03.07.51.32; Thu, 03 Jun 2021 07:51:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@emersion.fr header.s=protonmail3 header.b=QSt9SIK6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=emersion.fr Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231502AbhFCOuA (ORCPT + 99 others); Thu, 3 Jun 2021 10:50:00 -0400 Received: from mail-40133.protonmail.ch ([185.70.40.133]:16010 "EHLO mail-40133.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229744AbhFCOt7 (ORCPT ); Thu, 3 Jun 2021 10:49:59 -0400 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 X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.