[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v5 12/20] trace: don't abort qemu if ftrace can'
From: |
Daniel P. Berrange |
Subject: |
Re: [Qemu-devel] [PATCH v5 12/20] trace: don't abort qemu if ftrace can't be initialized |
Date: |
Tue, 4 Oct 2016 10:07:02 +0100 |
User-agent: |
Mutt/1.7.0 (2016-08-17) |
On Mon, Oct 03, 2016 at 02:59:02PM +0100, Stefan Hajnoczi wrote:
> On Wed, Sep 28, 2016 at 02:08:15PM +0100, Daniel P. Berrange wrote:
> > If the ftrace backend is compiled into QEMU, any attempt
> > to start QEMU while non-root will fail due to the
> > inability to open /sys/kernel/debug/tracing/trace_on.
>
> s/trace_on/tracing_on/
>
> >
> > Add a fallback into the code so that it connects up the
> > trace_marker_fd variable to /dev/null when setting
> > EACCESS on the 'trace_on' file. This allows QEMU to
> > run, with ftrace turned into a no-op.
>
> I wonder whether a warning is appropriate. It depends on the situation
> because maybe QEMU was compiled with multiple backends and we don't care
> about ftrace when it fails to initialize...
If a distro compiles ftrace in, then I don't think we want to be spamming
stderr with a warning every time the user runs QEMU as non-root.
We could warn only if we failed to open it while running as root, but
that'd basically be a no-op unless someone has broken their root account
terribly.
Regards,
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://entangle-photo.org -o- http://search.cpan.org/~danberr/ :|