[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v8 13/21] main: keep rcu_atfork callback enabled for qtest
From: |
Stefan Hajnoczi |
Subject: |
Re: [PATCH v8 13/21] main: keep rcu_atfork callback enabled for qtest |
Date: |
Thu, 30 Jan 2020 14:42:24 +0000 |
On Wed, Jan 29, 2020 at 05:34:22AM +0000, Bulekov, Alexander wrote:
> The qtest-based fuzzer makes use of forking to reset-state between
> tests. Keep the callback enabled, so the call_rcu thread gets created
> within the child process.
>
> Signed-off-by: Alexander Bulekov <address@hidden>
> ---
> vl.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/vl.c b/vl.c
> index bb77935f04..cf8e2d3ebb 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -3794,7 +3794,14 @@ void qemu_init(int argc, char **argv, char **envp)
> set_memory_options(&ram_slots, &maxram_size, machine_class);
>
> os_daemonize();
> - rcu_disable_atfork();
> +
> + /*
> + * If QTest is enabled, keep the rcu_atfork enabled, since system
> processes
> + * may be forked testing purposes (e.g. fork-server based fuzzing)
> + */
> + if (!qtest_enabled()) {
> + rcu_disable_atfork();
> + }
I haven't reviewed the details of whether resources are leaked across
fork but in general it makes sense that we want an RCU thread in the
fork child:
Acked-by: Stefan Hajnoczi <address@hidden>
signature.asc
Description: PGP signature
- [PATCH v8 02/21] module: check module wasn't already initialized, (continued)
- [PATCH v8 02/21] module: check module wasn't already initialized, Bulekov, Alexander, 2020/01/29
- [PATCH v8 03/21] fuzz: add FUZZ_TARGET module type, Bulekov, Alexander, 2020/01/29
- [PATCH v8 04/21] qtest: add qtest_server_send abstraction, Bulekov, Alexander, 2020/01/29
- [PATCH v8 05/21] libqtest: add a layer of abstraction to send/recv, Bulekov, Alexander, 2020/01/29
- [PATCH v8 06/21] libqtest: make bufwrite rely on the TransportOps, Bulekov, Alexander, 2020/01/29
- [PATCH v8 07/21] qtest: add in-process incoming command handler, Bulekov, Alexander, 2020/01/29
- [PATCH v8 08/21] libqos: rename i2c_send and i2c_recv, Bulekov, Alexander, 2020/01/29
- [PATCH v8 09/21] libqos: split qos-test and libqos makefile vars, Bulekov, Alexander, 2020/01/29
- [PATCH v8 12/21] exec: keep ram block across fork when using qtest, Bulekov, Alexander, 2020/01/29
- [PATCH v8 13/21] main: keep rcu_atfork callback enabled for qtest, Bulekov, Alexander, 2020/01/29
- Re: [PATCH v8 13/21] main: keep rcu_atfork callback enabled for qtest,
Stefan Hajnoczi <=
[PATCH v8 11/21] fuzz: add fuzzer skeleton, Bulekov, Alexander, 2020/01/29
[PATCH v8 10/21] libqos: move useful qos-test funcs to qos_external, Bulekov, Alexander, 2020/01/29
[PATCH v8 14/21] fuzz: support for fork-based fuzzing., Bulekov, Alexander, 2020/01/29
[PATCH v8 16/21] fuzz: add target/fuzz makefile rules, Bulekov, Alexander, 2020/01/29
[PATCH v8 17/21] fuzz: add configure flag --enable-fuzzing, Bulekov, Alexander, 2020/01/29
[PATCH v8 15/21] fuzz: add support for qos-assisted fuzz targets, Bulekov, Alexander, 2020/01/29