lkml.org 
[lkml]   [2021]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Sealed memfd & no-fault mmap
From
Date
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.

\
 
 \ /
  Last update: 2021-06-03 22:08    [W:0.108 / U:0.424 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site