-
Notifications
You must be signed in to change notification settings - Fork 161
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
PRoot and seccomp #22
Comments
You mean Linux >=4.8 support? (47138da and follow-up commit as that one wasn't complete fix) I've also got workarounds for Android Oreo seccomp policy (which blocks syscalls such as Nice to see upstream proot is alive back. If it's going to stay alive I might attach git commit history from upstream. (Aside: personally I don't really like tri-state |
Just following up on this; @alkino, did you ever find an appropriate fix for this upstream? |
No, it takes too much time. I don't know well seccomp / ptrace. So it's a really hard to figure it out. |
@michalbednarski, would you care to take a look at the latest CI logs for upstream PRoot?
I am working on merging a PR for seccomp, but it doesn't look to be effective. With travis upgrading its base distro to xenial, PRoot can no longer run properly even in CI. -- I've forked this repo on GitLab, to try to reproduce using the latest CI/CD. |
I've tried diff --git a/src/tracee/event.c b/src/tracee/event.c
index 809f710..1901bea 100644
--- a/src/tracee/event.c
+++ b/src/tracee/event.c
@@ -501,7 +501,7 @@ int handle_tracee_event_kernel_4_8(Tracee *tracee, int tracee_status)
/* SECCOMP TRAP can only be received for
* sysenter events, ignore otherwise */
if (!IS_IN_SYSENTER(tracee)) {
- tracee->restart_how = PTRACE_CONT;
+ tracee->restart_how = PTRACE_SYSCALL;
return 0;
}
status = ptrace(PTRACE_GETEVENTMSG, tracee->pid, NULL, &flags); There definitely should be Note however, that while this fixes some of tests, it makes other tests hang. This is what I've found so far, I'll keep looking into it and I think I'll post another update tomorrow. |
Interesting.. Thank you for your insight in this matter. I've been working on the build system and the test suite specifically for this reason. I hope to add more checks for seccomp and different kernel versions to make this easier to debug in the future. -- The termux fork has a few skipped tests, and only one failed tests, but it didn't hang on the latest build, (See: https://gitlab.com/proot/termux-proot/-/jobs/214954620). |
I've found another issue in proot-me/proot/fix-seccomp: The After those fixes only remaining failing test (On my development machine) is Some tests also fail on my development machine when |
One more thing I've forgot to write: test which nest proot ( |
I made a list of commits to pull in but I wasn't sure how much of it was android-specific. |
Hello,
First of all this is not an issue but a contact. I'm a maintainer of PRoot.
I look around what you do here, and you seems to have a nice patch to fix seccomp. Mind you upstream your work?
Regards,
alkino
The text was updated successfully, but these errors were encountered: