Conversation
|
+1, sounds good to me |
|
@drakenclimber thanks, although check the comments before you start - I'm currently arm wrestling with the old build environment in Travis. |
cb55b4a to
a54ae28
Compare
|
Okay, it looks like the old header file problem is fixed now. |
drakenclimber
left a comment
There was a problem hiding this comment.
I think the code looks pretty good. I had a few comments that may be worth addressing, but nothing earth shattering. The tests were properly passed/skipped on my machine based upon the kernel I had running.
This patch is heavily based on an earlier patchset by Tycho Andersen. I took Tycho's patch and incorporated the requested changes from the review, fixed some corner case bugs, and simplified the API a bit. Kernel 5.0 includes the new user notification return code. Here's all the infrastructure to handle that. The idea behind the user notification return code is that the filter stops the syscall, and forwards it to a "listener fd" that is created when installing a filter. Then then some userspace task can listen and process events accordingly by taking some (or no) action in userspace, and then returning a value from the command. Signed-off-by: Tycho Andersen <tycho@tycho.ws> Signed-off-by: Paul Moore <paul@paul-moore.com>
The kernel explicitly disallows setting both TSYNC and NEW_LISTENER at the same time, so catch this and block it in libseccomp. Signed-off-by: Paul Moore <paul@paul-moore.com>
drakenclimber
left a comment
There was a problem hiding this comment.
I had one tiny nitpick. The rest looks good to me, and I verified that the tests behaved as expected on my machine. Nice work, @pcmoore. Thanks!
Here is the desciption from the main commit: "Kernel 5.0 includes the new user notification return code. Here's all the infrastructure to handle that. The idea behind the user notification return code is that the filter stops the syscall, and forwards it to a "listener fd" that is created when installing a filter. Then then some userspace task can listen and process events accordingly by taking some (or no) action in userspace, and then returning a value from the command." Signed-off-by: Paul Moore <paul@paul-moore.com>
Some of this was taken from Tycho's original patch. Signed-off-by: Tycho Andersen <tycho@tycho.ws> Signed-off-by: Paul Moore <paul@paul-moore.com>
|
Closing this out now, all the patches have been merged into the master branch. Thanks @tych0 and @drakenclimber. |
This PR takes @tych0's original patch, adds the necessary Python support, sorts out some corner cases, and cleans up the API a bit. @tych0 I left your sign-off on the main patch and the test patch as they inherited a large chunk of your code, please let me know if that's okay.