qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
To: qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Subject: [Qemu-devel] [PATCH v2 0/3] block: enforce constraints on block size properties
Date: Wed, 14 Mar 2012 15:57:03 +0000	[thread overview]
Message-ID: <1331740626-5053-1-git-send-email-stefanha@linux.vnet.ibm.com> (raw)

This series ensures we only accept valid block sizes.  Although in theory block
sizes can vary a lot, the storage protocols (ATA, SCSI) as well as the QEMU
block layer implementation impose constraints.  Valid QEMU block sizes today
must meet:

 * Power of 2
 * Multiple of 512 bytes
 * Fits into uint16_t

Nicolae Mogoreanu <mogo@google.com> found that QEMU allows invalid block sizes
to be specified and this can cause it to crash when I/O is performed.

Stefan Hajnoczi (3):
  qerror: fix QERR_PROPERTY_VALUE_OUT_OF_RANGE description
  qdev: add blocksize property type
  block: enforce constraints on block size properties

 block.h              |    8 ++++----
 hw/qdev-properties.c |   46 ++++++++++++++++++++++++++++++++++++++++++++++
 hw/qdev.h            |    3 +++
 qerror.c             |    7 ++++++-
 qerror.h             |    4 ++++
 5 files changed, 63 insertions(+), 5 deletions(-)

-- 
1.7.9.1

             reply	other threads:[~2012-03-14 15:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-14 15:57 Stefan Hajnoczi [this message]
2012-03-14 15:57 ` [Qemu-devel] [PATCH v2 1/3] qerror: fix QERR_PROPERTY_VALUE_OUT_OF_RANGE description Stefan Hajnoczi
2012-03-14 16:03   ` Paolo Bonzini
2012-03-14 15:57 ` [Qemu-devel] [PATCH v2 2/3] qdev: add blocksize property type Stefan Hajnoczi
2012-03-14 16:04   ` Paolo Bonzini
2012-03-14 15:57 ` [Qemu-devel] [PATCH v2 3/3] block: enforce constraints on block size properties Stefan Hajnoczi
2012-03-14 16:04   ` Paolo Bonzini
2012-03-14 16:13     ` Kevin Wolf
2012-03-14 17:08 ` [Qemu-devel] [PATCH v2 0/3] " Stefan Hajnoczi

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=1331740626-5053-1-git-send-email-stefanha@linux.vnet.ibm.com \
    --to=stefanha@linux.vnet.ibm.com \
    --cc=kwolf@redhat.com \
    --cc=pbonzini@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).