qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH v2 0/3] block: enforce constraints on block size pro


From: Stefan Hajnoczi
Subject: [Qemu-devel] [PATCH v2 0/3] block: enforce constraints on block size properties
Date: Wed, 14 Mar 2012 15:57:03 +0000

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 <address@hidden> 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 via email to

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