mirror of
https://github.com/mii443/qemu.git
synced 2025-12-03 11:08:25 +00:00
seccomp: add resourcecontrol argument to command line
This patch adds [,resourcecontrol=deny] to `-sandbox on' option. It blacklists all process affinity and scheduler priority system calls to avoid any bigger of the process. Signed-off-by: Eduardo Otubo <otubo@redhat.com>
This commit is contained in:
@@ -82,6 +82,17 @@ static const struct QemuSeccompSyscall blacklist[] = {
|
||||
{ SCMP_SYS(fork), QEMU_SECCOMP_SET_SPAWN },
|
||||
{ SCMP_SYS(vfork), QEMU_SECCOMP_SET_SPAWN },
|
||||
{ SCMP_SYS(execve), QEMU_SECCOMP_SET_SPAWN },
|
||||
/* resource control */
|
||||
{ SCMP_SYS(getpriority), QEMU_SECCOMP_SET_RESOURCECTL },
|
||||
{ SCMP_SYS(setpriority), QEMU_SECCOMP_SET_RESOURCECTL },
|
||||
{ SCMP_SYS(sched_setparam), QEMU_SECCOMP_SET_RESOURCECTL },
|
||||
{ SCMP_SYS(sched_getparam), QEMU_SECCOMP_SET_RESOURCECTL },
|
||||
{ SCMP_SYS(sched_setscheduler), QEMU_SECCOMP_SET_RESOURCECTL },
|
||||
{ SCMP_SYS(sched_getscheduler), QEMU_SECCOMP_SET_RESOURCECTL },
|
||||
{ SCMP_SYS(sched_setaffinity), QEMU_SECCOMP_SET_RESOURCECTL },
|
||||
{ SCMP_SYS(sched_getaffinity), QEMU_SECCOMP_SET_RESOURCECTL },
|
||||
{ SCMP_SYS(sched_get_priority_max), QEMU_SECCOMP_SET_RESOURCECTL },
|
||||
{ SCMP_SYS(sched_get_priority_min), QEMU_SECCOMP_SET_RESOURCECTL },
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user