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

Add landlock api #135

Merged
merged 2 commits into from
Sep 25, 2024
Merged

Add landlock api #135

merged 2 commits into from
Sep 25, 2024

Conversation

morr0ne
Copy link
Contributor

@morr0ne morr0ne commented Sep 24, 2024

Add the landlock userspace api to the general module
supersedes #126

@sunfishcode
Copy link
Owner

Landlock is a pretty specialized API that most existing users of general won't need. Would it make sense to add landlock as a new module, rather than adding it to general?

@morr0ne
Copy link
Contributor Author

morr0ne commented Sep 24, 2024

Landlock is a pretty specialized API that most existing users of general won't need. Would it make sense to add landlock as a new module, rather than adding it to general?

I primarily followed the existing PR, and given that the landlock api is relatively small I thought it would be fine in general. I suppose it could be it's own module. Are there specific guidelines on when a feature should be separated into its own module? Since this crate doesn't actually link to anything and just provides definitions, the only impact I see might be on compile times, but I may be overlooking something.

@sunfishcode
Copy link
Owner

I don't have any concrete guidelines. general is just already pretty big; it's already about 0.3s to build just the general module. Landlock isn't that big, but Linux has a lot of little APIs that could add up if we added all of them. So it seems nice to lean a little toward putting new things in new modules, if we can. I might look into moving things like userfaultfd.h or magic.h or other things out of general too.

@sunfishcode
Copy link
Owner

Thanks!

@sunfishcode sunfishcode merged commit 10db0ea into sunfishcode:main Sep 25, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants