aboutsummaryrefslogtreecommitdiff
path: root/webp.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2023-10-13 16:37:56 +0200
committerDaniel Eklöf <daniel@ekloef.se>2023-10-13 16:37:56 +0200
commit61af8e87661b93cfefe77c083328fef962c4121d (patch)
treea2792eaf6c16d01b7b4759045f42fb103eaa9f1c /webp.c
parent670d577ad0cd45a0c7bf4a264b791a2cd86557c3 (diff)
downloadwbg-61af8e87661b93cfefe77c083328fef962c4121d.tar.gz
shm: try with MFD_NOEXEC_SEAL first, then without
MFD_NOEXEC_SEAL is only supported on kernels 6.3 and later. If we were compiled on linux >= 6.3, but run on linux < 6.3, we'd exit with an error, due to memfd_create() failing with EINVAL. This patch fixes the problem by first trying to call memfd_create() *with* MFD_NOEXEC_SEAL, and if that fails with EINVAL, we try again without it. Also seal the memory FD once mmap() has been called.
Diffstat (limited to 'webp.c')
0 files changed, 0 insertions, 0 deletions