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

--init without bounds #66

Closed
harveyslash opened this issue Dec 28, 2018 · 2 comments
Closed

--init without bounds #66

harveyslash opened this issue Dec 28, 2018 · 2 comments

Comments

@harveyslash
Copy link

I plan to use isolate on a web service to run arbitrary code. So i want to run programs without having a fixed number of sandboxes.

Currently --init only refers to a certain box. Is it possible to init to a new sandbox if an empty one is not available ?

This way any arbitrary number of threads (from my web server) can run their programs in their own sandboxes.

Thanks

@bblackham
Copy link
Contributor

Something needs to manage the allocation of box IDs. isolate itself doesn’t have any means to do this. Each box id requires a different UID (see default.cf).

Alternately, assuming that UIDs are 32-bit and PIDs/TIDs are < 32-bit (depends on the setting of /proc/sys/kernel/pid_max), you could allocate part of the UID space for isolate and use the thread ID as the box ID - this assumes that the same thread performs the init run and cleanup phases. I’ve not tried it, but just a thought!

@zopieux
Copy link
Contributor

zopieux commented Jan 7, 2019

shameless plug
FYI what you describe is the exact purpose of camisole, which adds some box management and an HTTP interface over isolate. We use camisole to run our online contest where people submit arbitrary code.

@gollux gollux closed this as completed May 2, 2020
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

No branches or pull requests

4 participants