[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ca7afd0e-4fea-4601-6c06-36e0e3664945@kernel.org>
Date: Thu, 3 Jun 2021 13:07:56 -0700
From: Ming Lin <mlin@...nel.org>
To: Simon Ser <contact@...rsion.fr>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
Hugh Dickins <hughd@...gle.com>, Peter Xu <peterx@...hat.com>,
"Kirill A. Shutemov" <kirill@...temov.name>,
Matthew Wilcox <willy@...radead.org>,
Dan Williams <dan.j.williams@...el.com>,
"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
Will Deacon <will@...nel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
David Herrmann <dh.herrmann@...il.com>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
Greg Kroah-Hartman <greg@...ah.com>,
"tytso@....edu" <tytso@....edu>
Subject: Re: Sealed memfd & no-fault mmap
On 6/3/2021 6:01 AM, Simon Ser wrote:
>
> Regarding the requirements for Wayland:
>
> - The baseline requirement is being able to avoid SIGBUS for read-only mappings
> of shm files.
> - Wayland clients can expand their shm files. However the compositor doesn't
> need to immediately access the new expanded region. The client will tell the
> compositor what the new shm file size is, and the compositor will re-map it.
> - Ideally, MAP_NOSIGBUS would work on PROT_WRITE + MAP_SHARED mappings (of
> course, the no-SIGBUS behavior would be restricted to that mapping). The
> use-case is writing back to client buffers e.g. for screen capture. From the
> earlier discussions it seems like this would be complicated to implement.
> This means we'll need to come up with a new libwayland API to allow
> compositors to opt-in to the read-only mappings. This is sub-optimal but
> seems doable.
> - Ideally, MAP_SIGBUS wouldn't be restricted to shm. There are use-cases for
> using it on ordinary files too, e.g. for sharing ICC profiles. But from the
> earlier replies it seems very unlikely that this will become possible, and
> making it work only on shm files would already be fantastic.
In the new version of the patches, MAP_NOSIGBUS is not restricted to shmem.
It can be used on ordinary files.
Powered by blists - more mailing lists