[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v22 00/25] replace QEMUOptionParameter with Qemu
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v22 00/25] replace QEMUOptionParameter with QemuOpts |
Date: |
Mon, 10 Mar 2014 16:45:36 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 |
On 03/10/2014 01:31 AM, Chunyan Liu wrote:
> This patch series is to replace QEMUOptionParameter with QemuOpts, so that
> only
> one Qemu Option structure is kept in QEMU code.
Uggh. The more I learn about QemuOpts while reviewing this patch, the
more I KNOW it has lurking bugs waiting to bite us.
Case in point:
$ touch oddname,id=1
$ qemu-system-x86_64 -drive id=a,file=oddname,,id=1 # starts
$ # now, swap the two arguments:
$ qemu-system-x86_64 -drive file=oddname,,id=1,id=a
qemu-system-x86_64: -drive file=oddname,,id=1,id=a: Parameter 'id'
expects an identifier
$
Gross. opts_parse uses strncmp() for checking for a leading 'id=', but
strstr() for checking for an intermediate ',id='. And strstr() can have
false positives, including in the middle of my filename that was
properly escaped.
This is a long-standing bug - as a bug, you can fix it after freeze, but
as it is long-standing, it's not the end of the world if it misses 2.0.
But it underscores my plea that this series is not fully baked until
you add a testsuite.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-devel] [PATCH v22 24/25] vvfat.c: replace QEMUOptionParameter with QemuOpts, (continued)
- Re: [Qemu-devel] [PATCH v22 00/25] replace QEMUOptionParameter with QemuOpts, Chun Yan Liu, 2014/03/10
- Re: [Qemu-devel] [PATCH v22 00/25] replace QEMUOptionParameter with QemuOpts, Chun Yan Liu, 2014/03/10
- Re: [Qemu-devel] [PATCH v22 00/25] replace QEMUOptionParameter with QemuOpts, Chun Yan Liu, 2014/03/10
- Re: [Qemu-devel] [PATCH v22 00/25] replace QEMUOptionParameter with QemuOpts, Chun Yan Liu, 2014/03/10
- Re: [Qemu-devel] [PATCH v22 00/25] replace QEMUOptionParameter with QemuOpts, Chun Yan Liu, 2014/03/10
- Re: [Qemu-devel] [PATCH v22 00/25] replace QEMUOptionParameter with QemuOpts, Chun Yan Liu, 2014/03/10
- Re: [Qemu-devel] [PATCH v22 00/25] replace QEMUOptionParameter with QemuOpts, Stefan Hajnoczi, 2014/03/10
- Re: [Qemu-devel] [PATCH v22 00/25] replace QEMUOptionParameter with QemuOpts,
Eric Blake <=
- Re: [Qemu-devel] [PATCH v22 00/25] replace QEMUOptionParameter with QemuOpts, Stefan Hajnoczi, 2014/03/11
- Re: [Qemu-devel] [PATCH v22 00/25] replace QEMUOptionParameter with QemuOpts, Leandro Dorileo, 2014/03/20
Re: [Qemu-devel] [PATCH v22 00/25] replace QEMUOptionParameter with QemuOpts, Kevin Wolf, 2014/03/21