qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 9ab4fb: tests/migration: fix memleak in wait_


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 9ab4fb: tests/migration: fix memleak in wait_command/wait_...
Date: Mon, 26 Oct 2020 07:50:00 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 9ab4fb21f5b336138757912f68bae1bf450c23b5
      
https://github.com/qemu/qemu/commit/9ab4fb21f5b336138757912f68bae1bf450c23b5
  Author: Chen Qun <kuhn.chenqun@huawei.com>
  Date:   2020-10-24 (Sat, 24 Oct 2020)

  Changed paths:
    M tests/qtest/migration-helpers.c

  Log Message:
  -----------
  tests/migration: fix memleak in wait_command/wait_command_fd

Properly free each command resp to avoid memory leak.
ASAN shows memory leak stack:

Indirect leak of 2352520 byte(s) in 571 object(s) allocated from:
    #0 0x7f6ca3308d4e in __interceptor_calloc (/lib64/libasan.so.5+0x112d4e)
    #1 0x7f6ca3127a50 in g_malloc0 (/lib64/libglib-2.0.so.0+0x55a50)
    #2 0x557bf3c71d2b in qdict_new ../qobject/qdict.c:29
    #3 0x557bf3c9caba in parse_object ../qobject/json-parser.c:318
    #4 0x557bf3c9ce75 in json_parser_parse ../qobject/json-parser.c:580
    #5 0x557bf3c8c8cf in json_message_process_token 
../qobject/json-streamer.c:92
    #6 0x557bf3c9ea59 in json_lexer_feed_char ../qobject/json-lexer.c:313
    #7 0x557bf3c9eeb5 in json_lexer_feed ../qobject/json-lexer.c:350
    #8 0x557bf3c4793a in qmp_fd_receive ../tests/qtest/libqtest.c:608
    #9 0x557bf3c47b58 in qtest_qmp_receive ../tests/qtest/libqtest.c:618
    #10 0x557bf3c44245 in wait_command ../tests/qtest/migration-helpers.c:59
    #11 0x557bf3c445cb in migrate_query_status 
../tests/qtest/migration-helpers.c:108
    #12 0x557bf3c44642 in check_migration_status 
../tests/qtest/migration-helpers.c:124
    #13 0x557bf3c447e7 in wait_for_migration_status 
../tests/qtest/migration-helpers.c:148
    #14 0x557bf3c43b8f in test_migrate_auto_converge 
../tests/qtest/migration-test.c:1243
    ......

Fix: 5e34005571af5

Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
Message-Id: <20201023061218.2080844-2-kuhn.chenqun@huawei.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: b7f47e82e2d8ccf368d70fc4fd1467db55a74a32
      
https://github.com/qemu/qemu/commit/b7f47e82e2d8ccf368d70fc4fd1467db55a74a32
  Author: Thomas Huth <thuth@redhat.com>
  Date:   2020-10-24 (Sat, 24 Oct 2020)

  Changed paths:
    M tests/qtest/libqtest.c

  Log Message:
  -----------
  tests/qtest/libqtest: Fix detection of architecture for binaries without path

The qtests can be run directly by specifying the QEMU binary with the
QTEST_QEMU_BINARY environment variable, for example:

 $ QTEST_QEMU_BINARY=x86_64-softmmu/qemu-system-x86_64 tests/qtest/test-hmp

However, if you specify a binary without a path, for example with
QTEST_QEMU_BINARY=qemu-system-x86_64 if the QEMU binary is in your
$PATH, then the test currently simply crashes.

Let's try a little bit smarter here by looking for the final '-'
instead of the slash.

Message-Id: <20201012114816.43546-1-thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: a6b0882ca75b62b2c0840578f790ab65844b749e
      
https://github.com/qemu/qemu/commit/a6b0882ca75b62b2c0840578f790ab65844b749e
  Author: Jason Andryuk <jandryuk@gmail.com>
  Date:   2020-10-24 (Sat, 24 Oct 2020)

  Changed paths:
    M accel/qtest/qtest-cpus.c

  Log Message:
  -----------
  accel: Remove _WIN32 ifdef from qtest-cpus.c

