[PATCH 0/4] fuzz: misc changes for oss-fuzz compatability

Alexander Bulekov posted 4 patches 5 years, 6 months ago
Test docker-mingw@fedora passed
Test checkpatch passed
Test asan passed
Test docker-quick@centos7 passed
Test FreeBSD passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20200512030133.29896-1-alxndr@bu.edu
Maintainers: Bandan Das <bsd@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Laurent Vivier <lvivier@redhat.com>, Stefan Hajnoczi <stefanha@redhat.com>, Alexander Bulekov <alxndr@bu.edu>, Thomas Huth <thuth@redhat.com>
include/sysemu/sysemu.h             |  2 ++
softmmu/vl.c                        |  2 +-
tests/qtest/fuzz/fork_fuzz.ld       |  5 +++++
tests/qtest/fuzz/fuzz.c             | 15 +++++++++++++++
tests/qtest/fuzz/i440fx_fuzz.c      |  3 ++-
tests/qtest/fuzz/virtio_net_fuzz.c  |  2 ++
tests/qtest/fuzz/virtio_scsi_fuzz.c |  2 ++
7 files changed, 29 insertions(+), 2 deletions(-)
[PATCH 0/4] fuzz: misc changes for oss-fuzz compatability
Posted by Alexander Bulekov 5 years, 6 months ago
Hello,
With these patches, the fuzzer passes the oss-fuzz build checks.
There are also some miscelanous improvement to the fuzzer, in general:
 * If building for oss-fuzz, check executable_dir/pc-bios for
   the bios images
 * Fix a typo in the i440fx-qtest-reboot argument which resulted in an
   invalid argument to qemu_main
 * Add an alternate name to resolve libfuzzer's internal fuzzer::TPC
   object at link-time
 * For all fork-based fuzzers, run the main-loop in the parent, to
   prevent the clock from running far-ahead of the previous main-loop.
-Alex

Alexander Bulekov (4):
  fuzz: add datadir for oss-fuzz compatability
  fuzz: fix typo in i440fx-qtest-reboot arguments
  fuzz: add mangled object name to linker script
  fuzz: run the main-loop in fork-server process

 include/sysemu/sysemu.h             |  2 ++
 softmmu/vl.c                        |  2 +-
 tests/qtest/fuzz/fork_fuzz.ld       |  5 +++++
 tests/qtest/fuzz/fuzz.c             | 15 +++++++++++++++
 tests/qtest/fuzz/i440fx_fuzz.c      |  3 ++-
 tests/qtest/fuzz/virtio_net_fuzz.c  |  2 ++
 tests/qtest/fuzz/virtio_scsi_fuzz.c |  2 ++
 7 files changed, 29 insertions(+), 2 deletions(-)

-- 
2.26.2


Re: [PATCH 0/4] fuzz: misc changes for oss-fuzz compatability
Posted by Alexander Bulekov 5 years, 5 months ago
ping?

On 200511 2301, Alexander Bulekov wrote:
> Hello,
> With these patches, the fuzzer passes the oss-fuzz build checks.
> There are also some miscelanous improvement to the fuzzer, in general:
>  * If building for oss-fuzz, check executable_dir/pc-bios for
>    the bios images
>  * Fix a typo in the i440fx-qtest-reboot argument which resulted in an
>    invalid argument to qemu_main
>  * Add an alternate name to resolve libfuzzer's internal fuzzer::TPC
>    object at link-time
>  * For all fork-based fuzzers, run the main-loop in the parent, to
>    prevent the clock from running far-ahead of the previous main-loop.
> -Alex
> 
> Alexander Bulekov (4):
>   fuzz: add datadir for oss-fuzz compatability
>   fuzz: fix typo in i440fx-qtest-reboot arguments
>   fuzz: add mangled object name to linker script
>   fuzz: run the main-loop in fork-server process
> 
>  include/sysemu/sysemu.h             |  2 ++
>  softmmu/vl.c                        |  2 +-
>  tests/qtest/fuzz/fork_fuzz.ld       |  5 +++++
>  tests/qtest/fuzz/fuzz.c             | 15 +++++++++++++++
>  tests/qtest/fuzz/i440fx_fuzz.c      |  3 ++-
>  tests/qtest/fuzz/virtio_net_fuzz.c  |  2 ++
>  tests/qtest/fuzz/virtio_scsi_fuzz.c |  2 ++
>  7 files changed, 29 insertions(+), 2 deletions(-)
> 
> -- 
> 2.26.2
> 

Re: [PATCH 0/4] fuzz: misc changes for oss-fuzz compatability
Posted by Stefan Hajnoczi 5 years, 5 months ago
On Mon, May 11, 2020 at 11:01:29PM -0400, Alexander Bulekov wrote:
> Hello,
> With these patches, the fuzzer passes the oss-fuzz build checks.
> There are also some miscelanous improvement to the fuzzer, in general:
>  * If building for oss-fuzz, check executable_dir/pc-bios for
>    the bios images
>  * Fix a typo in the i440fx-qtest-reboot argument which resulted in an
>    invalid argument to qemu_main
>  * Add an alternate name to resolve libfuzzer's internal fuzzer::TPC
>    object at link-time
>  * For all fork-based fuzzers, run the main-loop in the parent, to
>    prevent the clock from running far-ahead of the previous main-loop.
> -Alex
> 
> Alexander Bulekov (4):
>   fuzz: add datadir for oss-fuzz compatability
>   fuzz: fix typo in i440fx-qtest-reboot arguments
>   fuzz: add mangled object name to linker script
>   fuzz: run the main-loop in fork-server process
> 
>  include/sysemu/sysemu.h             |  2 ++
>  softmmu/vl.c                        |  2 +-
>  tests/qtest/fuzz/fork_fuzz.ld       |  5 +++++
>  tests/qtest/fuzz/fuzz.c             | 15 +++++++++++++++
>  tests/qtest/fuzz/i440fx_fuzz.c      |  3 ++-
>  tests/qtest/fuzz/virtio_net_fuzz.c  |  2 ++
>  tests/qtest/fuzz/virtio_scsi_fuzz.c |  2 ++
>  7 files changed, 29 insertions(+), 2 deletions(-)
> 
> -- 
> 2.26.2
> 

Thanks, applied to my block tree:
https://github.com/stefanha/qemu/commits/block

Stefan