@@ -81,10 +81,36 @@ twophase_commit = false
8181# Which sandbox implementation to use. Currently only isolate is
8282# supported.
8383sandbox_implementation = " isolate"
84+
8485# Do not allow contestants' solutions to write files bigger than this
8586# size (expressed in KB; defaults to 1 GB).
87+ # Note that this alone isn't secure; solutions can create multiple files
88+ # in the sandbox.
8689max_file_size = 1_048_576
8790
91+ # If these are set, enforce a filesystem quota on sandboxes. Note that:
92+ # (1) The file system that stores isolate boxes (box_root in isolate's
93+ # config file) must have quota accounting enabled (for a tmpfs,
94+ # mounting with the usrquota mount option is sufficient; for ext4,
95+ # run `tune2fs -O quota /dev/sdXY` while unmounted, then mount with
96+ # the usrquota option).
97+ # (2) If you cannot configure disk quotas for some reason (e.g. when
98+ # running a kernel without quota support), you can instead put
99+ # isolate's box_root on a tmpfs; this way, all written files count
100+ # towards the solution's memory usage. In that case, do not set
101+ # these two options.
102+ # (3) This quota is used for all types of sandboxes (including
103+ # compilation and checker runs) and includes all files in the
104+ # sandbox (including inputs, outputs, and the submission executable,
105+ # and files written to /tmp).
106+ # (4) You must set both the size and inode limit.
107+
108+ # This is the maximum size (in kibibytes) of the sandbox's home
109+ # directory (as reported by e.g. `du`).
110+ # fs_quota.kb = 65536
111+ # Maximum number of inodes (i.e. files) in the sandbox's home directory.
112+ # fs_quota.inodes = 1024
113+
88114# Max processes, CPU time (s), memory (KiB) for compilation runs.
89115compilation_sandbox_max_processes = 1000
90116compilation_sandbox_max_time_s = 10.0
0 commit comments