dummy-cpus.c is only compiled with CONFIG_POSIX, so the _WIN32 condition
will never evaluate true.  Remove it.

Signed-off-by: Jason Andryuk <jandryuk@gmail.com>
Message-Id: <20201013140511.5681-2-jandryuk@gmail.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Claudio Fontana <cfontana@suse.de>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: 9ce84a0d17d015f059a6750fbbf4b057806751df
      
https://github.com/qemu/qemu/commit/9ce84a0d17d015f059a6750fbbf4b057806751df
  Author: Jason Andryuk <jandryuk@gmail.com>
  Date:   2020-10-24 (Sat, 24 Oct 2020)

  Changed paths:
    A accel/dummy-cpus.c
    M accel/meson.build
    M accel/qtest/meson.build
    R accel/qtest/qtest-cpus.c
    R accel/qtest/qtest-cpus.h
    M accel/qtest/qtest.c
    M include/sysemu/cpus.h

  Log Message:
  -----------
  accel: move qtest CpusAccel functions to a common location

Move and rename accel/qtest/qtest-cpus.c files to accel/dummy-cpus.c so
it can be re-used by Xen.

Signed-off-by: Jason Andryuk <jandryuk@gmail.com>
Message-Id: <20201013140511.5681-3-jandryuk@gmail.com>
Reviewed-by: Claudio Fontana <cfontana@suse.de>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: efd4d93b530807921b1940e13990c561530618d3
      
https://github.com/qemu/qemu/commit/efd4d93b530807921b1940e13990c561530618d3
  Author: Jason Andryuk <jandryuk@gmail.com>
  Date:   2020-10-24 (Sat, 24 Oct 2020)

  Changed paths:
    M accel/meson.build
    M accel/xen/xen-all.c

  Log Message:
  -----------
  accel: Add xen CpusAccel using dummy-cpus

