[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 17/22] fuzz: add support for fork-based fuzzi
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH v3 17/22] fuzz: add support for fork-based fuzzing. |
Date: |
Fri, 20 Sep 2019 10:33:09 +0100 |
User-agent: |
Mutt/1.12.1 (2019-06-15) |
On Thu, Sep 19, 2019 at 02:01:53PM +0000, Oleinik, Alexander wrote:
> On Thu, 2019-09-19 at 13:54 +0100, Stefan Hajnoczi wrote:
> > On Wed, Sep 18, 2019 at 11:19:44PM +0000, Oleinik, Alexander wrote:
> > > diff --git a/exec.c b/exec.c
> > > index 235d6bc883..d3838f4ea4 100644
> > > --- a/exec.c
> > > +++ b/exec.c
> > > @@ -2295,7 +2295,9 @@ static void ram_block_add(RAMBlock
> > > *new_block, Error **errp, bool shared)
> > > qemu_ram_setup_dump(new_block->host, new_block-
> > > >max_length);
> > > qemu_madvise(new_block->host, new_block->max_length,
> > > QEMU_MADV_HUGEPAGE);
> > > /* MADV_DONTFORK is also needed by KVM in absence of
> > > synchronous MMU */
> > > +#ifndef CONFIG_FUZZ /* This conflicts with fork-based fuzzing */
> > > qemu_madvise(new_block->host, new_block->max_length,
> > > QEMU_MADV_DONTFORK);
> > > +#endif
> > > ram_block_notify_add(new_block->host, new_block-
> > > >max_length);
> > > }
> > > }
> >
> > I didn't check Makefile changes but regular softmmu binaries should
> > continue to work with --enable-fuzzing so we cannot use #ifdef here.
> > Perhaps this should be a runtime check similar to qtest_enabled()
>
> Yes - I'll add a runtime check. The makefile requires a make clean
> between softmmu and fuzzer builds, since the ".o"s for the fuzzer build
> are compiled with fsanitize=fuzzer(must be linked against libfuzzer).
> I can see that the #ifndef CONFIG_FUZZ is a proper softmmu builds with
> --enable-fuzzer are currently broken due to the ifndef CONFIG_FUZZ
> check.
In that case the fuzzer is a whole different make target and shouldn't
share .o files with *-softmmu/ build directories.
Stefan
signature.asc
Description: PGP signature
- Re: [Qemu-devel] [PATCH v3 14/22] libqtest: add in-process qtest.c tx/rx handlers, (continued)
- [Qemu-devel] [PATCH v3 12/22] libqos: move useful qos-test funcs to qos_external, Oleinik, Alexander, 2019/09/18
- [Qemu-devel] [PATCH v3 15/22] fuzz: Add target/fuzz makefile rules, Oleinik, Alexander, 2019/09/18
- [Qemu-devel] [PATCH v3 18/22] fuzz: expose fuzz target name, Oleinik, Alexander, 2019/09/18
- [Qemu-devel] [PATCH v3 17/22] fuzz: add support for fork-based fuzzing., Oleinik, Alexander, 2019/09/18
- Re: [PATCH v3 17/22] fuzz: add support for fork-based fuzzing., Alexander Oleinik, 2019/09/30
- [Qemu-devel] [PATCH v3 16/22] fuzz: add fuzzer skeleton, Oleinik, Alexander, 2019/09/18
- Re: [Qemu-devel] [PATCH v3 16/22] fuzz: add fuzzer skeleton, Darren Kenny, 2019/09/23
[Qemu-devel] [PATCH v3 20/22] fuzz: add i440fx fuzz targets, Oleinik, Alexander, 2019/09/18
[Qemu-devel] [PATCH v3 19/22] fuzz: add support for qos-assisted fuzz targets, Oleinik, Alexander, 2019/09/18
[Qemu-devel] [PATCH v3 21/22] fuzz: add virtio-net fuzz target, Oleinik, Alexander, 2019/09/18