summaryrefslogtreecommitdiffstats
path: root/include/sysemu/seccomp.h
Commit message (Collapse)AuthorAgeFilesLines
* sandbox: disable -sandbox if CONFIG_SECCOMP undefinedYi Min Zhao2018-06-011-1/+2
| | | | | | | | | | | | | | | If CONFIG_SECCOMP is undefined, the option 'elevatedprivileges' remains compiled. This would make libvirt set the corresponding capability and then trigger failure during guest startup. This patch moves the code regarding seccomp command line options to qemu-seccomp.c file and wraps qemu_opts_foreach finding sandbox option with CONFIG_SECCOMP. Because parse_sandbox() is moved into qemu-seccomp.c file, change seccomp_start() to static function. Signed-off-by: Yi Min Zhao <zyimin@linux.ibm.com> Reviewed-by: Ján Tomko <jtomko@redhat.com> Tested-by: Ján Tomko <jtomko@redhat.com> Acked-by: Eduardo Otubo <otubo@redhat.com>
* seccomp: Don't include libseccomp from QEMU headerFam Zheng2017-09-221-2/+0Star
| | | | | | | | | | | | | | | The only prototype doesn't need anything from the lib header, and not including it here allows files that include this header, for example vl.c, to compile without the libseccomp cflags. The breakage is since c3883e1f93 for environments where `pkg-config --cflags libseccomp" is non-empty. Reported-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Fam Zheng <famz@redhat.com> Acked-by: Eduardo Otubo <otubo@redhat.com> Message-id: 20170920083647.14599-1-famz@redhat.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* seccomp: add resourcecontrol argument to command lineEduardo Otubo2017-09-151-0/+1
| | | | | | | | 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>
* seccomp: add spawn argument to command lineEduardo Otubo2017-09-151-0/+1
| | | | | | | | This patch adds [,spawn=deny] argument to `-sandbox on' option. It blacklists fork and execve system calls, avoiding Qemu to spawn new threads or processes. Signed-off-by: Eduardo Otubo <otubo@redhat.com>
* seccomp: add elevateprivileges argument to command lineEduardo Otubo2017-09-151-0/+1
| | | | | | | | | | This patch introduces the new argument [,elevateprivileges=allow|deny|children] to the `-sandbox on'. It allows or denies Qemu process to elevate its privileges by blacklisting all set*uid|gid system calls. The 'children' option will let forks and execves run unprivileged. Signed-off-by: Eduardo Otubo <otubo@redhat.com>
* seccomp: add obsolete argument to command lineEduardo Otubo2017-09-151-1/+2
| | | | | | | | This patch introduces the argument [,obsolete=allow] to the `-sandbox on' option. It allows Qemu to run safely on old system that still relies on old system calls. Signed-off-by: Eduardo Otubo <otubo@redhat.com>
* seccomp: changing from whitelist to blacklistEduardo Otubo2017-09-151-0/+2
| | | | | | | | This patch changes the default behavior of the seccomp filter from whitelist to blacklist. By default now all system calls are allowed and a small black list of definitely forbidden ones was created. Signed-off-by: Eduardo Otubo <otubo@redhat.com>
* include: Clean up includesPeter Maydell2016-02-231-1/+0Star
| | | | | | | | | | | | | | Clean up includes so that osdep.h is included first and headers which it implies are not included manually. This commit was created with scripts/clean-includes. NB: If this commit breaks compilation for your out-of-tree patchseries or fork, then you need to make sure you add #include "qemu/osdep.h" to any new .c files that you have. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Eric Blake <eblake@redhat.com>
* softmmu: move include files to include/sysemu/Paolo Bonzini2012-12-191-0/+22
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>