Xen was broken by commit 1583a3898853 ("cpus: extract out qtest-specific
code to accel/qtest").  Xen relied on qemu_init_vcpu() calling
qemu_dummy_start_vcpu() in the default case, but that was replaced by
g_assert_not_reached().

Add a minimal "CpusAccel" for Xen using the dummy-cpus implementation
used by qtest.

Signed-off-by: Jason Andryuk <jandryuk@gmail.com>
Message-Id: <20201013140511.5681-4-jandryuk@gmail.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Claudio Fontana <cfontana@suse.de>
Acked-by: Anthony PERARD <anthony.perard@citrix.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: 288c31e30d522dbac4d7998ca254735393c59307
      
https://github.com/qemu/qemu/commit/288c31e30d522dbac4d7998ca254735393c59307
  Author: Havard Skinnemoen <hskinnemoen@google.com>
  Date:   2020-10-24 (Sat, 24 Oct 2020)

  Changed paths:
    M tests/qtest/meson.build

  Log Message:
  -----------
  tests/qtest: Make npcm7xx_timer-test conditional on CONFIG_NPCM7XX

This test won't work if qemu was compiled without CONFIG_NPCM7XX, as
pointed out by Thomas Huth on a different patch.

Signed-off-by: Havard Skinnemoen <hskinnemoen@google.com>
Message-Id: <20201023210637.351238-2-hskinnemoen@google.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: 7f9d519c0d37b8af0b228a4ed49d33ea095e9eb7
      
https://github.com/qemu/qemu/commit/7f9d519c0d37b8af0b228a4ed49d33ea095e9eb7
  Author: Maxim Levitsky <mlevitsk@redhat.com>
  Date:   2020-10-24 (Sat, 24 Oct 2020)

  Changed paths:
    M tests/qtest/libqtest.c

  Log Message:
  -----------
  libqtest: fix the order of buffered events

By a mistake I added the pending events in a wrong order.
Fix this by using g_list_append.

Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Message-Id: <20201019163702.471239-3-mlevitsk@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: d232b87ec6e3a8a04db9b647f61a1e3a6855a58f
      
https://github.com/qemu/qemu/commit/d232b87ec6e3a8a04db9b647f61a1e3a6855a58f
  Author: Maxim Levitsky <mlevitsk@redhat.com>
  Date:   2020-10-24 (Sat, 24 Oct 2020)

  Changed paths:
    M tests/qtest/libqtest.c

  Log Message:
  -----------
  libqtest: fix memory leak in the qtest_qmp_event_ref

The g_list_remove_link doesn't free the link element,
opposed to what I thought.
Switch to g_list_delete_link that does free it.

Also refactor the code a bit.
Thanks for Max Reitz for helping me with this.

Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Message-Id: <20201019163702.471239-4-mlevitsk@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: fb5ef4eeecd88b583d5a6dc8f7dc217179cbfc98
      
https://github.com/qemu/qemu/commit/fb5ef4eeecd88b583d5a6dc8f7dc217179cbfc98
  Author: Alexander Bulekov <alxndr@bu.edu>
  Date:   2020-10-24 (Sat, 24 Oct 2020)

  Changed paths:
    M include/exec/memory.h
    M softmmu/memory.c

  Log Message:
  -----------
  memory: Add FlatView foreach function

Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
Message-Id: <20201023150746.107063-2-alxndr@bu.edu>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: da9bf5319838c193f92a3444bd3258b32c606980
      
https://github.com/qemu/qemu/commit/da9bf5319838c193f92a3444bd3258b32c606980
  Author: Alexander Bulekov <alxndr@bu.edu>
  Date:   2020-10-24 (Sat, 24 Oct 2020)

  Changed paths:
    A tests/qtest/fuzz/generic_fuzz.c
    M tests/qtest/fuzz/meson.build

  Log Message:
  -----------
  fuzz: Add generic virtual-device fuzzer

This is a generic fuzzer designed to fuzz a virtual device's
MemoryRegions, as long as they exist within the Memory or Port IO (if it
exists) AddressSpaces. The fuzzer's input is interpreted into a sequence
of qtest commands (outb, readw, etc). The interpreted commands are
separated by a magic seaparator, which should be easy for the fuzzer to
guess. Without ASan, the separator can be specified as a "dictionary
value" using the -dict argument (see libFuzzer documentation).

Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
Message-Id: <20201023150746.107063-3-alxndr@bu.edu>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: 05efbf2497f93415a50347bbf53983689f999282
      
https://github.com/qemu/qemu/commit/05efbf2497f93415a50347bbf53983689f999282
  Author: Alexander Bulekov <alxndr@bu.edu>
  Date:   2020-10-24 (Sat, 24 Oct 2020)

  Changed paths:
    M tests/qtest/fuzz/generic_fuzz.c

  Log Message:
  -----------
  fuzz: Add PCI features to the generic fuzzer

This patch compares TYPE_PCI_DEVICE objects against the user-provided
matching pattern. If there is a match, we use some hacks and leverage
QOS to map each possible BAR for that device. Now fuzzed inputs might be
converted to pci_read/write commands which target specific. This means
that we can fuzz a particular device's PCI configuration space,

Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Message-Id: <20201023150746.107063-4-alxndr@bu.edu>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: 20f5a3029386363357e6fa0c2e82b35ac4914d6a
      
https://github.com/qemu/qemu/commit/20f5a3029386363357e6fa0c2e82b35ac4914d6a
  Author: Alexander Bulekov <alxndr@bu.edu>
  Date:   2020-10-26 (Mon, 26 Oct 2020)

  Changed paths:
    M include/exec/memory.h
    M tests/qtest/fuzz/generic_fuzz.c

  Log Message:
  -----------
  fuzz: Add DMA support to the generic-fuzzer

When a virtual-device tries to access some buffer in memory over DMA, we
add call-backs into the fuzzer(next commit). The fuzzer checks verifies
that the DMA request maps to a physical RAM address and fills the memory
with fuzzer-provided data. The patterns that we use to fill this memory
are specified using add_dma_pattern and clear_dma_patterns operations.

Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Message-Id: <20201023150746.107063-5-alxndr@bu.edu>
[thuth: Reformatted one comment according to the QEMU coding style]
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: e7d3222e2e07e2a1a0aac979ef1fa5e8ef59f02c
      
https://github.com/qemu/qemu/commit/e7d3222e2e07e2a1a0aac979ef1fa5e8ef59f02c
  Author: Alexander Bulekov <alxndr@bu.edu>
  Date:   2020-10-26 (Mon, 26 Oct 2020)

  Changed paths:
    M include/exec/memory.h
    M softmmu/memory.c

  Log Message:
  -----------
  fuzz: Declare DMA Read callback function

This patch declares the fuzz_dma_read_cb function and uses the
preprocessor and linker(weak symbols) to handle these cases:

When we build softmmu/all with --enable-fuzzing, there should be no
strong symbol defined for fuzz_dma_read_cb, and we link against a weak
stub function.

When we build softmmu/fuzz with --enable-fuzzing, we link against the
strong symbol in generic_fuzz.c

When we build softmmu/all without --enable-fuzzing, fuzz_dma_read_cb is
an empty, inlined function. As long as we don't call any other functions
when building the arguments, there should be no overhead.

Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Message-Id: <20201023150746.107063-6-alxndr@bu.edu>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: a3c20e91dea6f7af64d886b05d678839b7b1a14c
      
https://github.com/qemu/qemu/commit/a3c20e91dea6f7af64d886b05d678839b7b1a14c
  Author: Alexander Bulekov <alxndr@bu.edu>
  Date:   2020-10-26 (Mon, 26 Oct 2020)

  Changed paths:
    M include/exec/memory.h
    M include/exec/memory_ldst_cached.h.inc
    M memory_ldst.c.inc
    M softmmu/memory.c
    M softmmu/physmem.c

  Log Message:
  -----------
  fuzz: Add fuzzer callbacks to DMA-read functions

We should be careful to not call any functions besides fuzz_dma_read_cb.
Without --enable-fuzzing, fuzz_dma_read_cb is an empty inlined function.

Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Message-Id: <20201023150746.107063-7-alxndr@bu.edu>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: f81cb729be3268d84bd5755dd6ce934972a5ac8d
      
https://github.com/qemu/qemu/commit/f81cb729be3268d84bd5755dd6ce934972a5ac8d
  Author: Alexander Bulekov <alxndr@bu.edu>
  Date:   2020-10-26 (Mon, 26 Oct 2020)

  Changed paths:
    M tests/qtest/fuzz/fuzz.c
    M tests/qtest/fuzz/fuzz.h

  Log Message:
  -----------
  fuzz: Add support for custom crossover functions

libfuzzer supports a "custom crossover function". Libfuzzer often tries
to blend two inputs to create a new interesting input. Sometimes, we
have a better idea about how to blend inputs together. This change
allows fuzzers to specify a custom function for blending two inputs
together.

Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Message-Id: <20201023150746.107063-8-alxndr@bu.edu>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: ccbd4bc8af39096363fd06ab4fe2fe2f43042d76
      
https://github.com/qemu/qemu/commit/ccbd4bc8af39096363fd06ab4fe2fe2f43042d76
  Author: Alexander Bulekov <alxndr@bu.edu>
  Date:   2020-10-26 (Mon, 26 Oct 2020)

  Changed paths:
    M tests/qtest/fuzz/generic_fuzz.c

  Log Message:
  -----------
  fuzz: add a DISABLE_PCI op to generic-fuzzer

This new operation is used in the next commit, which concatenates two
fuzzer-generated inputs. With this operation, we can prevent the second
input from clobbering the PCI configuration performed by the first.

Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Message-Id: <20201023150746.107063-9-alxndr@bu.edu>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: a25393222764c26658a98dbfc20f78c80765bca4
      
https://github.com/qemu/qemu/commit/a25393222764c26658a98dbfc20f78c80765bca4
  Author: Alexander Bulekov <alxndr@bu.edu>
  Date:   2020-10-26 (Mon, 26 Oct 2020)

  Changed paths:
    M tests/qtest/fuzz/generic_fuzz.c

  Log Message:
  -----------
  fuzz: add a crossover function to generic-fuzzer

Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
Message-Id: <20201023150746.107063-10-alxndr@bu.edu>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: 7c9b64ade9d1d3c69250ef1684db9c080a7b7092
      
https://github.com/qemu/qemu/commit/7c9b64ade9d1d3c69250ef1684db9c080a7b7092
  Author: Alexander Bulekov <alxndr@bu.edu>
  Date:   2020-10-26 (Mon, 26 Oct 2020)

  Changed paths:
    A scripts/oss-fuzz/reorder_fuzzer_qtest_trace.py

  Log Message:
  -----------
  scripts/oss-fuzz: Add script to reorder a generic-fuzzer trace

The generic-fuzzer uses hooks to fulfill DMA requests just-in-time.
This means that if we try to use QTEST_LOG=1 to build a reproducer, the
DMA writes will be logged _after_ the in/out/read/write that triggered
the DMA read. To work work around this, the generic-fuzzer annotates
these just-in time DMA fulfilments with a tag that we can use to
discern them. This script simply iterates over a raw qtest
trace (including log messages, errors, timestamps etc), filters it and
re-orders it so that DMA fulfillments are placed directly _before_ the
qtest command that will cause the DMA access.

Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Message-Id: <20201023150746.107063-11-alxndr@bu.edu>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: cd3f0686ddf3cd18f307fb9f55f9cf21bf185bbf
      
https://github.com/qemu/qemu/commit/cd3f0686ddf3cd18f307fb9f55f9cf21bf185bbf
  Author: Alexander Bulekov <alxndr@bu.edu>
  Date:   2020-10-26 (Mon, 26 Oct 2020)

  Changed paths:
    A scripts/oss-fuzz/minimize_qtest_trace.py

  Log Message:
  -----------
  scripts/oss-fuzz: Add crash trace minimization script

Once we find a crash, we can convert it into a QTest trace. Usually this
trace will contain many operations that are unneeded to reproduce the
crash. This script tries to minimize the crashing trace, by removing
operations and trimming QTest bufwrite(write addr len data...) commands.

Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Message-Id: <20201023150746.107063-12-alxndr@bu.edu>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: 2f2e036ca6e2c4d15841f6d29a17c2ae0961aca8
      
https://github.com/qemu/qemu/commit/2f2e036ca6e2c4d15841f6d29a17c2ae0961aca8
  Author: Alexander Bulekov <alxndr@bu.edu>
  Date:   2020-10-26 (Mon, 26 Oct 2020)

  Changed paths:
    M docs/devel/fuzzing.txt

  Log Message:
  -----------
  fuzz: Add instructions for using generic-fuzz

Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
Message-Id: <20201023150746.107063-13-alxndr@bu.edu>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: 82849bcf30b5a1dfac6c1d7642a243c2f7bd6a6f
      
https://github.com/qemu/qemu/commit/82849bcf30b5a1dfac6c1d7642a243c2f7bd6a6f
  Author: Alexander Bulekov <alxndr@bu.edu>
  Date:   2020-10-26 (Mon, 26 Oct 2020)

  Changed paths:
    M tests/qtest/fuzz/fuzz.h

  Log Message:
  -----------
  fuzz: add an "opaque" to the FuzzTarget struct

It can be useful to register FuzzTargets that have nearly-identical
initialization handlers (e.g. for using the same fuzzing code, with
different configuration options). Add an opaque pointer to the
FuzzTarget struct, so that FuzzTargets can hold some data, useful for
storing target-specific configuration options, that can be read by the
get_init_cmdline function.

Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
Message-Id: <20201023150746.107063-14-alxndr@bu.edu>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: 61fc27e0df7b6c3276fbd42c1c61f72e5b49c2b4
      
https://github.com/qemu/qemu/commit/61fc27e0df7b6c3276fbd42c1c61f72e5b49c2b4
  Author: Alexander Bulekov <alxndr@bu.edu>
  Date:   2020-10-26 (Mon, 26 Oct 2020)

  Changed paths:
    A tests/qtest/fuzz/generic_fuzz_configs.h

  Log Message:
  -----------
  fuzz: add generic-fuzz configs for oss-fuzz

Predefine some generic-fuzz configs. For each of these, we will create a
separate FuzzTarget that can be selected through argv0 and, therefore,
fuzzed on oss-fuzz.

Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
Message-Id: <20201023150746.107063-15-alxndr@bu.edu>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: 7fdb50538470a0ce60044cf93a55ec5ee3ff6f57
      
https://github.com/qemu/qemu/commit/7fdb50538470a0ce60044cf93a55ec5ee3ff6f57
  Author: Alexander Bulekov <alxndr@bu.edu>
  Date:   2020-10-26 (Mon, 26 Oct 2020)

  Changed paths:
    M tests/qtest/fuzz/generic_fuzz.c

  Log Message:
  -----------
  fuzz: register predefined generic-fuzz configs

We call get_generic_fuzz_configs, which fills an array with
predefined {name, args, objects} triples. For each of these, we add a
new FuzzTarget, that uses a small wrapper to set
QEMU_FUZZ_{ARGS,OBJECTS} to the corresponding predefined values.

Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
Message-Id: <20201023150746.107063-16-alxndr@bu.edu>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: a942f64cc4b875c2fe92ea91fea85741e00b12b9
      
https://github.com/qemu/qemu/commit/a942f64cc4b875c2fe92ea91fea85741e00b12b9
  Author: Alexander Bulekov <alxndr@bu.edu>
  Date:   2020-10-26 (Mon, 26 Oct 2020)

  Changed paths:
    M scripts/oss-fuzz/build.sh

  Log Message:
  -----------
  scripts/oss-fuzz: use hardlinks instead of copying

Prior to this, fuzzers in the output oss-fuzz directory were exactly
the same executable, with a different name to do argv[0]-based
fuzz-target selection. This is a waste of space, especially since these
binaries can weigh many MB.

Instead of copying, use hard links, to cut down on wasted space. We need
to place the primary copy of the executable into DEST_DIR, since this is
a separate file-system on oss-fuzz. We should not place it directly into
$DEST_DIR, since oss-fuzz will treat it as an independent fuzzer and try
to run it for fuzzing. Instead, we create a DEST_DIR/bin directory to
store the primary copy.

Suggested-by: Darren Kenny <darren.kenny@oracle.com>
Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
Message-Id: <20201023150746.107063-17-alxndr@bu.edu>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: 53e1a50d6b6fe97fafa81ab9f2ddebf92798a57b
      
https://github.com/qemu/qemu/commit/53e1a50d6b6fe97fafa81ab9f2ddebf92798a57b
  Author: Alexander Bulekov <alxndr@bu.edu>
  Date:   2020-10-26 (Mon, 26 Oct 2020)

  Changed paths:
    M scripts/oss-fuzz/build.sh

  Log Message:
  -----------
  scripts/oss-fuzz: ignore the generic-fuzz target

generic-fuzz is not a standalone fuzzer - it requires some env variables
to be set. On oss-fuzz, we set these with some predefined
generic-fuzz-{...} targets, that are thin wrappers around generic-fuzz.
Do not make a link for the generic-fuzz from the oss-fuzz build, so
oss-fuzz does not treat it as a standalone fuzzer.

Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
Message-Id: <20201023150746.107063-18-alxndr@bu.edu>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
[thuth: Reformatted one comment to stay within the 80 columns limit]
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: a60f755c9cb52a2a2dea83b9d69e5bed2276de97
      
https://github.com/qemu/qemu/commit/a60f755c9cb52a2a2dea83b9d69e5bed2276de97
  Author: Thomas Huth <thuth@redhat.com>
  Date:   2020-10-26 (Mon, 26 Oct 2020)

  Changed paths:
    M tests/acceptance/ppc_prep_40p.py

  Log Message:
  -----------
  tests/acceptance/ppc_prep_40p: Fix the URL to the NetBSD-4.0 archive

The current URL on cdn.netbsd.org is failing - using archive.netbsd.org
instead seems to be fine.

Message-Id: <20201023073351.251332-2-thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: 1d60f46fc693e8459f700684f0af4e0130a9bcee
      
https://github.com/qemu/qemu/commit/1d60f46fc693e8459f700684f0af4e0130a9bcee
  Author: Thomas Huth <thuth@redhat.com>
  Date:   2020-10-26 (Mon, 26 Oct 2020)

  Changed paths:
    M tests/acceptance/ppc_prep_40p.py

  Log Message:
  -----------
  test/acceptance: Remove the CONTINUOUS_INTEGRATION tags

We are not running the acceptance tests on Travis anymore, so these
checks can be removed now.

Message-Id: <20201023073351.251332-3-thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: 67202baeaa856e9fe66cffc3a9abeeada1f45a43
      
https://github.com/qemu/qemu/commit/67202baeaa856e9fe66cffc3a9abeeada1f45a43
  Author: Thomas Huth <thuth@redhat.com>
  Date:   2020-10-26 (Mon, 26 Oct 2020)

  Changed paths:
    M .gitlab-ci.yml

  Log Message:
  -----------
  tests/acceptance: Enable AVOCADO_ALLOW_UNTRUSTED_CODE in the gitlab-CI

The tests are running in containers here, so it should be OK to
run with AVOCADO_ALLOW_UNTRUSTED_CODE enabled in this case.

Message-Id: <20201023073351.251332-4-thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: c4cb1c9f2e15762e05ecf3e06ecf3c839c3a94ce
      
https://github.com/qemu/qemu/commit/c4cb1c9f2e15762e05ecf3e06ecf3c839c3a94ce
  Author: Thomas Huth <thuth@redhat.com>
  Date:   2020-10-26 (Mon, 26 Oct 2020)

  Changed paths:
    M tests/docker/dockerfiles/centos8.docker
    M tests/docker/dockerfiles/debian-amd64.docker
    M tests/docker/dockerfiles/fedora.docker
    M tests/docker/dockerfiles/ubuntu2004.docker

  Log Message:
  -----------
  test/docker/dockerfiles: Add missing packages for acceptance tests

Some of the "check-acceptance" tests are still skipped in the CI
since the docker images do not provide the necessary packages, e.g.
the netcat binary. Add them to get more test coverage.

Message-Id: <20201023073351.251332-5-thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: 239f0d455bf727d58d3ff52070919de8f8089ace
      
https://github.com/qemu/qemu/commit/239f0d455bf727d58d3ff52070919de8f8089ace
  Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
  Date:   2020-10-26 (Mon, 26 Oct 2020)

  Changed paths:
    M tests/acceptance/machine_m68k_nextcube.py

  Log Message:
  -----------
  tests/acceptance: Remove unused import

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20201021105035.2477784-2-f4bug@amsat.org>
Tested-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: 28bbe20ce281659e317b807f34f568bde6d99760
      
https://github.com/qemu/qemu/commit/28bbe20ce281659e317b807f34f568bde6d99760
  Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
  Date:   2020-10-26 (Mon, 26 Oct 2020)

  Changed paths:
    M tests/acceptance/machine_m68k_nextcube.py

  Log Message:
  -----------
  tests/acceptance: Use .ppm extention for Portable PixMap files

The HMP 'screendump' command generates Portable PixMap files.
Make it obvious by using the .ppm file extention.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20201021105035.2477784-3-f4bug@amsat.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: e75de8354ac5c67145b2f8874d3c36022d4a94bb
      
https://github.com/qemu/qemu/commit/e75de8354ac5c67145b2f8874d3c36022d4a94bb
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2020-10-26 (Mon, 26 Oct 2020)

  Changed paths:
    M .gitlab-ci.yml
    A accel/dummy-cpus.c
    M accel/meson.build
    M accel/qtest/meson.build
    R accel/qtest/qtest-cpus.c
    R accel/qtest/qtest-cpus.h
    M accel/qtest/qtest.c
    M accel/xen/xen-all.c
    M docs/devel/fuzzing.txt
    M include/exec/memory.h
    M include/exec/memory_ldst_cached.h.inc
    M include/sysemu/cpus.h
    M memory_ldst.c.inc
    M scripts/oss-fuzz/build.sh
    A scripts/oss-fuzz/minimize_qtest_trace.py
    A scripts/oss-fuzz/reorder_fuzzer_qtest_trace.py
    M softmmu/memory.c
    M softmmu/physmem.c
    M tests/acceptance/machine_m68k_nextcube.py
    M tests/acceptance/ppc_prep_40p.py
    M tests/docker/dockerfiles/centos8.docker
    M tests/docker/dockerfiles/debian-amd64.docker
    M tests/docker/dockerfiles/fedora.docker
    M tests/docker/dockerfiles/ubuntu2004.docker
    M tests/qtest/fuzz/fuzz.c
    M tests/qtest/fuzz/fuzz.h
    A tests/qtest/fuzz/generic_fuzz.c
    A tests/qtest/fuzz/generic_fuzz_configs.h
    M tests/qtest/fuzz/meson.build
    M tests/qtest/libqtest.c
    M tests/qtest/meson.build
    M tests/qtest/migration-helpers.c

  Log Message:
  -----------
  Merge remote-tracking branch 
'remotes/huth-gitlab/tags/pull-request-2020-10-26' into staging

* qtest fixes (e.g. memory leaks)
* Fix for Xen dummy cpu loop (which happened due to qtest accel rework)
* Introduction of the generic device fuzzer
* Run more check-acceptance tests in the gitlab-CI

# gpg: Signature made Mon 26 Oct 2020 09:34:04 GMT
# gpg:                using RSA key 27B88847EEE0250118F3EAB92ED9D774FE702DB5
# gpg:                issuer "thuth@redhat.com"
# gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [full]
# gpg:                 aka "Thomas Huth <thuth@redhat.com>" [full]
# gpg:                 aka "Thomas Huth <huth@tuxfamily.org>" [full]
# gpg:                 aka "Thomas Huth <th.huth@posteo.de>" [unknown]
# Primary key fingerprint: 27B8 8847 EEE0 2501 18F3  EAB9 2ED9 D774 FE70 2DB5

* remotes/huth-gitlab/tags/pull-request-2020-10-26: (31 commits)
  tests/acceptance: Use .ppm extention for Portable PixMap files
  tests/acceptance: Remove unused import
  test/docker/dockerfiles: Add missing packages for acceptance tests
  tests/acceptance: Enable AVOCADO_ALLOW_UNTRUSTED_CODE in the gitlab-CI
  test/acceptance: Remove the CONTINUOUS_INTEGRATION tags
  tests/acceptance/ppc_prep_40p: Fix the URL to the NetBSD-4.0 archive
  scripts/oss-fuzz: ignore the generic-fuzz target
  scripts/oss-fuzz: use hardlinks instead of copying
  fuzz: register predefined generic-fuzz configs
  fuzz: add generic-fuzz configs for oss-fuzz
  fuzz: add an "opaque" to the FuzzTarget struct
  fuzz: Add instructions for using generic-fuzz
  scripts/oss-fuzz: Add crash trace minimization script
  scripts/oss-fuzz: Add script to reorder a generic-fuzzer trace
  fuzz: add a crossover function to generic-fuzzer
  fuzz: add a DISABLE_PCI op to generic-fuzzer
  fuzz: Add support for custom crossover functions
  fuzz: Add fuzzer callbacks to DMA-read functions
  fuzz: Declare DMA Read callback function
  fuzz: Add DMA support to the generic-fuzzer
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


Compare: https://github.com/qemu/qemu/compare/288a1cc6345e...e75de8354ac5



reply via email to

[Prev in Thread] Current Thread [Next in Thread]