|
| 1 | +{ |
| 2 | + "_comment": "Seccomp profile for diffusion worker (Python). Same as inference (GPU ioctl) plus image/video write syscalls. No outbound network.", |
| 3 | + "defaultAction": "SCMP_ACT_ERRNO", |
| 4 | + "defaultErrnoRet": 1, |
| 5 | + "archMap": [ |
| 6 | + { "architecture": "SCMP_ARCH_X86_64", "subArchitectures": ["SCMP_ARCH_X86"] }, |
| 7 | + { "architecture": "SCMP_ARCH_AARCH64", "subArchitectures": [] } |
| 8 | + ], |
| 9 | + "syscalls": [ |
| 10 | + { |
| 11 | + "_comment": "Core process lifecycle", |
| 12 | + "names": [ |
| 13 | + "read", "write", "close", "fstat", "lstat", "stat", "newfstatat", |
| 14 | + "lseek", "mmap", "mprotect", "munmap", "brk", "mremap", |
| 15 | + "rt_sigaction", "rt_sigprocmask", "rt_sigreturn", |
| 16 | + "pread64", "pwrite64", "readv", "writev", |
| 17 | + "access", "pipe", "pipe2", "dup", "dup2", "dup3", |
| 18 | + "getpid", "getuid", "getgid", "geteuid", "getegid", |
| 19 | + "getppid", "gettid", "getdents64", |
| 20 | + "clone", "clone3", "wait4", "waitid", |
| 21 | + "exit", "exit_group", |
| 22 | + "futex", "futex_waitv", |
| 23 | + "set_robust_list", "get_robust_list", |
| 24 | + "nanosleep", "clock_nanosleep", "clock_gettime", "clock_getres", |
| 25 | + "gettimeofday", |
| 26 | + "sched_yield", "sched_getaffinity", "sched_setaffinity", |
| 27 | + "set_tid_address", |
| 28 | + "arch_prctl", "prctl", |
| 29 | + "getrandom", "rseq" |
| 30 | + ], |
| 31 | + "action": "SCMP_ACT_ALLOW" |
| 32 | + }, |
| 33 | + { |
| 34 | + "_comment": "File operations (model read + output write)", |
| 35 | + "names": [ |
| 36 | + "open", "openat", "openat2", "fcntl", |
| 37 | + "fadvise64", "fallocate", |
| 38 | + "rename", "renameat", "renameat2", |
| 39 | + "unlink", "unlinkat", |
| 40 | + "mkdir", "mkdirat", |
| 41 | + "ftruncate", "fsync", "fdatasync", |
| 42 | + "readlink", "readlinkat", |
| 43 | + "statx", "statfs", "fstatfs", |
| 44 | + "getcwd", "umask", "fchmod", "fchmodat", |
| 45 | + "copy_file_range", "sendfile" |
| 46 | + ], |
| 47 | + "action": "SCMP_ACT_ALLOW" |
| 48 | + }, |
| 49 | + { |
| 50 | + "_comment": "GPU ioctl — required for CUDA/ROCm/Vulkan", |
| 51 | + "names": ["ioctl"], |
| 52 | + "action": "SCMP_ACT_ALLOW" |
| 53 | + }, |
| 54 | + { |
| 55 | + "_comment": "Memory-mapped I/O for model loading", |
| 56 | + "names": ["madvise", "mincore", "msync"], |
| 57 | + "action": "SCMP_ACT_ALLOW" |
| 58 | + }, |
| 59 | + { |
| 60 | + "_comment": "Event polling", |
| 61 | + "names": [ |
| 62 | + "epoll_create", "epoll_create1", "epoll_ctl", "epoll_wait", "epoll_pwait", |
| 63 | + "poll", "ppoll", "select", "pselect6", |
| 64 | + "eventfd", "eventfd2", |
| 65 | + "timerfd_create", "timerfd_settime", "timerfd_gettime" |
| 66 | + ], |
| 67 | + "action": "SCMP_ACT_ALLOW" |
| 68 | + }, |
| 69 | + { |
| 70 | + "_comment": "Localhost socket for health check only (bound by PrivateNetwork)", |
| 71 | + "names": [ |
| 72 | + "socket", "bind", "listen", "accept", "accept4", |
| 73 | + "connect", "getsockopt", "setsockopt", |
| 74 | + "getsockname", "getpeername", |
| 75 | + "sendto", "recvfrom", "sendmsg", "recvmsg", |
| 76 | + "shutdown" |
| 77 | + ], |
| 78 | + "action": "SCMP_ACT_ALLOW" |
| 79 | + }, |
| 80 | + { |
| 81 | + "_comment": "Thread management + Python runtime", |
| 82 | + "names": [ |
| 83 | + "set_thread_area", "get_thread_area", |
| 84 | + "tgkill", "tkill", |
| 85 | + "sigaltstack" |
| 86 | + ], |
| 87 | + "action": "SCMP_ACT_ALLOW" |
| 88 | + } |
| 89 | + ] |
| 90 | +} |
0 commit comments