Re: [Qemu-block] [Qemu-devel] [RFC PATCH 0/2] Acceptance tests for qemu-img

2018-11-13 Thread Markus Armbruster
Drive-by comment... Cleber Rosa writes: [...] > My impression is that the "infrastructure for block tests" is not that > different from the infrastructure needed by other tests, specially other > QEMU tests. [...] Yes. The actual reason for having a completely separate testing infrastructure f

Re: [Qemu-block] [PULL 00/14] Block layer patches

2018-11-13 Thread Peter Maydell
On 12 November 2018 at 17:05, Kevin Wolf wrote: > The following changes since commit 5704c36d25ee84e7129722cb0db53df9faefe943: > > Merge remote-tracking branch > 'remotes/kraxel/tags/fixes-31-20181112-pull-request' into staging (2018-11-12 > 15:55:40 +) > > are available in the Git reposit

Re: [Qemu-block] [PATCH] nvme: fix oob access issue(CVE-2018-16847)

2018-11-13 Thread Kevin Wolf
Am 13.11.2018 um 02:45 hat Li Qiang geschrieben: > Ping what't the status of this patch. > > I see Kevin's new pr doesn't contain this patch. Oh, I thought you said that you wanted to fix this at a higher level so that the problem is caught before even getting into nvme code? If you don't, I

Re: [Qemu-block] [PATCH] nvme: fix oob access issue(CVE-2018-16847)

2018-11-13 Thread Li Qiang
Kevin Wolf 于2018年11月13日周二 下午6:17写道: > Am 13.11.2018 um 02:45 hat Li Qiang geschrieben: > > Ping what't the status of this patch. > > > > I see Kevin's new pr doesn't contain this patch. > > Oh, I thought you said that you wanted to fix this at a higher level so > that the problem is caught be

Re: [Qemu-block] [RFC PATCH 0/2] Acceptance tests for qemu-img

2018-11-13 Thread Kevin Wolf
Am 12.11.2018 um 18:36 hat Cleber Rosa geschrieben: > I hope you don't blame me for trying to have the advantage of the > counter answer. :) Thanks for being so honest, but do you actually need this advantage when you have good technical arguments in favour of your proposal? > >> And run all test

Re: [Qemu-block] [PATCH for-3.1] fdc: fix segfault in fdctrl_stop_transfer() when DMA is disabled

2018-11-13 Thread Kevin Wolf
Am 12.11.2018 um 20:58 hat John Snow geschrieben: > > > On 11/11/18 4:40 AM, Mark Cave-Ayland wrote: > > Commit c8a35f1cf0f "fdc: use IsaDma interface instead of global DMA_* > > functions" accidentally introduced a segfault in fdctrl_stop_transfer() for > > non-DMA transfers. > > > > If fdctrl-

Re: [Qemu-block] [RFC PATCH 0/2] Acceptance tests for qemu-img

2018-11-13 Thread Eduardo Habkost
On Tue, Nov 13, 2018 at 01:18:36PM +0100, Kevin Wolf wrote: [...] > Anyway, one specific concern about the "simple way" I have is that we're > adding a hard dependency on an external package (Avocado) that isn't > usually installed anyway on developer machines. Maintainers will of > course just ins

Re: [Qemu-block] [Qemu-devel] [RFC PATCH 0/2] Acceptance tests for qemu-img

