All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eduardo Otubo <otubo@redhat.com>
To: "Daniel P. Berrange" <berrange@redhat.com>
Cc: thuth@redhat.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCHv4 2/6] seccomp: add obsolete argument to command line
Date: Thu, 7 Sep 2017 11:31:04 +0200	[thread overview]
Message-ID: <20170907093104.GA25213@vader> (raw)
In-Reply-To: <20170901110541.GK31680@redhat.com>

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 <otubo@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

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	other threads:[~2017-09-07  9:31 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-01 10:58 [Qemu-devel] [PATCHv4 0/6] seccomp: feature refactoring Eduardo Otubo
2017-09-01 10:58 ` [Qemu-devel] [PATCHv4 1/6] seccomp: changing from whitelist to blacklist Eduardo Otubo
2017-09-01 11:04   ` Daniel P. Berrange
2017-09-01 10:58 ` [Qemu-devel] [PATCHv4 2/6] seccomp: add obsolete argument to command line Eduardo Otubo
2017-09-01 11:05   ` Daniel P. Berrange
2017-09-07  9:31     ` Eduardo Otubo [this message]
2017-09-07  9:59       ` Daniel P. Berrange
2017-09-07  9:57   ` Daniel P. Berrange
2017-09-01 10:58 ` [Qemu-devel] [PATCHv4 3/6] seccomp: add elevateprivileges " Eduardo Otubo
2017-09-07  9:58   ` Daniel P. Berrange
2017-09-01 10:58 ` [Qemu-devel] [PATCHv4 4/6] seccomp: add spawn " Eduardo Otubo
2017-09-01 10:58 ` [Qemu-devel] [PATCHv4 5/6] seccomp: add resourcecontrol " Eduardo Otubo
2017-09-01 10:58 ` [Qemu-devel] [PATCHv4 6/6] seccomp: adding documentation to new seccomp model Eduardo Otubo
2017-09-01 11:03   ` Daniel P. Berrange
2017-09-01 11:32 ` [Qemu-devel] [PATCHv4 0/6] seccomp: feature refactoring no-reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170907093104.GA25213@vader \
    --to=otubo@redhat.com \
    --cc=berrange@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.