seccomp branch queue
Hi,
This is the seccomp branch queue with fixes regarding a build crach on armv7l and adding new syscalls to the whitelist. Details below.
The following changes since commit 6e76d125f244e10676b917208f2a074729820246:
Update version for v2.2.0-rc0 release (2014-11-05 15:21:04 +0000)
are available in the git repository at:
git://github.com/otubo/qemu.git tags/pull-seccomp-20141110
for you to fetch changes up to f5c76d3eb66a63604d9d8b47ce94268f9babea10:
seccomp: change configure to avoid arm 32 to break (2014-11-07 16:42:18 +0100)
----------------------------------------------------------------
seccomp: change configure to avoid arm 32 to break
seccomp: whitelist syscalls fallocate(), fadvise64(), inotify_init1() and inotify_add_watch()
----------------------------------------------------------------
Eduardo Otubo (1):
seccomp: change configure to avoid arm 32 to break
Philipp Gesang (1):
seccomp: whitelist syscalls fallocate(), fadvise64(), inotify_init1() and inotify_add_watch()
configure | 3 ++- qemu-seccomp.c | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-)
Signature · 1 line
1.9.1
[Qemu-devel] [PULL 2/2] seccomp: change configure to avoid arm 32 to break
Current stable version of libseccomp (2.1.1) only supports i386 and x86_64 archs correctly. This patch limits the usage of the syscall filter for those archs and updates to the correct last version of libseccomp.
This patch also fixes the bug:
https://bugs.launchpad.net/qemu/+bug/1363641
--- configure | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
configure +2 -1
@@ -1823,7 +1823,8 @@ fi # libseccomp check if test "$seccomp" != "no" ; then - if $pkg_config --atleast-version=2.1.0 libseccomp; then + if test "$cpu" = "i386" || test "$cpu" = "x86_64" && + $pkg_config --atleast-version=2.1.1 libseccomp; then libs_softmmu="$libs_softmmu `$pkg_config --libs libseccomp`" QEMU_CFLAGS="$QEMU_CFLAGS `$pkg_config --cflags libseccomp`" seccomp="yes"
Signature · 1 line
1.9.1
[Qemu-devel] [PULL 1/2] seccomp: whitelist syscalls fallocate(), fadvise64(), inotify_init1() and inotify_add_watch()
In reply to Eduardo OtuboFrom: Philipp Gesang <[email protected]>
fallocate() is needed for snapshotting. If it isn’t whitelisted
$ qemu-img create -f qcow2 x.qcow 1G
Formatting 'x.qcow', fmt=qcow2 size=1073741824 encryption=off cluster_size=65536 lazy_refcounts=off
$ qemu-kvm -display none -monitor stdio -sandbox on x.qcow
QEMU 2.1.50 monitor - type 'help' for more information
(qemu) savevm foo
(qemu) loadvm foowill fail, as will subsequent savevm commands on the same image.
fadvise64(), inotify_init1(), inotify_add_watch() are needed by the SDL display. Without the whitelist entries,
qemu-kvm -sandbox on
fails immediately.
In my tests fadvise64() is called 50--51 times per VM run. That number seems independent of the duration of the run. fallocate(), inotify_init1(), inotify_add_watch() are called once each. Accordingly, they are added to the whitelist at a very low priority.
--- qemu-seccomp.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
qemu-seccomp.c +5 -1
@@ -231,7 +231,11 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = { { SCMP_SYS(shmctl), 240 }, { SCMP_SYS(mlock), 240 }, { SCMP_SYS(munlock), 240 }, - { SCMP_SYS(semctl), 240 } + { SCMP_SYS(semctl), 240 }, + { SCMP_SYS(fallocate), 240 }, + { SCMP_SYS(fadvise64), 240 }, + { SCMP_SYS(inotify_init1), 240 }, + { SCMP_SYS(inotify_add_watch), 240 } };int seccomp_start (void )
Signature · 1 line
1.9.1
Quoted 21 lines · Eduardo Otubo
Hi,
This is the seccomp branch queue with fixes regarding a build crach on armv7l and adding new syscalls to the whitelist. Details below.
The following changes since commit
6e76d125f244e10676b917208f2a074729820246:Update version for v2.2.0-rc0 release (2014-11-05 15:21:04 +0000)
are available in the git repository at:
git://github.com/otubo/qemu.gittags/pull-seccomp-20141110for you to fetch changes up to
f5c76d3eb66a63604d9d8b47ce94268f9babea10:seccomp: change configure to avoid arm 32 to break (2014-11-07 16:42:18 +0100)
----------------------------------------------------------------
seccomp: change configure to avoid arm 32 to break
seccomp: whitelist syscallsfallocate(),fadvise64(),inotify_init1()andinotify_add_watch()
Quoted 6 lines
----------------------------------------------------------------
Eduardo Otubo (1):
seccomp: change configure to avoid arm 32 to breakPhilipp Gesang (1):
seccomp: whitelist syscallsfallocate(),fadvise64(),inotify_init1()andinotify_add_watch()
Hi. I'm afraid I'm going to have to ask you to respin this, because the patches are missing various reviewed-by/signed-off etc tags.
Firstly, and least critically, the configure patch should have the reviewed-by and acked-by tags that people have posted on the mailing list for it; it's useful to keep a permanent record of these in the commit history (for instance it can give a good idea of who to cc if a change turns out to have a bug in future).
More significantly, the patch from Philipp is missing a
Signed-off-by: line from you. Every commit in a pullreq should have a signed-off-by: from the submaintainer(s) of the tree that's being pulled, because it represents your assertion that these changes are good to go into QEMU without further checking.
Sorry to have to be picky about this. The good news is, your signed tag seems OK. You should make sure you've pushed your public key out to the public keyservers if you haven't already (gpg --send-keys 12F8BD2F) since it's not currently visible there [there is a lag of a day or two though so if you've sent it out recently it's probably just in that delay.]
thanks
-- PMM
Quoted 39 lines · Peter Maydell
Quoted 21 lines · Eduardo Otubo
Hi,
This is the seccomp branch queue with fixes regarding a build crach on armv7l and adding new syscalls to the whitelist. Details below.
The following changes since commit
6e76d125f244e10676b917208f2a074729820246:Update version for v2.2.0-rc0 release (2014-11-05 15:21:04 +0000)
are available in the git repository at:
git://github.com/otubo/qemu.gittags/pull-seccomp-20141110for you to fetch changes up to
f5c76d3eb66a63604d9d8b47ce94268f9babea10:seccomp: change configure to avoid arm 32 to break (2014-11-07 16:42:18 +0100)
----------------------------------------------------------------
seccomp: change configure to avoid arm 32 to break
seccomp: whitelist syscallsfallocate(),fadvise64(),inotify_init1()andinotify_add_watch()Quoted 6 lines
----------------------------------------------------------------
Eduardo Otubo (1):
seccomp: change configure to avoid arm 32 to breakPhilipp Gesang (1):
seccomp: whitelist syscallsfallocate(),fadvise64(),inotify_init1()andinotify_add_watch()Hi. I'm afraid I'm going to have to ask you to respin this, because the patches are missing various reviewed-by/signed-off etc tags.
Firstly, and least critically, the configure patch should have the reviewed-by and acked-by tags that people have posted on the mailing list for it; it's useful to keep a permanent record of these in the commit history (for instance it can give a good idea of who to cc if a change turns out to have a bug in future).
Quoted 6 lines
More significantly, the patch from Philipp is missing a
Signed-off-by: line from you. Every commit in a pullreq should have a signed-off-by: from the submaintainer(s) of the tree that's being pulled, because it represents your assertion that these changes are good to go into QEMU without further checking.
My apologies! I was so worried about the key and tagging being set properly on my branch that those lines completely passed from my review. I resent the pull request with everything double-checked. I hope everything is 0K now.
Quoted 7 lines
Sorry to have to be picky about this. The good news is, your signed tag seems OK. You should make sure you've pushed your public key out to the public keyservers if you haven't already (gpg --send-keys 12F8BD2F) since it's not currently visible there [there is a lag of a day or two though so if you've sent it out recently it's probably just in that delay.]
I just pushed my key to the public server. So it might take a while to appear as valid.
Thanks for the help on this,
and sorry again for the lapses.
Regards,
Signature · 2 lines
Eduardo Otubo ProfitBricks GmbH