qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCHv4 2/6] seccomp: add obsolete argument to command


From: Daniel P. Berrange
Subject: Re: [Qemu-devel] [PATCHv4 2/6] seccomp: add obsolete argument to command line
Date: Thu, 7 Sep 2017 10:59:42 +0100
User-agent: Mutt/1.8.3 (2017-05-23)

On Thu, Sep 07, 2017 at 11:31:04AM +0200, Eduardo Otubo wrote:
> On Fri, Sep 01, 2017 at 12:05:41PM +0100, Daniel P. Berrange wrote:
> > 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 <address@hidden>
> > > ---
> > >  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
> 
> Do you think there's anything else to fix on this series? if nothing
> else emerges, I'll send the v5 tomorrow (also with the style fixes).

I just sent one more comment, but apart from the that & the style fixes
it looks good to me.

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 :|



reply via email to

[Prev in Thread] Current Thread [Next in Thread]