2018-11-13 Thread Daniel P . Berrangé
On Tue, Nov 13, 2018 at 10:39:57AM +0100, Markus Armbruster wrote: > Drive-by comment... > > Cleber Rosa writes: > > [...] > > My impression is that the "infrastructure for block tests" is not that > > different from the infrastructure needed by other tests, specially other > > QEMU tests. > [..

Re: [Qemu-block] [RFC PATCH 0/2] Acceptance tests for qemu-img

2018-11-13 Thread Kevin Wolf
Am 13.11.2018 um 14:26 hat Eduardo Habkost geschrieben: > On Tue, Nov 13, 2018 at 01:18:36PM +0100, Kevin Wolf wrote: > [...] > > Anyway, one specific concern about the "simple way" I have is that we're > > adding a hard dependency on an external package (Avocado) that isn't > > usually installed a

Re: [Qemu-block] [RFC PATCH 0/2] Acceptance tests for qemu-img

2018-11-13 Thread Eduardo Habkost
On Tue, Nov 13, 2018 at 02:51:16PM +0100, Kevin Wolf wrote: > Am 13.11.2018 um 14:26 hat Eduardo Habkost geschrieben: > > On Tue, Nov 13, 2018 at 01:18:36PM +0100, Kevin Wolf wrote: > > [...] > > > Anyway, one specific concern about the "simple way" I have is that we're > > > adding a hard dependen

Re: [Qemu-block] [RFC PATCH 0/2] Acceptance tests for qemu-img

2018-11-13 Thread Cleber Rosa
On 11/13/18 7:18 AM, Kevin Wolf wrote: > Am 12.11.2018 um 18:36 hat Cleber Rosa geschrieben: >> I hope you don't blame me for trying to have the advantage of the >> counter answer. :) > > Thanks for being so honest, but do you actually need this advantage when > you have good technical arguments

Re: [Qemu-block] [RFC PATCH 0/2] Acceptance tests for qemu-img

2018-11-13 Thread Cleber Rosa
On 11/13/18 8:51 AM, Kevin Wolf wrote: > Am 13.11.2018 um 14:26 hat Eduardo Habkost geschrieben: >> On Tue, Nov 13, 2018 at 01:18:36PM +0100, Kevin Wolf wrote: >> [...] >>> Anyway, one specific concern about the "simple way" I have is that we're >>> adding a hard dependency on an external packag

Re: [Qemu-block] [RFC PATCH 0/2] Acceptance tests for qemu-img

2018-11-13 Thread Eduardo Habkost
On Tue, Nov 13, 2018 at 09:20:11AM -0500, Cleber Rosa wrote: > > > On 11/13/18 8:51 AM, Kevin Wolf wrote: > > Am 13.11.2018 um 14:26 hat Eduardo Habkost geschrieben: > >> On Tue, Nov 13, 2018 at 01:18:36PM +0100, Kevin Wolf wrote: > >> [...] > >>> Anyway, one specific concern about the "simple wa

Re: [Qemu-block] [Qemu-devel] [RFC PATCH 0/2] Acceptance tests for qemu-img

2018-11-13 Thread Cleber Rosa
On 11/13/18 8:50 AM, Daniel P. Berrangé wrote: > On Tue, Nov 13, 2018 at 10:39:57AM +0100, Markus Armbruster wrote: >> Drive-by comment... >> >> Cleber Rosa writes: >> >> [...] >>> My impression is that the "infrastructure for block tests" is not that >>> different from the infrastructure neede

Re: [Qemu-block] [RFC PATCH 0/2] Acceptance tests for qemu-img

2018-11-13 Thread Cleber Rosa
On 11/13/18 9:32 AM, Eduardo Habkost wrote: > On Tue, Nov 13, 2018 at 09:20:11AM -0500, Cleber Rosa wrote: > > With check-venv, we made "installing avocado" a small > implementation detail that people don't need to care about when > running the tests. > > I believe the sentence "which must be i

Re: [Qemu-block] [RFC PATCH 0/2] Acceptance tests for qemu-img

2018-11-13 Thread Eduardo Habkost
On Tue, Nov 13, 2018 at 09:43:49AM -0500, Cleber Rosa wrote: > > On 11/13/18 9:32 AM, Eduardo Habkost wrote: > > On Tue, Nov 13, 2018 at 09:20:11AM -0500, Cleber Rosa wrote: > > > > With check-venv, we made "installing avocado" a small > > implementation detail that people don't need to care abou

Re: [Qemu-block] KVM Forum block no[td]es

2018-11-13 Thread Alberto Garcia
On Sun 11 Nov 2018 11:25:00 PM CET, Max Reitz wrote: > Permission system > = > > GRAPH_MOD > - > > We need some way for the commit job to prevent graph changes on its > chain while it is running. Our current blocker doesn’t do the job, > however. What to do? > > - We have

Re: [Qemu-block] [RFC PATCH 0/2] Acceptance tests for qemu-img

2018-11-13 Thread Kevin Wolf
Hi Cleber, I will shorten this email a lot while replying because I have the impression that most of the discussion isn't actually as productive as it could be. I'm not trying to evade on any point that I'm cutting out, so if there is something specific in the part I'm removing that you would like

[Qemu-block] [PATCH] qcow2: Assert that refcount block offsets fit in the refcount table

2018-11-13 Thread Alberto Garcia
Refcount table entries have a field to store the offset of the refcount block. The rest of the bits of the entry are currently reserved. The offset is always taken from the entry using REFT_OFFSET_MASK to ensure that we only use the bits that belong to that field. While that mask is used every ti

Re: [Qemu-block] [for 3.1? PATCH] qcow2: Assert that refcount block offsets fit in the refcount table

2018-11-13 Thread Eric Blake
On 11/13/18 10:45 AM, Alberto Garcia wrote: Refcount table entries have a field to store the offset of the refcount block. The rest of the bits of the entry are currently reserved. The offset is always taken from the entry using REFT_OFFSET_MASK to ensure that we only use the bits that belong to

Re: [Qemu-block] [PATCH] nvme: fix oob access issue(CVE-2018-16847)

2018-11-13 Thread Paolo Bonzini
On 13/11/2018 11:17, Kevin Wolf wrote: > Am 13.11.2018 um 02:45 hat Li Qiang geschrieben: >> Ping what't the status of this patch. >> >> I see Kevin's new pr doesn't contain this patch. > > Oh, I thought you said that you wanted to fix this at a higher level so > that the problem is caught bef

Re: [Qemu-block] [PATCH] nvme: fix oob access issue(CVE-2018-16847)

2018-11-13 Thread Paolo Bonzini
On 02/11/2018 16:40, Keith Busch wrote: > Hey, so why is this memory region access even considered valid if the > request is out of range from what NVMe had registered for its > MemoryRegion? Wouldn't it be better to not call the mr->ops->read/write > if it's out of bounds? Otherwise every MemoryRe

Re: [Qemu-block] [Qemu-devel] [PATCH for-3.1] fdc: fix segfault in fdctrl_stop_transfer() when DMA is disabled

2018-11-13 Thread John Snow
On 11/13/18 8:16 AM, Kevin Wolf wrote: > Am 12.11.2018 um 20:58 hat John Snow geschrieben: >> >> >> On 11/11/18 4:40 AM, Mark Cave-Ayland wrote: >>> Commit c8a35f1cf0f "fdc: use IsaDma interface instead of global DMA_* >>> functions" accidentally introduced a segfault in fdctrl_stop_transfer() f

Re: [Qemu-block] [PATCH v7 6/6] qcow2: Avoid memory over-allocation on compressed images

2018-11-13 Thread Eric Blake
On 6/29/18 10:47 AM, Kevin Wolf wrote: Am 29.06.2018 um 17:16 hat Eric Blake geschrieben: On 06/29/2018 04:03 AM, Kevin Wolf wrote: Am 28.06.2018 um 21:07 hat Eric Blake geschrieben: When reading a compressed image, we were allocating s->cluster_data to 32*cluster_size + 512 (possibly over 64

[Qemu-block] [PATCH for 3.1 v3 0/3] minor qcow2 compression improvements

2018-11-13 Thread Eric Blake
As the added iotests shows, we have a (corner case) data corruption that is user triggerable, therefore, this is still appropriate for inclusion in 3.1. v6 was here: https://lists.gnu.org/archive/html/qemu-devel/2018-06/msg08497.html since then: - don't reduce constraints on reftable [Kevin] - re

[Qemu-block] [PATCH v3 3/3] iotests: Add new test 220 for max compressed cluster offset

2018-11-13 Thread Eric Blake
If you have a capable file system (tmpfs is good, ext4 not so much; run ./check with TEST_DIR pointing to a good location so as not to skip the test), it's actually possible to create a qcow2 file that expands to a sparse 512T image with just over 38M of content. The test is not the world's fastest

[Qemu-block] [PATCH v3 2/3] qcow2: Don't allow overflow during cluster allocation

2018-11-13 Thread Eric Blake
Our code was already checking that we did not attempt to allocate more clusters than what would fit in an INT64 (the physical maximimum if we can access a full off_t's worth of data). But this does not catch smaller limits enforced by various spots in the qcow2 image description: L1 and normal clu

[Qemu-block] [PATCH v3 1/3] qcow2: Document some maximum size constraints

2018-11-13 Thread Eric Blake
Although off_t permits up to 63 bits (8EB) of file offsets, in practice, we're going to hit other limits first. Document some of those limits in the qcow2 spec, and how choice of cluster size can influence some of the limits. While we cannot map any virtual cluster to any address higher than 64 P

Re: [Qemu-block] [Qemu-devel] [PATCH v3 1/3] blkdebug: fix one shot rule processing

2018-11-13 Thread John Snow
On 11/12/18 2:06 AM, Marc Olson via Qemu-devel wrote: > If 'once' is specified, the rule should execute just once, regardless if > it is supposed to return an error or not. Take the example where you > want the first IO to an LBA to succeed, but subsequent IOs to fail. You > could either use sta

Re: [Qemu-block] [Qemu-devel] [PATCH v3 2/3] blkdebug: Extend rule check for additional types

2018-11-13 Thread John Snow
On 11/12/18 2:06 AM, Marc Olson via Qemu-devel wrote: > Break out the more common parts of the BlkdebugRule struct, and make > rule_check() more explicit about operating only on error injection types > so that additional rule types can be added in the future. > > Signed-off-by: Marc Olson > --

Re: [Qemu-block] [Qemu-devel] [PATCH v3 2/3] blkdebug: Extend rule check for additional types

2018-11-13 Thread Marc Olson
On 11/13/18 3:22 PM, John Snow wrote: On 11/12/18 2:06 AM, Marc Olson via Qemu-devel wrote: Break out the more common parts of the BlkdebugRule struct, and make rule_check() more explicit about operating only on error injection types so that additional rule types can be added in the future. Si

Re: [Qemu-block] [Qemu-devel] [PATCH v3 2/3] blkdebug: Extend rule check for additional types

2018-11-13 Thread John Snow
On 11/13/18 6:34 PM, Marc Olson wrote: > On 11/13/18 3:22 PM, John Snow wrote: >> >> On 11/12/18 2:06 AM, Marc Olson via Qemu-devel wrote: >>> Break out the more common parts of the BlkdebugRule struct, and make >>> rule_check() more explicit about operating only on error injection types >>> so

Re: [Qemu-block] [Qemu-devel] [PATCH v3 3/3] blkdebug: Add latency injection rule type

2018-11-13 Thread John Snow
On 11/12/18 2:06 AM, Marc Olson via Qemu-devel wrote: > Add a new rule type for blkdebug that instead of returning an error, can > inject latency to an IO. > > Signed-off-by: Marc Olson > --- > block/blkdebug.c | 79 > +++--- > docs/devel/blk

Re: [Qemu-block] [PATCH] nvme: fix oob access issue(CVE-2018-16847)

2018-11-13 Thread Li Qiang
Paolo Bonzini 于2018年11月14日周三 上午2:27写道: > On 13/11/2018 11:17, Kevin Wolf wrote: > > Am 13.11.2018 um 02:45 hat Li Qiang geschrieben: > >> Ping what't the status of this patch. > >> > >> I see Kevin's new pr doesn't contain this patch. > > > > Oh, I thought you said that you wanted to fix this

Re: [Qemu-block] [for 3.1? PATCH] qcow2: Assert that refcount block offsets fit in the refcount table

2018-11-13 Thread Alberto Garcia
On Tue 13 Nov 2018 06:06:54 PM CET, Eric Blake wrote: >> Refcount table entries have a field to store the offset of the >> refcount block. The rest of the bits of the entry are currently >> reserved. >> >> The offset is always taken from the entry using REFT_OFFSET_MASK to >> ensure that we only