[pulseaudio-commits] [Git][pulseaudio/pulseaudio][master] shm: allow for older versions of Linux without MFD_NOEXEC_SEAL
PulseAudio Marge Bot (@pulseaudio-merge-bot)
gitlab at gitlab.freedesktop.org
Sun Aug 13 15:22:59 UTC 2023
PulseAudio Marge Bot pushed to branch master at PulseAudio / pulseaudio
Commits:
421cf154 by Rudi Heitbaum at 2023-08-13T09:37:32+00:00
shm: allow for older versions of Linux without MFD_NOEXEC_SEAL
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/794>
- - - - -
1 changed file:
- src/pulsecore/shm.c
Changes:
=====================================
src/pulsecore/shm.c
=====================================
@@ -164,7 +164,11 @@ static int sharedmem_create(pa_shm *m, pa_mem_type_t type, size_t size, mode_t m
#endif
#ifdef HAVE_MEMFD
case PA_MEM_TYPE_SHARED_MEMFD:
+ /* For linux >= 6.3 create fd with MFD_NOEXEC_SEAL flag */
fd = memfd_create("pulseaudio", MFD_ALLOW_SEALING|MFD_CLOEXEC|MFD_NOEXEC_SEAL);
+ /* Retry creating fd without MFD_NOEXEC_SEAL to support linux < 6.3 */
+ if (fd < 0)
+ fd = memfd_create("pulseaudio", MFD_ALLOW_SEALING|MFD_CLOEXEC);
break;
#endif
default:
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/421cf15486eea1b52f10e2b0be305018fee8c285
--
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/421cf15486eea1b52f10e2b0be305018fee8c285
You're receiving this email because of your account on gitlab.freedesktop.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-commits/attachments/20230813/a008f3e6/attachment.htm>
More information about the pulseaudio-commits
mailing list