qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Michael Roth <mdroth@linux.vnet.ibm.com>
To: qemu-devel@nongnu.org
Cc: aliguori@linux.vnet.ibm.com, Jes.Sorensen@redhat.com,
	agl@linux.vnet.ibm.com, mdroth@linux.vnet.ibm.com,
	lcapitulino@redhat.com
Subject: [Qemu-devel] [QAPI+QGA 1/3] Error propagation and JSON parser fix-ups
Date: Wed,  1 Jun 2011 12:14:46 -0500	[thread overview]
Message-ID: <1306948500-15086-1-git-send-email-mdroth@linux.vnet.ibm.com> (raw)

This is Set 1/3 of the QAPI+QGA patchsets.

These patches apply on top of master (5-31), and can also be obtained from:
git://repo.or.cz/qemu/mdroth.git qapi-backport-set1-v1

(Set1+2 are a backport of some of the QAPI-related work from Anthony's
glib tree. The main goal is to get the basic code generation infrastructure in
place so that it can be used by the guest agent to implement a QMP-like guest
interface, and so that future work regarding the QMP conversion to QAPI can be
decoupled from the infrastructure bits. Set3 is the Qemu Guest Agent
(virtagent), rebased on the new code QAPI code generation infrastructure. This
is the first user of QAPI, QMP will follow.)
___

This patchset introduces the following:

 - a new error-handling framework with support for exception-like error
   propagation. This error-handling will be used by QAPI and the guest agent,
   initially, and other users will be converted over time.

 - various hardening of QEMU's json parsing routines, mainly: limits on max
   token size and token count, immediately propagating lexer errors to the
   parser (inducing a NULL qobject to be output) to avoid churning on tokens
   after a lexer error, stricter handling of invalid UTF-8 characters, and
   some minor bug fixes. 

CHANGES SINCE V0 ("QAPI Infrastructure Round 1"):

 - Rebased on Luiz's backport of the error-handling patches
 - Added JSON-related patches

 Makefile        |    4 +-
 Makefile.objs   |    2 +-
 error.c         |  140 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 error.h         |   70 +++++++++++++++++++++++++++
 error_int.h     |   29 +++++++++++
 json-lexer.c    |   47 ++++++++++++++++---
 json-lexer.h    |    1 +
 json-parser.c   |   83 ++++++++++++++++++++++++++++++--
 json-parser.h   |    2 +
 json-streamer.c |   42 +++++++++++++++--
 json-streamer.h |    1 +
 qerror.c        |   59 ++++++++++++++++-------
 qerror.h        |    4 ++
 13 files changed, 446 insertions(+), 38 deletions(-)

             reply	other threads:[~2011-06-01 20:36 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-01 17:14 Michael Roth [this message]
2011-06-01 17:14 ` [Qemu-devel] [PATCH v1][ 01/14] QError: Introduce qerror_format_desc() Michael Roth
2011-06-07 19:18   ` Anthony Liguori
2011-06-01 17:14 ` [Qemu-devel] [PATCH v1][ 02/14] QError: Introduce qerror_format() Michael Roth
2011-06-01 17:14 ` [Qemu-devel] [PATCH v1][ 03/14] Introduce the new error framework Michael Roth
2011-06-01 17:14 ` [Qemu-devel] [PATCH v1][ 04/14] json-parser: propagate error from parser Michael Roth
2011-06-01 17:14 ` [Qemu-devel] [PATCH v1][ 05/14] json-streamer: allow recovery after bad input Michael Roth
2011-06-01 17:14 ` [Qemu-devel] [PATCH v1][ 06/14] json-lexer: limit the maximum size of a given token Michael Roth
2011-06-01 17:14 ` [Qemu-devel] [PATCH v1][ 07/14] json-streamer: limit the maximum recursion depth and maximum token count Michael Roth
2011-06-01 17:14 ` [Qemu-devel] [PATCH v1][ 08/14] json-streamer: make sure to reset token_size after emitting a token list Michael Roth
2011-06-01 17:14 ` [Qemu-devel] [PATCH v1][ 09/14] json-parser: detect premature EOI Michael Roth
2011-06-01 17:14 ` [Qemu-devel] [PATCH v1][ 10/14] json-lexer: reset the lexer state on an invalid token Michael Roth
2011-06-01 17:14 ` [Qemu-devel] [PATCH v1][ 11/14] json-lexer: fix flushing logic to not always go to error state Michael Roth
2011-06-01 17:14 ` [Qemu-devel] [PATCH v1][ 12/14] json-lexer: make lexer error-recovery more deterministic Michael Roth
2011-06-01 17:14 ` [Qemu-devel] [PATCH v1][ 13/14] json-streamer: add handling for JSON_ERROR token/state Michael Roth
2011-06-01 17:15 ` [Qemu-devel] [PATCH v1][ 14/14] json-parser: add handling for NULL token list Michael Roth

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=1306948500-15086-1-git-send-email-mdroth@linux.vnet.ibm.com \
    --to=mdroth@linux.vnet.ibm.com \
    --cc=Jes.Sorensen@redhat.com \
    --cc=agl@linux.vnet.ibm.com \
    --cc=aliguori@linux.vnet.ibm.com \
    --cc=lcapitulino@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 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).