Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kodi: linux use MFD_NOEXEC_SEAL for shared memory #8430

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

heitbaum
Copy link
Contributor

@heitbaum heitbaum commented Dec 16, 2023

ref:

The new MFD_NOEXEC_SEAL and MFD_EXEC flags allows application to set executable bit at creation time (memfd_create).

When MFD_NOEXEC_SEAL is set, memfd is created without executable bit (mode:0666), and sealed with F_SEAL_EXEC, so it can't be chmod to be executable (mode: 0777) after creation.

When MFD_EXEC flag is set, memfd is created with executable bit (mode:0777), this is the same as the old behavior of memfd_create.

@lrusak
Copy link
Member

lrusak commented Jan 30, 2024

Does this actually fix an issue or is it just pedantic?

@heitbaum
Copy link
Contributor Author

Does this actually fix an issue or is it just pedantic?

Since kernel 6.3 the error/warning memfd_create() without MFD_EXEC nor MFD_NOEXEC_SEAL, pid=yyy 'yyy' appears in the kernel logs. With the patch the error/warning does not occur.

@CvH CvH added LE 13.0 and removed LE 12.0 labels Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants