qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: "Dr. David Alan Gilbert" <dave@treblig.org>,
	qemu-devel@nongnu.org, "Laurent Vivier" <lvivier@redhat.com>,
	"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Yanan Wang" <wangyanan55@huawei.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Fabiano Rosas" <farosas@suse.de>,
	"Eric Blake" <eblake@redhat.com>,
	"Eduardo Habkost" <eduardo@habkost.net>,
	"Zhao Liu" <zhao1.liu@intel.com>
Subject: Re: [PATCH v2] hw/uefi: add "info ovmf-log" + "query-ovmf-log" monitor commands
Date: Thu, 9 Oct 2025 15:06:24 +0100	[thread overview]
Message-ID: <aOfBYBff1-BVhZao@redhat.com> (raw)
In-Reply-To: <ef6m5kcsotrgshbtrj2jawjk7waq5ggrt42ugazkxs7u3jt2sq@ccef4acxnshv>

On Thu, Oct 09, 2025 at 02:41:51PM +0200, Gerd Hoffmann wrote:
>   Hi,
> 
> > > OK, what about sanitisation - if that text contains random binary what happens,
> > > or should we make sure it's sanitised?
> > 
> > As prior art, the QGA  'guest-exec' command will return stdout/stderr
> > of the command in base64 format.  The downside is that it is bloated
> > in size, but it is at least safe wrt JSON encoding.
> 
> In theory the log should just be text, but I've managed to f*ck up
> logging with broken patches in the past, with the result that random
> binary crap landed in the log.
> 
> So sending base64 in the json reply makes sense to me.  Do we have a
> qapi type for that?  Or should I use string?
> 
> > The HMP command could still dump the raw data IMHO, as that's human
> > facing and base64 is horrible for human consumption.
> 
> And probably a hmp implementation /not/ using the qmp command so we
> don't convert text -> base64 -> text ...

Although that is indeed inefficient, our overall long term goal is for
*all* HMP comamnds to be implemented by invoking a QMP command. This
will ultimately get us to the point where QAPI describes our public
facing functionality, and HMP could be moved to become an out-of-process
client side interface to QMP.


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



      parent reply	other threads:[~2025-10-09 14:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-07 13:52 [PATCH v2] hw/uefi: add "info ovmf-log" + "query-ovmf-log" monitor commands Gerd Hoffmann
2025-10-08  6:32 ` Markus Armbruster
2025-10-08  7:09   ` Daniel P. Berrangé
2025-10-09  1:56 ` Dr. David Alan Gilbert
2025-10-09  7:13   ` Daniel P. Berrangé
2025-10-09 11:41     ` Dr. David Alan Gilbert
2025-10-09 12:00       ` Daniel P. Berrangé
2025-10-09 12:41         ` Gerd Hoffmann
2025-10-09 13:17           ` Dr. David Alan Gilbert
2025-10-09 14:06           ` Daniel P. Berrangé [this message]

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=aOfBYBff1-BVhZao@redhat.com \
    --to=berrange@redhat.com \
    --cc=armbru@redhat.com \
    --cc=dave@treblig.org \
    --cc=eblake@redhat.com \
    --cc=eduardo@habkost.net \
    --cc=farosas@suse.de \
    --cc=kraxel@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=wangyanan55@huawei.com \
    --cc=zhao1.liu@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).