Skip to content
New issue

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

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

Already on GitHub? # to your account

Use memfd_create on FreeBSD #341

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

Use memfd_create on FreeBSD #341

wants to merge 1 commit into from

Conversation

ids1024
Copy link
Member

@ids1024 ids1024 commented Jan 12, 2023

Fixes #292.

@ids1024
Copy link
Member Author

ids1024 commented Jan 12, 2023

Ah, fails to link on FreeBSD 12.1? Well, I guess that answers my question of when this was added. Not sure if there's any easy way to conditionally build based on FreeBSD version (would depending on features from the version of FreeBSD a project is compiled on be expected behavior?).

@i509VCB
Copy link
Member

i509VCB commented Jan 17, 2023

Could we try to dynamically load memfd_create on FreeBSD? Or would that be overcomplicated?

@ids1024
Copy link
Member Author

ids1024 commented Jan 17, 2023

Would we need to dlopen libc.so to do that? A bit awkward.

FreeBSD also has a SHM_ANON flag that can be passed as the path for shm_open. Which I think is basically the same as memfd_create but without support for sealing.

@i509VCB
Copy link
Member

i509VCB commented Jun 19, 2023

One question we could ask here is would a feature make sense to guard this from FreeBSD 12?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support memfd on FreeBSD platform
2 participants