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

RFE: investigate the new SECCOMP_USER_NOTIF_FD_SYNC_WAKE_UP seccomp() flag #413

Open
pcmoore opened this issue Aug 31, 2023 · 2 comments
Open

Comments

@pcmoore
Copy link
Member

pcmoore commented Aug 31, 2023

Linux v6.6 is expected to add support for a new seccomp() flag, SECCOMP_USER_NOTIF_FD_SYNC_WAKE_UP. Investigate what we need to do for libseccomp.

My initial thought is that as this really only affects kernel scheduling, we may not need to do much other than to enable setting it, likely via a libseccomp filter attribute.

@pcmoore pcmoore added this to the v2.6.0 milestone Aug 31, 2023
@drakenclimber
Copy link
Member

I read through the entire thread. I agree that it looks pretty straightforward from a libseccomp point of view. Likely a filter attribute.

This message [1] from the author, @avagin, outlines a potential use case. For me, it validates the filter attribute approach.

[1] https://lore.kernel.org/all/CANaxB-wykCH+2fgrwBNe2BkTmEJpZjhsFBekiS_qaQHz4vYt8Q@mail.gmail.com/

@pcmoore
Copy link
Member Author

pcmoore commented Sep 20, 2024

Now that I'm looking at this to implement the functionality in libseccomp, I'm realizing that we probably don't need to do anything, at least not with our current approach to the seccomp notification mechanism. Based on the kselftest code, it appears that the proper way to use SECCOMP_USER_NOTIF_FD_SYNC_WAKE_UP is to load a seccomp filter with notification enabled and then set SECCOMP_USER_NOTIF_FD_SYNC_WAKE_UP using ioctl(). Considering that we don't support other notification response actions, e.g. returning a fd, leaving that up to the library's caller, I think our best, and most consistent, option is to do the same here and leave the code as-is.

Thoughts @drakenclimber?

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

No branches or pull requests

2 participants