From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38235) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1brLgw-0007CM-FP for qemu-devel@nongnu.org; Tue, 04 Oct 2016 05:07:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1brLgr-0002aA-D7 for qemu-devel@nongnu.org; Tue, 04 Oct 2016 05:07:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35990) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1brLgr-0002ZT-6X for qemu-devel@nongnu.org; Tue, 04 Oct 2016 05:07:09 -0400 Date: Tue, 4 Oct 2016 10:07:02 +0100 From: "Daniel P. Berrange" Message-ID: <20161004090701.GC5578@redhat.com> Reply-To: "Daniel P. Berrange" References: <1475068103-356-1-git-send-email-berrange@redhat.com> <1475068103-356-13-git-send-email-berrange@redhat.com> <20161003135902.GE10245@stefanha-x1.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20161003135902.GE10245@stefanha-x1.localdomain> Subject: Re: [Qemu-devel] [PATCH v5 12/20] trace: don't abort qemu if ftrace can't be initialized List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: qemu-devel@nongnu.org, =?utf-8?B?TGx1w61z?= Vilanova 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/ :|