Issue with memfd_create() Function Call in Weston 12.0.1 on Linux Kernel 6.6.22
Hello,
I am experiencing an issue with Weston version 12.0.1 running on Linux kernel version 6.6.22. Initially, I encountered an error with the memfd_create() system call being invoked without the MFD_EXEC or MFD_NOEXEC_SEAL flags. The error message was:
weston[187]: memfd_create() called without MFD_EXEC or MFD_NOEXEC_SEAL set
To resolve this, I applied the following patch to shared/os-compatibility.c to explicitly set the MFD_NOEXEC_SEAL flag:
- fd = memfd_create("weston-shared", MFD_CLOEXEC | MFD_ALLOW_SEALING);
+ fd = memfd_create("weston-shared", MFD_CLOEXEC | MFD_ALLOW_SEALING | MFD_NOEXEC_SEAL);
After applying this patch, the original error was fixed for the main Weston process. However, a similar error now emerges from other clients, such as weston-keyboard and sometimes weston-desktop:
weston-keyboard[189]: memfd_create() called without MFD_EXEC or MFD_NOEXEC_SEAL set
Looks like the issue might be more widespread across different clients of Weston. I am seeking advice on how to effectively add the necessary flags to all relevant parts of the weston or if there are additional considerations I might be missing.
Thank you for your support and looking forward to any suggestions or guidance.
Best regards, Sami