[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: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH 17/32] qmp: Don't let malformed in-band commands jump the queue |
Date: |
Tue, 03 Jul 2018 08:46:58 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
Eric Blake <address@hidden> writes:
> 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
In all fairness, it took me a while to see this. The first clue was
"hmm, why does qmp_dispatch_check_obj() gets called in two places?"
Pulling that thread got me to this bug and more.
> non-experimental early in the release cycle has also been good for
> letting us chase down these bugs in the original implementation).
Running into that regression just in time was lucky :)
- Re: [Qemu-devel] [PATCH 16/32] tests/qmp-test: Demonstrate QMP errors jumping the queue, (continued)
- [Qemu-devel] [PATCH 18/32] qmp: Don't let JSON errors jump the queue, Markus Armbruster, 2018/07/02
- [Qemu-devel] [PATCH 12/32] qmp: Redo how the client requests out-of-band execution, Markus Armbruster, 2018/07/02
- [Qemu-devel] [PATCH 27/32] qmp: Add some comments around null responses, Markus Armbruster, 2018/07/02
- [Qemu-devel] [PATCH 17/32] qmp: Don't let malformed in-band commands jump the queue, Markus Armbruster, 2018/07/02
- [Qemu-devel] [PATCH 24/32] qmp: Replace monitor_json_emitter{, raw}() by qmp_{queue, send}_response(), Markus Armbruster, 2018/07/02
- [Qemu-devel] [PATCH 32/32] qapi: Polish command flags documentation in qapi-code-gen.txt, Markus Armbruster, 2018/07/02
- [Qemu-devel] [PATCH 02/32] monitor: Spell "I/O thread" consistently in comments, Markus Armbruster, 2018/07/02
- [Qemu-devel] [PATCH 23/32] qmp: Use QDict * instead of QObject * for response objects, Markus Armbruster, 2018/07/02
- [Qemu-devel] [PATCH 03/32] docs/interop/qmp: Improve OOB documentation, Markus Armbruster, 2018/07/02