qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: "Bulekov, Alexander" <alxndr@bu.edu>
Cc: Thomas Huth <thuth@redhat.com>,
	"pbonzini@redhat.com" <pbonzini@redhat.com>,
	"bsd@redhat.com" <bsd@redhat.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	Laurent Vivier <lvivier@redhat.com>
Subject: Re: [PATCH v7 18/20] fuzz: add virtio-net fuzz target
Date: Tue, 21 Jan 2020 16:42:55 +0000	[thread overview]
Message-ID: <20200121164255.GH641751@stefanha-x1.localdomain> (raw)
In-Reply-To: <20200120055410.22322-26-alxndr@bu.edu>

[-- Attachment #1: Type: text/plain, Size: 1182 bytes --]

On Mon, Jan 20, 2020 at 05:55:08AM +0000, Bulekov, Alexander wrote:
> diff --git a/tests/qtest/fuzz/virtio_net_fuzz.c b/tests/qtest/fuzz/virtio_net_fuzz.c
> new file mode 100644
> index 0000000000..3b1b79fd93
> --- /dev/null
> +++ b/tests/qtest/fuzz/virtio_net_fuzz.c
> @@ -0,0 +1,190 @@
> +/*
> + * virtio-net Fuzzing Target
> + *
> + * Copyright Red Hat Inc., 2019
> + *
> + * Authors:
> + *  Alexander Bulekov   <alxndr@bu.edu>
> + *
> + * This work is licensed under the terms of the GNU GPL, version 2 or later.
> + * See the COPYING file in the top-level directory.
> + */
> +
> +#include "qemu/osdep.h"
> +
> +#include "tests/qtest/libqtest.h"
> +#include "tests/qtest/libqos/virtio-net.h"
> +#include "fuzz.h"
> +#include "fork_fuzz.h"
> +#include "qos_fuzz.h"
> +
> +#define QVIRTIO_NET_TIMEOUT_US (30 * 1000 * 1000)
> +#define QVIRTIO_RX_VQ 0
> +#define QVIRTIO_TX_VQ 1
> +#define QVIRTIO_CTRL_VQ 2
> +
> +#define VIRTIO_CONFIG_S_NEEDS_RESET 0x40

Please use #include "standard-headers/linux/virtio_config.h" instead of
duplicating this constant.

> +
> +static int *sv;

Please make this easier to understand:

  /* The -netdev socketpair fds */
  static int sockfds[2];

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2020-01-21 16:44 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-20  5:54 [PATCH v7 00/20] Add virtual device fuzzing support Bulekov, Alexander
2020-01-20  5:54 ` [PATCH v7 01/20] softmmu: split off vl.c:main() into main.c Bulekov, Alexander
2020-01-21 16:26   ` Stefan Hajnoczi
2020-01-20  5:54 ` [PATCH v7 02/20] libqos: rename i2c_send and i2c_recv Bulekov, Alexander
2020-01-20  5:54 ` [PATCH v7 02/20] module: check module wasn't already initialized Bulekov, Alexander
2020-01-20  5:54 ` [PATCH v7 03/20] fuzz: add FUZZ_TARGET module type Bulekov, Alexander
2020-01-20  5:54 ` [PATCH v7 05/20] libqtest: add a layer of abstraction to send/recv Bulekov, Alexander
2020-01-20  5:54 ` [PATCH v7 04/20] qtest: add qtest_server_send abstraction Bulekov, Alexander
2020-01-20  5:54 ` [PATCH v7 06/20] libqtest: make bufwrite rely on the TransportOps Bulekov, Alexander
2020-01-20  5:54 ` [PATCH v7 06/20] module: check module wasn't already initialized Bulekov, Alexander
2020-01-20  5:54 ` [PATCH v7 07/20] qtest: add in-process incoming command handler Bulekov, Alexander
2020-01-20  5:54 ` [PATCH v7 08/20] libqos: rename i2c_send and i2c_recv Bulekov, Alexander
2020-01-20  5:54 ` [PATCH v7 08/20] libqos: split qos-test and libqos makefile vars Bulekov, Alexander
2020-01-20  5:54 ` [PATCH v7 09/20] libqos: move useful qos-test funcs to qos_external Bulekov, Alexander
2020-01-20  5:54 ` [PATCH v7 09/20] libqos: split qos-test and libqos makefile vars Bulekov, Alexander
2020-01-20  5:54 ` [PATCH v7 10/20] libqos: move useful qos-test funcs to qos_external Bulekov, Alexander
2020-01-20  5:54 ` [PATCH v7 10/20] libqtest: make bufwrite rely on the TransportOps Bulekov, Alexander
2020-01-20  5:54 ` [PATCH v7 11/20] fuzz: add fuzzer skeleton Bulekov, Alexander
2020-01-20  5:54 ` [PATCH v7 12/20] exec: keep ram block across fork when using qtest Bulekov, Alexander
2020-01-21 16:29   ` Stefan Hajnoczi
2020-01-20  5:55 ` [PATCH v7 13/20] fuzz: support for fork-based fuzzing Bulekov, Alexander
2020-01-20  5:55 ` [PATCH v7 14/20] fuzz: add support for qos-assisted fuzz targets Bulekov, Alexander
2020-01-20  5:55 ` [PATCH v7 15/20] fuzz: add target/fuzz makefile rules Bulekov, Alexander
2020-01-20  5:55 ` [PATCH v7 16/20] fuzz: add configure flag --enable-fuzzing Bulekov, Alexander
2020-01-20 17:22   ` Alexander Bulekov
2020-01-20  5:55 ` [PATCH v7 17/20] fuzz: add documentation to docs/devel/ Bulekov, Alexander
2020-01-20  5:55 ` [PATCH v7 17/20] fuzz: add i440fx fuzz targets Bulekov, Alexander
2020-01-20  5:55 ` [PATCH v7 18/20] " Bulekov, Alexander
2020-01-20  5:55 ` [PATCH v7 18/20] fuzz: add virtio-net fuzz target Bulekov, Alexander
2020-01-21 16:42   ` Stefan Hajnoczi [this message]
2020-01-20  5:55 ` [PATCH v7 19/20] " Bulekov, Alexander
2020-01-20  5:55 ` [PATCH v7 19/20] fuzz: add virtio-scsi " Bulekov, Alexander
2020-01-20  5:55 ` [PATCH v7 20/20] fuzz: add documentation to docs/devel/ Bulekov, Alexander
2020-01-20  5:55 ` [PATCH v7 20/20] fuzz: add virtio-scsi fuzz target Bulekov, Alexander
2020-01-21 16:44 ` [PATCH v7 00/20] Add virtual device fuzzing support Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200121164255.GH641751@stefanha-x1.localdomain \
    --to=stefanha@redhat.com \
    --cc=alxndr@bu.edu \
    --cc=bsd@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).