[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH-for-4.2] tracing: Allow to tune tracing opti
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [RFC PATCH-for-4.2] tracing: Allow to tune tracing options via the environment |
Date: |
Thu, 4 Jul 2019 11:24:57 +0100 |
User-agent: |
Mutt/1.12.0 (2019-05-25) |
On Wed, Jul 03, 2019 at 06:25:01PM +0100, Daniel P. Berrangé wrote:
> On Wed, Jul 03, 2019 at 07:10:05PM +0200, Philippe Mathieu-Daudé wrote:
> > @@ -306,6 +308,13 @@ bool trace_init_backends(void)
> > openlog(NULL, LOG_PID, LOG_DAEMON);
> > #endif
> >
> > + trace_init_file(getenv("QEMU_TRACE_LOGFILE"));
> > + trace_init_events(getenv("QEMU_TRACE_EVENTFILE"));
> > + trace_env = getenv("QEMU_TRACE_EVENTS");
> > + if (trace_env) {
> > + trace_enable_events(trace_env);
> > + }
> > +
>
> I don't think it is a nice idea to add this via environment variables
> to QEMU itself. Why not modify libqtest qtest_init_without_qmp_handshake
> to read the env vars and then pass a suitable -trace arg when spawning
> QEMU ?
What is the concern about adding these environment variables to QEMU?
It is convenient to be able to use tracing even if QEMU is invoked by
something you cannot modify/control.
The main issues I see with environment variables are:
1. Security. Is there a scenario where an attacker can use environment
variables to influence the behavior of a QEMU process running at a
different trust level?
2. Name collision. What is the chance that existing users already
define environment variables with these names and that unexpected
behavior could result?
Stefan
signature.asc
Description: PGP signature
- [Qemu-devel] [RFC PATCH-for-4.2] tracing: Allow to tune tracing options via the environment, Philippe Mathieu-Daudé, 2019/07/03
- Re: [Qemu-devel] [RFC PATCH-for-4.2] tracing: Allow to tune tracing options via the environment, Daniel P . Berrangé, 2019/07/03
- Re: [Qemu-devel] [RFC PATCH-for-4.2] tracing: Allow to tune tracing options via the environment, Philippe Mathieu-Daudé, 2019/07/03
- Re: [Qemu-devel] [RFC PATCH-for-4.2] tracing: Allow to tune tracing options via the environment,
Stefan Hajnoczi <=
- Re: [Qemu-devel] [RFC PATCH-for-4.2] tracing: Allow to tune tracing options via the environment, Daniel P . Berrangé, 2019/07/04
- Re: [Qemu-devel] [RFC PATCH-for-4.2] tracing: Allow to tune tracing options via the environment, Stefan Hajnoczi, 2019/07/05
- Re: [Qemu-devel] [RFC PATCH-for-4.2] tracing: Allow to tune tracing options via the environment, Philippe Mathieu-Daudé, 2019/07/05
- Re: [Qemu-devel] [RFC PATCH-for-4.2] tracing: Allow to tune tracing options via the environment, Markus Armbruster, 2019/07/05
- Re: [Qemu-devel] [RFC PATCH-for-4.2] tracing: Allow to tune tracing options via the environment, Philippe Mathieu-Daudé, 2019/07/05
- Re: [Qemu-devel] [RFC PATCH-for-4.2] tracing: Allow to tune tracing options via the environment, Markus Armbruster, 2019/07/06
- Re: [Qemu-devel] [RFC PATCH-for-4.2] tracing: Allow to tune tracing options via the environment, Daniel P . Berrangé, 2019/07/08
- Re: [Qemu-devel] [RFC PATCH-for-4.2] tracing: Allow to tune tracing options via the environment, Philippe Mathieu-Daudé, 2019/07/08
- Re: [Qemu-devel] [RFC PATCH-for-4.2] tracing: Allow to tune tracing options via the environment, Daniel P . Berrangé, 2019/07/08
- Re: [Qemu-devel] [RFC PATCH-for-4.2] tracing: Allow to tune tracing options via the environment, Markus Armbruster, 2019/07/09