On Fri, Sep 01, 2017 at 12:58:14PM +0200, Eduardo Otubo wrote: > 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 <ot...@redhat.com> > --- > include/sysemu/seccomp.h | 3 ++- > qemu-options.hx | 12 ++++++++++-- > qemu-seccomp.c | 23 ++++++++++++++++++++++- > vl.c | 22 +++++++++++++++++++++- > 4 files changed, 55 insertions(+), 5 deletions(-) >
> @@ -72,6 +85,14 @@ int seccomp_start(void) > > for (i = 0; i < ARRAY_SIZE(blacklist); i++) { > switch (blacklist[i].set) { > + case QEMU_SECCOMP_SET_OBSOLETE: > + if (!(seccomp_opts & QEMU_SECCOMP_SET_OBSOLETE)) { > + goto add_syscall; > + } else { > + continue; > + } > + > + break; THis can be simplified: if ((seccomp_opts & QEMU_SECCOMP_SET_OBSOLETE)) { continue; } break; thus avoiding need to 'goto' Likewise for all following patches > default: > goto add_syscall; > } Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|