Re: [Qemu-devel] [PATCH] qcow2: Check the L1 table parameters from all internal snapshots

2018-02-09 Thread Kevin Wolf
Am 09.02.2018 um 16:11 hat Alberto Garcia geschrieben: > On Fri 09 Feb 2018 04:03:31 PM CET, Kevin Wolf wrote: > > How about we move the check to bdrv_open() as proposed, but make it > > conditional so that it's skipped with BDRV_O_CHECK and then add a way > > to fix the situation with qemu-img

Re: [Qemu-devel] [PATCH] qcow2: Check the L1 table parameters from all internal snapshots

2018-02-09 Thread Alberto Garcia
On Fri 09 Feb 2018 04:03:31 PM CET, Kevin Wolf wrote: > How about we move the check to bdrv_open() as proposed, but make it > conditional so that it's skipped with BDRV_O_CHECK and then add a way > to fix the situation with qemu-img check -r? That was one of the alternatives that I was

Re: [Qemu-devel] [PATCH] qcow2: Check the L1 table parameters from all internal snapshots

2018-02-09 Thread Kevin Wolf
Am 09.02.2018 um 14:04 hat Max Reitz geschrieben: > On 2018-02-09 12:37, Alberto Garcia wrote: > > The code that reads the qcow2 snapshot table takes the offset and size > > of all snapshots' L1 table without doing any kind of checks. > > > > Although qcow2_snapshot_load_tmp() does verify that

Re: [Qemu-devel] [PATCH] qcow2: Check the L1 table parameters from all internal snapshots

2018-02-09 Thread Max Reitz
On 2018-02-09 14:35, Alberto Garcia wrote: > On Fri 09 Feb 2018 02:04:06 PM CET, Max Reitz wrote: >> I don't like completely refusing to open a qcow2 image if one of the >> snapshots is invalid, without giving the user any way of fixing it. >> >> With this patch, the final two images created in

Re: [Qemu-devel] [PATCH] qcow2: Check the L1 table parameters from all internal snapshots

2018-02-09 Thread Alberto Garcia
On Fri 09 Feb 2018 02:04:06 PM CET, Max Reitz wrote: > I don't like completely refusing to open a qcow2 image if one of the > snapshots is invalid, without giving the user any way of fixing it. > > With this patch, the final two images created in 080 cannot be opened > at all (not even with

Re: [Qemu-devel] [PATCH] qcow2: Check the L1 table parameters from all internal snapshots

2018-02-09 Thread Max Reitz
On 2018-02-09 12:37, Alberto Garcia wrote: > The code that reads the qcow2 snapshot table takes the offset and size > of all snapshots' L1 table without doing any kind of checks. > > Although qcow2_snapshot_load_tmp() does verify that the table size is > valid, the table offset is not checked at