karlicoss
karlicoss

Reputation: 2549

Easy virtualization method

We are developing an online judge system to test students' computational geometry problems solutions. At this moment wee need a testing environment: we have to limit time and memory usage (to accept only optimal solutions), and since we run untrusted code, we have to forbid some system calls (like fork), disable networking, etc. What would be the easiest (open source) virtualization solution for this task? As far as I understand, I will have to use a patched kernel (like OpenVZ), or it is possible to find a simple tool, which will accept restrictions and untrusted program as its arguments and run it? P.S. If it is important — we run c++ code, however, we would like to use a universal solution.

Upvotes: 0

Views: 244

Answers (1)

jayven huangjunwen
jayven huangjunwen

Reputation: 780

If the problems involve only stdin/stdout, e.g. read some input then calculate output, you may have a look at seccomp It's really simple.

Also in near future a second mode of seccomp may be come into the kernel which will give you more flexible.

Upvotes: 1

Related Questions