mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-14 08:21:27 -04:00
shm: don't grow-seal the memfd
The compositor might have to increase the size of the memfd to enable zero-copy handling of wl_shm buffers. In particular, it might need to increase the size to a multiple of the page size.
This commit is contained in:
parent
c462bad08c
commit
ac342ff9c0
1 changed files with 2 additions and 2 deletions
4
shm.c
4
shm.c
|
|
@ -443,10 +443,10 @@ get_new_buffers(struct buffer_chain *chain, size_t count,
|
|||
}
|
||||
|
||||
#if defined(MEMFD_CREATE)
|
||||
/* Seal file - we no longer allow any kind of resizing */
|
||||
/* Seal file - we no longer allow shrinking */
|
||||
/* TODO: wayland mmaps(PROT_WRITE), for some unknown reason, hence we cannot use F_SEAL_FUTURE_WRITE */
|
||||
if (fcntl(pool_fd, F_ADD_SEALS,
|
||||
F_SEAL_GROW | F_SEAL_SHRINK | /*F_SEAL_FUTURE_WRITE |*/ F_SEAL_SEAL) < 0)
|
||||
F_SEAL_SHRINK | /*F_SEAL_FUTURE_WRITE |*/ F_SEAL_SEAL) < 0)
|
||||
{
|
||||
LOG_ERRNO("failed to seal SHM backing memory file");
|
||||
/* This is not a fatal error */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue