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

tree-wide: add MFD_EXEC and MFD_NOEXEC_SEAL flags to memfd_create #4378

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kdrag0n
Copy link

@kdrag0n kdrag0n commented Dec 28, 2023

Since Linux kernel 6.3, one of these flags must be passed to avoid a warning being printed in the kernel log:

[    1.229444] memfd_create() without MFD_EXEC nor MFD_NOEXEC_SEAL, pid=851 'lxd'

Fixes #4315

Since Linux kernel 6.3, one of these flags must be passed to avoid a
warning being printed in the kernel log:

[    1.229444] memfd_create() without MFD_EXEC nor MFD_NOEXEC_SEAL, pid=851 'lxd'

Fixes lxc#4315

Signed-off-by: Danny Lin <danny@kdrag0n.dev>
@lxc-jenkins
Copy link

This pull request didn't trigger Jenkins as its author isn't in the allow list.

An organization member must perform one of the following:

  • To have this branch tested by Jenkins, use the "ok to test" command.
  • To have a one time test done, use the "test this please" command.

Those commands are simple Github comments of the format: "jenkins: COMMAND"

@stgraber
Copy link
Member

test-proc-sys: test-proc-sys: ../src/lxc/parse.c: lxc_file_for_each_line_mmap: 64 Invalid argument - Failed to create memory file

That sounds like a regression :)

@kdrag0n
Copy link
Author

kdrag0n commented Dec 29, 2023

Ah, looks like this will need runtime checks for either kernel version or memfd_create's accepted flags...

@kdrag0n kdrag0n marked this pull request as draft December 31, 2023 13:17
@mihalicyn
Copy link
Member

Hi @kdrag0n

Do you have a plan to update this? May be you need some help from my side with this?

@kdrag0n
Copy link
Author

kdrag0n commented Feb 6, 2024

@mihalicyn Would be great if you could help out with checking the flags and adding a runtime switch! If not, I might be able to look at this in a month or two.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

memfd_create() without MFD_EXEC nor MFD_NOEXEC_SEAL
4 participants