Re: [Qemu-block] [kubevirt-dev] Re: Converting qcow2 image on the fly to raw format

2018-07-20 Thread Daniel P . Berrangé
On Thu, Jul 19, 2018 at 09:39:35PM +0100, Richard W.M. Jones wrote: > I did the original work using AFL to fuzz qemu-img and find > problematic images. From that work Dan & I suggested some fairly low > limits (10 seconds IIRC). See: > > https://bugs.launchpad.net/qemu/+bug/1462944 >

Re: [Qemu-block] [kubevirt-dev] Re: Converting qcow2 image on the fly to raw format

2018-07-20 Thread Daniel P . Berrangé
On Thu, Jul 19, 2018 at 09:50:00PM +0300, Nir Soffer wrote: > On Mon, Jul 16, 2018 at 11:56 AM Daniel P. Berrangé > wrote: > ... > > > Recommendation is to run 'qemu-img info' to extract the metadata and sanity > > check results eg no backing file list, not unreasonable size, etc. When > >

Re: [Qemu-block] [kubevirt-dev] Re: Converting qcow2 image on the fly to raw format

2018-07-19 Thread Richard W.M. Jones
I did the original work using AFL to fuzz qemu-img and find problematic images. From that work Dan & I suggested some fairly low limits (10 seconds IIRC). See: https://bugs.launchpad.net/qemu/+bug/1462944 https://bugs.launchpad.net/qemu/+bug/1462949 A lot more problematic images were found (at

Re: [Qemu-block] [kubevirt-dev] Re: Converting qcow2 image on the fly to raw format

2018-07-19 Thread Nir Soffer
On Thu, Jul 19, 2018 at 10:27 PM Richard W.M. Jones wrote: > > This is the code in libguestfs if you prefer something in C: > > > https://github.com/libguestfs/libguestfs/blob/3a87c4bb441430c9cef9223e67d10bf51a4e865c/lib/info.c#L150-L160 I see that libguestfs is using 10 seconds limit:

Re: [Qemu-block] [kubevirt-dev] Re: Converting qcow2 image on the fly to raw format

2018-07-19 Thread Nir Soffer
On Thu, Jul 19, 2018 at 10:24 PM Richard W.M. Jones wrote: > On Thu, Jul 19, 2018 at 09:50:00PM +0300, Nir Soffer wrote: > > On Mon, Jul 16, 2018 at 11:56 AM Daniel P. Berrangé > > > wrote: > > ... > > > > > Recommendation is to run 'qemu-img info' to extract the metadata and > sanity > > >

Re: [Qemu-block] [kubevirt-dev] Re: Converting qcow2 image on the fly to raw format

2018-07-19 Thread Richard W.M. Jones
This is the code in libguestfs if you prefer something in C: https://github.com/libguestfs/libguestfs/blob/3a87c4bb441430c9cef9223e67d10bf51a4e865c/lib/info.c#L150-L160 https://github.com/libguestfs/libguestfs/blob/3a87c4bb441430c9cef9223e67d10bf51a4e865c/lib/command.c#L585-L600 Rich. --

Re: [Qemu-block] [kubevirt-dev] Re: Converting qcow2 image on the fly to raw format

2018-07-19 Thread Richard W.M. Jones
On Thu, Jul 19, 2018 at 09:50:00PM +0300, Nir Soffer wrote: > On Mon, Jul 16, 2018 at 11:56 AM Daniel P. Berrangé > wrote: > ... > > > Recommendation is to run 'qemu-img info' to extract the metadata and sanity > > check results eg no backing file list, not unreasonable size, etc. When > >

Re: [Qemu-block] [kubevirt-dev] Re: Converting qcow2 image on the fly to raw format

2018-07-19 Thread Nir Soffer
On Mon, Jul 16, 2018 at 11:56 AM Daniel P. Berrangé wrote: ... > Recommendation is to run 'qemu-img info' to extract the metadata and sanity > check results eg no backing file list, not unreasonable size, etc. When > running 'qemu-img info' apply process limits of 30 secs CPU time, and 1 GB >

Re: [Qemu-block] [kubevirt-dev] Re: Converting qcow2 image on the fly to raw format

2018-07-19 Thread Richard W.M. Jones
On Thu, Jul 19, 2018 at 04:25:28PM +0300, Nir Soffer wrote: > On Mon, Jul 16, 2018 at 11:56 AM Daniel P. Berrangé > wrote: > > > On Wed, Jul 11, 2018 at 02:17:18PM +0300, Adam Litke wrote: > > > Adding some kubevirt developers to the thread. Thanks guys for the > > > information! I think this

Re: [Qemu-block] [kubevirt-dev] Re: Converting qcow2 image on the fly to raw format

2018-07-16 Thread Daniel P . Berrangé
On Wed, Jul 11, 2018 at 02:17:18PM +0300, Adam Litke wrote: > Adding some kubevirt developers to the thread. Thanks guys for the > information! I think this could work perfectly for on the fly conversion > of qcow2 images to raw format on our PVCs. FYI if you are intending to accept qcow2