All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: marcandre.lureau@redhat.com
Cc: qemu-devel@nongnu.org, Markus Armbruster <armbru@redhat.com>
Subject: Re: [PATCH 2/8] qapi: add 'warn' option to CompatPolicyInput
Date: Fri, 30 Oct 2026 13:31:03 +0000	[thread overview]
Message-ID: <auScF8ijrIuSB1PN@redhat.com> (raw)
In-Reply-To: <179336456126.3884549.17845152643994856593.b4-review@b4>

On Fri, Oct 30, 2026 at 04:49:21PM +0400, marcandre.lureau@redhat.com wrote:
> > This prints a warning on stderr every time a policy violation
> > is encountered, but accepts the input.
> > 
> > Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> > Message-ID: <20261028133603.1893289-3-berrange@redhat.com>
> > ---
> >  qapi/compat.json |  4 +++-
> >  qapi/qapi-util.c |  4 ++++
> >  qemu-options.hx  | 12 ++++++++----
> >  3 files changed, 15 insertions(+), 5 deletions(-)
> >
> > diff --git a/qapi/compat.json b/qapi/compat.json
> > index 0f90ea1f5241..dfa3fea05778 100644
> > --- a/qapi/compat.json
> > +++ b/qapi/compat.json
> > @@ -17,10 +17,12 @@
> >  #
> >  # @crash: abort() the process
> >  #
> > +# @warn: Accept with a warning printed to stderr (Since: 11.2)
> > +#
> >  # Since: 6.0
> >  ##
> >  { 'enum': 'CompatPolicyInput',
> > -  'data': [ 'accept', 'reject', 'crash' ] }
> > +  'data': [ 'accept', 'reject', 'crash', 'warn' ] }
> >  
> >  ##
> >  # @CompatPolicyOutput:
> > diff --git a/qapi/qapi-util.c b/qapi/qapi-util.c
> > index 93898f57a055..f81a171a5b16 100644
> > --- a/qapi/qapi-util.c
> > +++ b/qapi/qapi-util.c
> > @@ -28,6 +28,10 @@ static bool compat_policy_input_ok1(CompatPolicyInput policy,
> >      switch (policy) {
> >      case COMPAT_POLICY_INPUT_ACCEPT:
> >          return true;
> > +    case COMPAT_POLICY_INPUT_WARN:
> > +        warn_report("%s %s %s disabled by policy",
> 
> rather: "Deprecated %s.. accepted by policy"?

Yes, it should say 'accepted'.


With regards,
Daniel
-- 
|: https://berrange.com       ~~        https://hachyderm.io/@berrange :|
|: https://libvirt.org          ~~          https://entangle-photo.org :|
|: https://pixelfed.art/berrange   ~~    https://fstop138.berrange.com :|



  reply	other threads:[~2026-10-30 13:31 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-28 13:35 [PATCH 0/8] qapi: last minute improvements/changes to -compat insecure-types Daniel P. Berrangé
2026-10-28 13:35 ` [PATCH 1/8] qapi: make 'CompatPolicy' the first arg in compat_policy_input_ok Daniel P. Berrangé
2026-10-28 13:35 ` [PATCH 2/8] qapi: add 'warn' option to CompatPolicyInput Daniel P. Berrangé
2026-10-29  6:56   ` Markus Armbruster
2026-10-29 10:48     ` Daniel P. Berrangé
2026-10-30 12:49   ` marcandre.lureau
2026-10-30 13:31     ` Daniel P. Berrangé [this message]
2026-10-28 13:35 ` [PATCH 3/8] qapi: rename 'insecure-types' to 'insecure-input' Daniel P. Berrangé
2026-10-28 13:35 ` [PATCH 4/8] qapi: drop CompatPolicySecurity and use CompatPolicyInput Daniel P. Berrangé
2026-10-29  6:15   ` Markus Armbruster
2026-10-29 10:48     ` Daniel P. Berrangé
2026-10-30 12:49   ` marcandre.lureau
2026-10-28 13:36 ` [PATCH 5/8] qapi: rename compat_policy_check_security method Daniel P. Berrangé
2026-10-28 13:36 ` [PATCH 6/8] qapi: reverse arg order in compat_policy_security_ok Daniel P. Berrangé
2026-10-28 13:36 ` [PATCH 7/8] qemu-options: document -compat insecure-input parameter Daniel P. Berrangé
2026-10-29  6:52   ` Markus Armbruster
2026-10-29 10:56     ` Daniel P. Berrangé
2026-10-29 14:13       ` Markus Armbruster
2026-10-29 14:44         ` Daniel P. Berrangé
2026-10-30 12:49   ` marcandre.lureau
2026-10-28 13:36 ` [PATCH 8/8] qapi: print a message before aborting for -compat violations Daniel P. Berrangé
2026-10-30 12:49   ` marcandre.lureau

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=auScF8ijrIuSB1PN@redhat.com \
    --to=berrange@redhat.com \
    --cc=armbru@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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.