[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v7 18/20] fuzz: add virtio-net fuzz target
From: |
Stefan Hajnoczi |
Subject: |
Re: [PATCH v7 18/20] fuzz: add virtio-net fuzz target |
Date: |
Tue, 21 Jan 2020 16:42:55 +0000 |
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 <address@hidden>
> + *
> + * 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];
signature.asc
Description: PGP signature
- [PATCH v7 11/20] fuzz: add fuzzer skeleton, (continued)
- [PATCH v7 11/20] fuzz: add fuzzer skeleton, Bulekov, Alexander, 2020/01/20
- [PATCH v7 12/20] exec: keep ram block across fork when using qtest, Bulekov, Alexander, 2020/01/20
- [PATCH v7 13/20] fuzz: support for fork-based fuzzing., Bulekov, Alexander, 2020/01/20
- [PATCH v7 14/20] fuzz: add support for qos-assisted fuzz targets, Bulekov, Alexander, 2020/01/20
- [PATCH v7 15/20] fuzz: add target/fuzz makefile rules, Bulekov, Alexander, 2020/01/20
- [PATCH v7 17/20] fuzz: add documentation to docs/devel/, Bulekov, Alexander, 2020/01/20
- [PATCH v7 16/20] fuzz: add configure flag --enable-fuzzing, Bulekov, Alexander, 2020/01/20
- [PATCH v7 18/20] fuzz: add virtio-net fuzz target, Bulekov, Alexander, 2020/01/20
- Re: [PATCH v7 18/20] fuzz: add virtio-net fuzz target,
Stefan Hajnoczi <=
- [PATCH v7 17/20] fuzz: add i440fx fuzz targets, Bulekov, Alexander, 2020/01/20
- [PATCH v7 18/20] fuzz: add i440fx fuzz targets, Bulekov, Alexander, 2020/01/20
- [PATCH v7 19/20] fuzz: add virtio-scsi fuzz target, Bulekov, Alexander, 2020/01/20
- [PATCH v7 19/20] fuzz: add virtio-net fuzz target, Bulekov, Alexander, 2020/01/20
- [PATCH v7 20/20] fuzz: add documentation to docs/devel/, Bulekov, Alexander, 2020/01/20
- [PATCH v7 20/20] fuzz: add virtio-scsi fuzz target, Bulekov, Alexander, 2020/01/20
- Re: [PATCH v7 00/20] Add virtual device fuzzing support, Stefan Hajnoczi, 2020/01/21