Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/DMOJ/judge-server
Browse files Browse the repository at this point in the history
  • Loading branch information
hieplpvip committed Aug 24, 2023
2 parents 0a49309 + d81a1e5 commit 4165af3
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 1 deletion.
3 changes: 3 additions & 0 deletions dmoj/cptbox/_cptbox.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,9 @@ cdef int pt_child(void *context) noexcept nogil:

cdef int pt_syscall_handler(void *context, int syscall) noexcept nogil:
return (<Process>context)._syscall_handler(syscall)
# Note that upon exception, this function is guaranteed to return due to noexcept.
# Cython will swallow any exception raised and print to stderr, then make this function return 0,
# which means to deny syscall.

cdef void pt_syscall_return_handler(void *context, pid_t pid, int syscall) noexcept with gil:
(<Debugger>context)._on_return(pid, syscall)
Expand Down
2 changes: 2 additions & 0 deletions dmoj/cptbox/isolate.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ def __init__(
sys_getuid: ALLOW,
sys_getegid: ALLOW,
sys_getgid: ALLOW,
sys_setfsgid: ACCESS_EPERM,
sys_setfsuid: ACCESS_EPERM,
sys_getdents: ALLOW,
sys_lseek: ALLOW,
sys_getrusage: ALLOW,
Expand Down
2 changes: 2 additions & 0 deletions dmoj/cptbox/syscalls.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ sys_bindat: int
sys_bpf: int
sys_break: int
sys_brk: int
sys_cachestat: int
sys_cap_enter: int
sys_cap_fcntls_get: int
sys_cap_fcntls_limit: int
Expand Down Expand Up @@ -301,6 +302,7 @@ sys_kmq_timedreceive: int
sys_kmq_timedsend: int
sys_kmq_unlink: int
sys_kqueue: int
sys_kqueuex: int
sys_kse_create: int
sys_kse_exit: int
sys_kse_release: int
Expand Down
2 changes: 2 additions & 0 deletions dmoj/cptbox/syscalls/freebsd.tbl
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@
136 mkdir
137 rmdir
138 utimes
139 sigreturn
140 adjtime
141 getpeername
142 gethostid
Expand Down Expand Up @@ -512,3 +513,4 @@
580 fspacectl
581 sched_getcpu
582 swapoff
583 kqueuex
1 change: 1 addition & 0 deletions dmoj/cptbox/syscalls/linux-arm.tbl
Original file line number Diff line number Diff line change
Expand Up @@ -440,3 +440,4 @@
448 process_mrelease
449 futex_waitv
450 set_mempolicy_home_node
451 cachestat
1 change: 1 addition & 0 deletions dmoj/cptbox/syscalls/linux-generic.tbl
Original file line number Diff line number Diff line change
Expand Up @@ -324,3 +324,4 @@
448 process_mrelease
449 futex_waitv
450 set_mempolicy_home_node
451 cachestat
1 change: 1 addition & 0 deletions dmoj/cptbox/syscalls/linux-generic32.tbl
Original file line number Diff line number Diff line change
Expand Up @@ -324,3 +324,4 @@
448 process_mrelease
449 futex_waitv
450 set_mempolicy_home_node
451 cachestat
1 change: 1 addition & 0 deletions dmoj/cptbox/syscalls/linux-x32.tbl
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@
448 process_mrelease
449 futex_waitv
450 set_mempolicy_home_node
451 cachestat
512 rt_sigaction
513 rt_sigreturn
514 ioctl
Expand Down
1 change: 1 addition & 0 deletions dmoj/cptbox/syscalls/linux-x64.tbl
Original file line number Diff line number Diff line change
Expand Up @@ -360,3 +360,4 @@
448 process_mrelease
449 futex_waitv
450 set_mempolicy_home_node
451 cachestat
1 change: 1 addition & 0 deletions dmoj/cptbox/syscalls/linux-x86.tbl
Original file line number Diff line number Diff line change
Expand Up @@ -438,3 +438,4 @@
448 process_mrelease
449 futex_waitv
450 set_mempolicy_home_node
451 cachestat
2 changes: 1 addition & 1 deletion dmoj/executors/GO.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Executor(CompiledExecutor):
address_grace = 786432
command = 'go'
syscalls = ['mincore', 'mlock', 'setrlimit']
compiler_syscalls = ['setrlimit', 'copy_file_range']
compiler_syscalls = ['copy_file_range', 'setrlimit']
fs = [
# Go will start without THP information, but has some tuning for when
# it is available -- so let's allow it to tell.
Expand Down

0 comments on commit 4165af3

Please sign in to comment.