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: Eduardo Otubo
Subject: Re: [Qemu-devel] [PATCHv4 2/6] seccomp: add obsolete argument to command line
Date: Thu, 7 Sep 2017 11:31:04 +0200
User-agent: Mutt/1.8.3+47 (5f034395e53d) (2017-05-23)

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).

-- 
Eduardo Otubo
Senior Software Engineer @ RedHat



reply via email to

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