mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06: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:
parent
995a226f88
commit
24f8cdc572
4 changed files with 34 additions and 3 deletions
|
@ -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 },
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue