seccomp branch queue
The following changes since commit 8337c6cbc37c6b2184f41bab3eaff47d5e68012a:
Update version for v2.5.0-rc0 release (2015-11-13 17:10:36 +0000)
are available in the git repository at:
git://github.com/otubo/qemu.git tags/pull-seccomp-20151116
for you to fetch changes up to ba060c53d585d186ff0ac6b181f4b2a867acc210:
seccomp: loosen library version dependency (2015-11-16 09:49:47 +0100)
----------------------------------------------------------------
seccomp branch queue
----------------------------------------------------------------
Andrew Jones (2):
seccomp: add cacheflush to whitelist
configure: arm/aarch64: allow enable-seccomp
dann frazier (1):
seccomp: loosen library version dependency
configure | 32 +++++++++++++++++++++++++------- qemu-seccomp.c | 13 ++++++++++++- 2 files changed, 37 insertions(+), 8 deletions(-)
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 03/03] seccomp: loosen library version dependency
From: dann frazier <[email protected]>
Drop the libseccomp required version back to 2.1.0, restoring the ability to build w/ --enable-seccomp on Ubuntu 14.04.
Commit 4cc47f8b3cc4f32586ba2f7fce1dc267da774a69 tightened the dependency on libseccomp from version 2.1.0 to 2.1.1. This broke building on Ubuntu 14.04, the current Ubuntu LTS release. The commit message didn't mention any specific functional need for 2.1.1, just that it was the most recent stable version at the time. I reviewed the changes between 2.1.0 and 2.1.1, but it looks like that update just contained minor fixes and cleanups - no obvious (to me) new interfaces or critical bug fixes.
--- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
configure +1 -1
@@ -1890,7 +1890,7 @@ fi if test "$seccomp" != "no" ; then case "$cpu" in i386|x86_64) - libseccomp_minver="2.1.1" + libseccomp_minver="2.1.0" ;; arm|aarch64) libseccomp_minver="2.2.3"
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 01/03] seccomp: add cacheflush to whitelist
In reply to Eduardo OtuboFrom: Andrew Jones <[email protected]>
cacheflush is an arm-specific syscall that qemu built for arm uses. Add it to the whitelist, but only if we're linking with a recent enough libseccomp.
--- qemu-seccomp.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
qemu-seccomp.c +12 -1
@@ -16,6 +16,14 @@#include <seccomp.h> #include "sysemu/seccomp.h" +#if SCMP_VER_MAJOR >=3 +#define HAVE_CACHEFLUSH +#elif SCMP_VER_MAJOR ==2 &&SCMP_VER_MINOR >=3 +#define HAVE_CACHEFLUSH +#elif SCMP_VER_MAJOR ==2 &&SCMP_VER_MINOR ==2 &&SCMP_VER_MICRO >=3 +#define HAVE_CACHEFLUSH +#endif +struct QemuSeccompSyscall {int32_t num;uint8_t priority;
@@ -238,7 +246,10 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = { { SCMP_SYS(inotify_init1), 240 }, { SCMP_SYS(inotify_add_watch), 240 }, { SCMP_SYS(mbind), 240 }, - { SCMP_SYS(memfd_create), 240 } + { SCMP_SYS(memfd_create), 240 }, +#ifdef HAVE_CACHEFLUSH + { SCMP_SYS(cacheflush), 240 }, +#endif };int seccomp_start (void )
Signature · 1 line
2.1.4
[Qemu-devel] [PULL 02/03] configure: arm/aarch64: allow enable-seccomp
In reply to Eduardo OtuboFrom: Andrew Jones <[email protected]>
This is a revert of ae6e8ef11e6cb, but with a bit of refactoring, and also specifically adding arm/aarch64, rather than all architectures. Currently, libseccomp code appears to also support mips, ppc, and s390. We could therefore allow qemu to enable seccomp for those platforms as well, with additional configure patches, given they're tested and proven to work.
--- configure | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-)
configure +25 -7
@@ -1888,16 +1888,34 @@ fi # libseccomp check if test "$seccomp" != "no" ; then - if test "$cpu" = "i386" || test "$cpu" = "x86_64" && - $pkg_config --atleast-version=2.1.1 libseccomp; then + case "$cpu" in + i386|x86_64) + libseccomp_minver="2.1.1" + ;; + arm|aarch64) + libseccomp_minver="2.2.3" + ;; + *) + libseccomp_minver="" + ;; + esac + + if test "$libseccomp_minver" != "" && + $pkg_config --atleast-version=$libseccomp_minver libseccomp ; then libs_softmmu="$libs_softmmu `$pkg_config --libs libseccomp`" QEMU_CFLAGS="$QEMU_CFLAGS `$pkg_config --cflags libseccomp`" - seccomp="yes" + seccomp="yes" else - if test "$seccomp" = "yes"; then - feature_not_found "libseccomp" "Install libseccomp devel >= 2.1.1" - fi - seccomp="no" + if test "$seccomp" = "yes" ; then + if test "$libseccomp_minver" != "" ; then + feature_not_found "libseccomp" \ + "Install libseccomp devel >= $libseccomp_minver" + else + feature_not_found "libseccomp" \ + "libseccomp is not supported for host cpu $cpu" + fi + fi + seccomp="no" fi fi ##########################################
Signature · 1 line
2.1.4
Peter Maydell
AppliedQuoted 8 lines · Eduardo Otubo
The following changes since commit
8337c6cbc37c6b2184f41bab3eaff47d5e68012a:Update version for v2.5.0-rc0 release (2015-11-13 17:10:36 +0000)
are available in the git repository at:
git://github.com/otubo/qemu.gittags/pull-seccomp-20151116
Quoted 8 lines
for you to fetch changes up to
ba060c53d585d186ff0ac6b181f4b2a867acc210:seccomp: loosen library version dependency (2015-11-16 09:49:47 +0100)
----------------------------------------------------------------
seccomp branch queue----------------------------------------------------------------
Applied, thanks.
-- PMM