On Fri 16 Nov 2018 05:45:24 PM CET, Max Reitz wrote:
> bdrv_reopen_multiple() does not invoke bdrv_reopen_abort() for the
> element of the reopen queue for which bdrv_reopen_prepare() failed,
> because it assumes that the prepare function will have rolled back all
> changes already.
>
> However, bd
On Fri 16 Nov 2018 05:45:26 PM CET, Max Reitz wrote:
> Signed-off-by: Max Reitz
Reviewed-by: Alberto Garcia
Berto
On Fri 16 Nov 2018 05:45:25 PM CET, Max Reitz wrote:
> s->locked_shared_perm is the set of bits locked in the file, which is
> the inverse of the permissions actually shared. So we need to pass them
> as they are to raw_apply_lock_bytes() instead of inverting them again.
>
> Reported-by: Alberto
create_opts was leaked here. This is not too bad since the process is
about to exit anyway, but relying on that does not make the code nicer
to read.
Fixes: d402b6a21a825a5c07aac9251990860723d49f5d
Reported-by: Kevin Wolf
Cc: qemu-sta...@nongnu.org
Signed-off-by: Max Reitz
---
qemu-img.c | 1 +
Fixes: d402b6a21a825a5c07aac9251990860723d49f5d
Reported-by: Kevin Wolf
Cc: qemu-sta...@nongnu.org
Signed-off-by: Max Reitz
---
qemu-img.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/qemu-img.c b/qemu-img.c
index 13a6ca31b4..a9a2470e1a 100644
--- a/qemu-img.c
+++ b/qemu-i
One of the amend error paths has two issues that are fixed by this
series. Since they are relatively minor and have been present in 3.0
already, I think there is no need to get them into 3.1. OTOH they are
bug fixes, so they could go into 3.1 if you, dear reader, insist.
Max Reitz (2):
qemu-i
On Fri, Nov 16, 2018 at 03:43:16PM -0600, Eric Blake wrote:
> On 11/16/18 3:41 PM, Eric Blake wrote:
>
> > > +#!/bin/bash
> >
> > I know we're using bash,
> >
> > > +
> > > +function nbd_server_stop()
> > > +{
> >
> > > +function nbd_server_wait_for_unix_socket()
> >
> > and bash supports 'fun
On Fri, Nov 16, 2018 at 10:24:54AM -0600, Eric Blake wrote:
> On 11/16/18 9:53 AM, Daniel P. Berrangé wrote:
> > If the qemu-nbd UNIX socket has not shown up, the tests will sleep a bit
> > and then check again repeatedly for upto 30 seconds. This is pointless
>
> s/upto/up to/
>
> > if the qemu-
On Fri, Nov 16, 2018 at 10:39:03AM -0600, Eric Blake wrote:
> On 11/16/18 9:53 AM, Daniel P. Berrangé wrote:
> > Add helpers to common.tls for creating TLS certificates for a CA,
> > server and client.
>
> MUCH appreciated! We NEED this coverage, easily automated.
>
> >
> > Signed-off-by: Danie
On Sat, Nov 17, 2018 at 08:19:10PM -0600, Eric Blake wrote:
> On 11/16/18 9:53 AM, Daniel P. Berrangé wrote:
> > When sending a NBD_CMD_DISC message there is no reply expected,
> > however, the nbd_read_eof() coroutine is still waiting for a reply.
> > In a plain NBD connection this doesn't matter
On Sat, Nov 17, 2018 at 09:01:57PM -0600, Eric Blake wrote:
> On 11/16/18 9:53 AM, Daniel P. Berrangé wrote:
> > The helpers for starting/stopping qemu-nbd in 058 will be useful in
> > other test cases, so move them into a common.nbd file.
> >
> > Signed-off-by: Daniel P. Berrangé
> > ---
>
> >
On Fri, Nov 16, 2018 at 11:20:26AM -0600, Eric Blake wrote:
> On 11/16/18 9:53 AM, Daniel P. Berrangé wrote:
> > Add tests that validate it is possible to connect to an NBD server
> > running TLS mode. Also test mis-matched TLS vs non-TLS connections
> > correctly fail.
> > ---
> > tests/qemu-iot
On Sat, Nov 17, 2018 at 03:31:34PM -0600, Eric Blake wrote:
> On 11/16/18 11:20 AM, Eric Blake wrote:
> > On 11/16/18 9:53 AM, Daniel P. Berrangé wrote:
> > > Add tests that validate it is possible to connect to an NBD server
> > > running TLS mode. Also test mis-matched TLS vs non-TLS connections
On Sat, Nov 17, 2018 at 02:49:22PM -0600, Eric Blake wrote:
> On 11/16/18 9:53 AM, Daniel P. Berrangé wrote:
> > Add tests that validate it is possible to connect to an NBD server
> > running TLS mode. Also test mis-matched TLS vs non-TLS connections
> > correctly fail.
> > ---
>
> Missing your Si
On Sat, Nov 17, 2018 at 04:32:21PM -0600, Eric Blake wrote:
> Commit 37ec36f6 intentionally ignores errors when trying to reply
> to an NBD_OPT_ABORT request for plaintext clients, but did not make
> the same change for a TLS server. Since NBD_OPT_ABORT is
> documented as being a potential for an
On Sat, Nov 17, 2018 at 08:24:03PM -0600, Eric Blake wrote:
> Enhance test 233 to also perform I/O beyond the initial handshake.
>
> Signed-off-by: Eric Blake
> ---
>
> Depends on my tweak to 2/6 to suppress an EIO error message
> on a failed read after NBD_CMD_DISC.
>
> tests/qemu-iotests/233
On Fri, Nov 16, 2018 at 03:50:02PM -0600, Eric Blake wrote:
> Bash allows functions to be declared with or without the leading
> keyword 'function'; but including the keyword does not comply with
> POSIX syntax, and is confusing to ksh users where the use of the
> keyword changes the scoping rules
On 19.11.18 11:27, Daniel P. Berrangé wrote:
> On Fri, Nov 16, 2018 at 10:39:03AM -0600, Eric Blake wrote:
>> On 11/16/18 9:53 AM, Daniel P. Berrangé wrote:
>>> Add helpers to common.tls for creating TLS certificates for a CA,
>>> server and client.
>>
>> MUCH appreciated! We NEED this coverage, e
On 16/11/18 22:50, Eric Blake wrote:
Bash allows functions to be declared with or without the leading
keyword 'function'; but including the keyword does not comply with
POSIX syntax, and is confusing to ksh users where the use of the
keyword changes the scoping rules for functions. Stick to the
16.11.2018 17:29, Stefan Hajnoczi wrote:
> On Tue, Oct 16, 2018 at 04:20:18PM +0300, Vladimir Sementsov-Ogievskiy wrote:
>> Theoretically possible that we finish the skipping loop with bs = NULL
>> and the following code will crash trying to dereference it. Fix that.
>>
>> Signed-off-by: Vladimir S
Am 18.11.2018 um 13:32 hat Mark Cave-Ayland geschrieben:
> On 13/11/2018 20:29, John Snow wrote:
>
> > 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 Is
Am 17.11.2018 um 21:59 hat Nir Soffer geschrieben:
> On Fri, Nov 16, 2018 at 5:26 PM Kevin Wolf wrote:
>
> > Am 15.11.2018 um 23:27 hat Nir Soffer geschrieben:
> > > On Sun, Nov 11, 2018 at 6:11 PM Nir Soffer wrote:
> > >
> > > > On Wed, Nov 7, 2018 at 7:55 PM Nir Soffer wrote:
> > > >
> > > >>
The SysBusDeviceClass::init() interface is considered
as a legacy interface and there are currently some
efforts going on to get rid of it. Thus convert
SysBusDeviceClass::init to DeviceClass::realize.
Cc: alistair.fran...@wdc.com
Cc: anthony.per...@citrix.com
Cc: arm...@redhat.com
Cc: borntrae..
Use DeviceClass rather than SysBusDeviceClass in
onenand_class_init().
Cc: kw...@redhat.com
Cc: mre...@redhat.com
Cc: qemu-block@nongnu.org
Signed-off-by: Mao Zhongyi
Signed-off-by: Zhang Shengju
---
hw/block/onenand.c | 19 ---
1 file changed, 8 insertions(+), 11 deletions(-)
On Mon, 19 Nov 2018 20:07:58 +0800
Mao Zhongyi wrote:
> The SysBusDeviceClass::init() interface is considered
> as a legacy interface and there are currently some
> efforts going on to get rid of it. Thus convert
> SysBusDeviceClass::init to DeviceClass::realize.
In case my comment to the s390
Am 16.11.2018 um 17:45 hat Max Reitz geschrieben:
> These are fixes for issues I found when looking after something Berto
> has reported. The second patch fixes that issue Berto found, the first
> one is only kind of related.
>
> For the first patch: bdrv_reopen_abort() or bdrv_reopen_commit() a
On Sat, Nov 17, 2018 at 08:19:10PM -0600, Eric Blake wrote:
> On 11/16/18 9:53 AM, Daniel P. Berrangé wrote:
> > When sending a NBD_CMD_DISC message there is no reply expected,
> > however, the nbd_read_eof() coroutine is still waiting for a reply.
> > In a plain NBD connection this doesn't matter
On 11/19/18 4:23 AM, Daniel P. Berrangé wrote:
Simply setting the 'quit' flag after sending NBD_CMD_DISC is enough to
get the coroutine to stop waiting for a reply and thus supress the error
message.
Actually, it's not quite enough - once you actually start performing I/O,
enough coroutines ar
On 11/19/18 5:04 AM, Max Reitz wrote:
+tls_dir="${TEST_DIR}/tls"
+
+function tls_x509_cleanup()
+{
+rm -f ${tls_dir}/*.pem
+rm -f ${tls_dir}/*/*.pem
+rmdir ${tls_dir}/*
+rmdir ${tls_dir}
Why not just:
rm -rf $tls_dir
Yeah, I guess we could do that for simplicity
Also, the q
Don't leak 'cluster' in the mapping == NULL case. Found by Coverity
(CID 1055918).
Fixes: 8d9401c2791ee2d2805b741b1ee3006041edcd3e
Signed-off-by: Kevin Wolf
Reviewed-by: Philippe Mathieu-Daudé
Reviewed-by: Liam Merwick
Tested-by: Philippe Mathieu-Daudé
---
block/vvfat.c | 6 +++---
1 file cha
From: Mark Cave-Ayland
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->dma_chann has not been configured then the fdctrl->dma interface
reference isn't initialised duri
The following changes since commit 9436e082de18b2fb2ceed2e9d1beef641ae64f23:
MAINTAINERS: clarify some of the tags (2018-11-19 11:19:23 +)
are available in the Git repository at:
git://repo.or.cz/qemu/kevin.git tags/for-upstream
for you to fetch changes up to 6d0a4a0fb5c8f10c8eb68b52cfd
From: Li Qiang
Currently, the nvme_cmb_ops mr doesn't check the addr and size.
This can lead an oob access issue. This is triggerable in the guest.
Add check to avoid this issue.
Fixes CVE-2018-16847.
Reported-by: Li Qiang
Reviewed-by: Paolo Bonzini
Signed-off-by: Li Qiang
Signed-off-by: Kev
From: 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 (some are inherent, others are
implementation choices of qemu), and how choice of cluster size
can influence some of th
From: 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
From: Max Reitz
bdrv_reopen_multiple() does not invoke bdrv_reopen_abort() for the
element of the reopen queue for which bdrv_reopen_prepare() failed,
because it assumes that the prepare function will have rolled back all
changes already.
However, bdrv_reopen_prepare() does not do this in every
From: Max Reitz
s->locked_shared_perm is the set of bits locked in the file, which is
the inverse of the permissions actually shared. So we need to pass them
as they are to raw_apply_lock_bytes() instead of inverting them again.
Reported-by: Alberto Garcia
Signed-off-by: Max Reitz
Reviewed-by
From: Max Reitz
Signed-off-by: Max Reitz
Reviewed-by: Alberto Garcia
Signed-off-by: Kevin Wolf
---
tests/qemu-iotests/182 | 71 ++
tests/qemu-iotests/182.out | 9 +
2 files changed, 80 insertions(+)
diff --git a/tests/qemu-iotests/182 b/tests/qemu
From: 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
On Mon, Nov 19, 2018 at 08:27:56AM -0600, Eric Blake wrote:
> On 11/19/18 5:04 AM, Max Reitz wrote:
>
> > > > > +tls_dir="${TEST_DIR}/tls"
> > > > > +
> > > > > +function tls_x509_cleanup()
> > > > > +{
> > > > > +rm -f ${tls_dir}/*.pem
> > > > > +rm -f ${tls_dir}/*/*.pem
> > > > > +rm
On 19 November 2018 at 14:29, Kevin Wolf wrote:
> The following changes since commit 9436e082de18b2fb2ceed2e9d1beef641ae64f23:
>
> MAINTAINERS: clarify some of the tags (2018-11-19 11:19:23 +)
>
> are available in the Git repository at:
>
> git://repo.or.cz/qemu/kevin.git tags/for-upstream
For CVE-2018-16847, I just noticed Kevin pulled in Li's previous fix (as
opposed to this one). Was this done in error?
Thanks,
-Mark
On 11/16/2018 3:31 AM, Paolo Bonzini wrote:
Because the CMB BAR has a min_access_size of 2, if you read the last
byte it will try to memcpy *2* bytes from n->cm
On Fri 16 Nov 2018 04:18:34 PM CET, Kevin Wolf wrote:
> Am 16.11.2018 um 16:03 hat Alberto Garcia geschrieben:
>> > I don't think anything needs a way to generally block graph changes
>> > around some node. We only need to prevent changes to very specific
>> > sets of edges. This is something tha
On 11/16/18 9:53 AM, Daniel P. Berrangé wrote:
Add tests that validate it is possible to connect to an NBD server
running TLS mode. Also test mis-matched TLS vs non-TLS connections
correctly fail.
---
+++ b/tests/qemu-iotests/common.nbd
+function nbd_server_wait_for_tcp_socket()
+{
+
On 11/19/18 4:37 AM, Daniel P. Berrangé wrote:
Actually, I tracked this message down to using socat (which actually
connects and then abruptly exits) when probing whether the socket is up and
listening. That is, the message is being produced as a side effect of
nbd_server_wait_for_tcp_socket ra
On 19/11/18 16:23, Mark Kanda wrote:
> For CVE-2018-16847, I just noticed Kevin pulled in Li's previous fix (as
> opposed to this one). Was this done in error?
Probably. Kevin, can you revert and apply this one instead? I don't
care if 3.1 or 3.2, but the previous fix is pointless complication.
On 11/19/18 4:40 AM, Daniel P. Berrangé wrote:
On Sat, Nov 17, 2018 at 08:24:03PM -0600, Eric Blake wrote:
Enhance test 233 to also perform I/O beyond the initial handshake.
Signed-off-by: Eric Blake
---
Depends on my tweak to 2/6 to suppress an EIO error message
on a failed read after NBD_CM
Testing granularity at the same size as the cluster isn't quite
as fun as what happens when it is larger or smaller. This
enhancement also shows that qemu's nbd server can server the
same disk over multiple exports simultaneously.
Signed-off-by: Eric Blake
---
Just a testsuite enhancement, so s
On 11/19/18 11:29 AM, Eric Blake wrote:
Testing granularity at the same size as the cluster isn't quite
as fun as what happens when it is larger or smaller. This
enhancement also shows that qemu's nbd server can server the
s/server/serve/
same disk over multiple exports simultaneously.
Sign
Am 19.11.2018 um 18:09 hat Paolo Bonzini geschrieben:
> On 19/11/18 16:23, Mark Kanda wrote:
> > For CVE-2018-16847, I just noticed Kevin pulled in Li's previous fix (as
> > opposed to this one). Was this done in error?
>
> Probably. Kevin, can you revert and apply this one instead? I don't
> ca
From: Mao Zhongyi
POSIX requires $PWD to be reliable, and we expect all
shells used by qemu scripts to be relatively close to
POSIX. Thus, it is smarter to avoid forking the pwd
executable for something that is already available in
the environment.
So replace it with the following:
sed -i 's/\
From: Daniel P. Berrangé
A space was missing after the option number was printed:
Option 0x8not permitted before TLS
becomes
Option 0x8 not permitted before TLS
This fixes
commit 3668328303429f3bc93ab3365c66331600b06a2d
Author: Eric Blake
Date: Fri Oct 14 13:33:09 2016 -0500
From: Mao Zhongyi
Various shell files contain a mix between obsolete ``
and modern $(); It would be nice to convert to using
$() everywhere. For now, just do the qemu-iotests directory.
Cc: kw...@redhat.com
Cc: mre...@redhat.com
Cc: ebl...@redhat.com
Suggested-by: Eric Blake
Signed-off-by: Mao
Commit 37ec36f6 intentionally ignores errors when trying to reply
to an NBD_OPT_ABORT request for plaintext clients, but did not make
the same change for a TLS server. Since NBD_OPT_ABORT is
documented as being a potential for an EPIPE when the client hangs
up without waiting for our reply, we don
From: Daniel P. Berrangé
The helpers for starting/stopping qemu-nbd in 058 will be useful in
other test cases, so move them into a common.nbd file.
Signed-off-by: Daniel P. Berrangé
Message-Id: <20181116155325.22428-4-berra...@redhat.com>
Reviewed-by: Eric Blake
[eblake: fix shell quoting]
Sig
From: Daniel P. Berrangé
If the qemu-nbd UNIX socket has not shown up, the tests will sleep a bit
and then check again repeatedly for up to 30 seconds. This is pointless
if the qemu-nbd process has quit due to an error, so check whether the
pid is still alive before waiting and retrying.
Signed-
From: Mao Zhongyi
Running
git grep '\$here' tests/qemu-iotests
has 0 hits, which means we are setting a variable that has
no use. It appears that commit e8f8624d removed the last
use. So execute the following cmd to remove all of
the 'here=...' lines as dead code.
sed -i '/^here=/d' $(git gre
From: Daniel P. Berrangé
Add tests that validate it is possible to connect to an NBD server
running TLS mode. Also test mis-matched TLS vs non-TLS connections
correctly fail.
Signed-off-by: Daniel P. Berrangé
Message-Id: <20181116155325.22428-7-berra...@redhat.com>
Reviewed-by: Eric Blake
Test
From: Daniel P. Berrangé
Add helpers to common.tls for creating TLS certificates for a CA,
server and client.
Signed-off-by: Daniel P. Berrangé
Message-Id: <20181116155325.22428-6-berra...@redhat.com>
Reviewed-by: Eric Blake
[eblake: spelling and quoting touchups]
Signed-off-by: Eric Blake
--
Enhance test 233 to also perform I/O beyond the initial handshake.
Signed-off-by: Eric Blake
Message-Id: <20181118022403.2211483-1-ebl...@redhat.com>
Reviewed-by: Daniel P. Berrangé
---
tests/qemu-iotests/233 | 12 +++-
tests/qemu-iotests/233.out | 10 ++
2 files changed, 21
Bash allows functions to be declared with or without the leading
keyword 'function'; but including the keyword does not comply with
POSIX syntax, and is confusing to ksh users where the use of the
keyword changes the scoping rules for functions. Stick to the
POSIX form through iotests.
Done mecha
61 matches
Mail list logo