qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 17/32] qmp: Don't let malformed in-band commands


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 17/32] qmp: Don't let malformed in-band commands jump the queue
Date: Mon, 2 Jul 2018 21:11:47 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0

On 07/02/2018 11:22 AM, Markus Armbruster wrote:
handle_qmp_command() reports certain errors right away.  This is wrong
when OOB is enabled, because the errors can "jump the queue" then, as
the previous commit demonstrates.

To fix, we need to delay errors until dispatch.  Do that for semantic
errors, mostly by reverting ill-advised parts of commit cf869d53172
"qmp: support out-of-band (oob) execution".  Bonus: doesn't run
qmp_dispatch_check_obj() twice, once in handle_qmp_command(), and
again in do_qmp_dispatch().  That's also due to commit cf869d53172.

The next commit will fix queue jumping for syntax errors.

Signed-off-by: Markus Armbruster <address@hidden>
---
  include/qapi/qmp/dispatch.h |  2 -
  monitor.c                   | 79 +++++++++----------------------------
  qapi/qmp-dispatch.c         | 12 +++++-
  tests/qmp-test.c            |  4 +-
  4 files changed, 30 insertions(+), 67 deletions(-)


Reviewed-by: Eric Blake <address@hidden

Fixing bug and reducing code size. I'm glad I made oob experimental in 2.12, because I obviously didn't review it as closely in your absence for that release as you have done now (and changing it to be non-experimental early in the release cycle has also been good for letting us chase down these bugs in the original implementation).

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org



reply via email to

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