qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 2/3] qemu-img: Detect backing file chain infi


From: Kevin Wolf
Subject: Re: [Qemu-devel] [PATCH v2 2/3] qemu-img: Detect backing file chain infinite loops
Date: Tue, 16 Oct 2012 16:58:34 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120605 Thunderbird/13.0

Am 16.10.2012 16:42, schrieb Stefan Hajnoczi:
> On Tue, Oct 16, 2012 at 12:11:44PM +0200, Kevin Wolf wrote:
>> Am 15.10.2012 14:44, schrieb Stefan Hajnoczi:
>>> A malicious or corruption image can contain an infinite loop of backing
>>> files.  The qemu-img info --backing-chain command must not hang when
>>> such files are encountered.
>>>
>>> Signed-off-by: Stefan Hajnoczi <address@hidden>
>>
>> This seems to do what is intended, but I think rather than fixing the
>> 'qemu-img info' special case I'd have fixed bdrv_open() to detect the
>> situation.
> 
> When bdrv_open() on the chain fails we'll still need to iterate each
> image (with infinite loop detection) in qemu-img info.  This allows
> qemu-img info to print out details of the chain and where the chain goes
> wrong.

Depends on the expected output. If you don't print the start of chain
but only an error message with the file name of the image that creates
the loop, you could generate the error in bdrv_open().

But yes, we can have both. It's just that having nothing in bdrv_open()
isn't really satisfying.

Kevin



reply via email to

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