Re: Sealed memfd & no-fault mmap

From: Simon Ser
Date: Thu Jun 03 2021 - 10:48:17 EST


On Thursday, June 3rd, 2021 at 3:57 PM, Matthew Wilcox <willy@xxxxxxxxxxxxx> 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.