From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39397) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X8714-0006hp-Md for qemu-devel@nongnu.org; Fri, 18 Jul 2014 08:12:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X870y-0002uG-Hx for qemu-devel@nongnu.org; Fri, 18 Jul 2014 08:11:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:27299) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X870y-0002u5-95 for qemu-devel@nongnu.org; Fri, 18 Jul 2014 08:11:52 -0400 Date: Fri, 18 Jul 2014 13:11:47 +0100 From: Stefan Hajnoczi Message-ID: <20140718121147.GE2685@stefanha-thinkpad.redhat.com> References: <7ef10831de23421f2af9c035c29dcae58a5ac400.1405538416.git.maria.k@catit.be> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="YkJPYEFdoxh/AXLE" Content-Disposition: inline In-Reply-To: <7ef10831de23421f2af9c035c29dcae58a5ac400.1405538416.git.maria.k@catit.be> Subject: Re: [Qemu-devel] [PATCH V3 4/5] layout: Generator of fuzzed qcow2 images List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Maria Kustova Cc: kwolf@redhat.com, famz@redhat.com, qemu-devel@nongnu.org, Maria Kustova --YkJPYEFdoxh/AXLE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Jul 16, 2014 at 11:49:38PM +0400, Maria Kustova wrote: > + @staticmethod > + def _header(cluster_bits, img_size, backing_file_name=None): > + """Generate a random valid header""" > + meta_header = [ > + ['>4s', 0, "QFI\xfb", 'magic'], > + ['>I', 4, random.randint(2, 3), 'version'], > + ['>Q', 8, 0, 'backing_file_offset'], > + ['>I', 16, 0, 'backing_file_size'], > + ['>I', 20, cluster_bits, 'cluster_bits'], > + ['>Q', 24, img_size, 'size'], > + ['>I', 32, 0, 'crypt_method'], > + ['>I', 36, 0, 'l1_size'], > + ['>Q', 40, 0, 'l1_table_offset'], > + ['>Q', 48, 0, 'refcount_table_offset'], > + ['>I', 56, 0, 'refcount_table_clusters'], > + ['>I', 60, 0, 'nb_snapshots'], > + ['>Q', 64, 0, 'snapshots_offset'], > + ['>Q', 72, 0, 'incompatible_features'], > + ['>Q', 80, 0, 'compatible_features'], > + ['>Q', 88, 0, 'autoclear_features'], > + # Only refcount_order = 4 is supported by current (07.2014) > + # implementaation of QEMU s/implementaation/implementation/ --YkJPYEFdoxh/AXLE Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJTyQ8DAAoJEJykq7OBq3PIdyMH/2sf/eSV29pBuV58S3YC4DlE aDfIrms57KrIJ/+ldS9Jgy4o0pITFnBdmxNV7vGDQO4YOC+eJfzJUt9kKzByD3+b llFH1H9Onq8NirnzzyN3ckHba5RjNzM7qXlOlgGf77idAvHikSrlOyxZ2c8NsNqe d/FXdQ2ektkzbmNmBOe6GIbJdf+m5A+4EgtFByYVmsgET+KsJABx/+Cn4WP2C74b M3bXrITVCsaKaoinH9RGApd1lQ6r4AYaXYxK8AlqcOx781NSGBGZsPHJ+NsACmK/ 69tb0FIuZG5JMVV/npXbh6u0mUd4IF/LdO4F9d9X9pglBdUS8ev/9DOtoTpoXv4= =b8Qb -----END PGP SIGNATURE----- --YkJPYEFdoxh/AXLE--