lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170911072321.0085db2c@vmware.local.home>
Date:   Mon, 11 Sep 2017 07:23:21 -0400
From:   Steven Rostedt <rostedt@...dmis.org>
To:     "Ziqian SUN (Zamir)" <zsun@...hat.com>
Cc:     linux-kernel@...r.kernel.org, mingo@...hat.com,
        karolherbst@...il.com, ppaalanen@...il.com,
        akpm@...ux-foundation.org
Subject: Re: [PATCH v3] tracing: Ignore mmiotrace from kernel commandline

On Mon, 11 Sep 2017 14:31:34 +0800
"Ziqian SUN (Zamir)" <zsun@...hat.com> wrote:

> On 09/11/2017 02:26 PM, Ziqian SUN (Zamir) wrote:
> > From: "Ziqian SUN (Zamir)" <zsun@...hat.com>
> > 
> > The mmiotrace tracer cannot be enabled with ftrace=mmiotrace in kernel
> > commandline. With this patch, noboot is added to the tracer struct,
> > and when system boot with a tracer that has noboot=true, it will print
> > out a warning message and continue booting.
> > 
> > Signed-off-by: Ziqian SUN (Zamir) <zsun@...hat.com>
> > --
> > v1 -> v2 : remove unessential comment
> > v2 -> v3 : Use tracer struct instead of a separate list to store noboot
> > ---
> >   kernel/trace/trace.c           | 7 +++++++
> >   kernel/trace/trace.h           | 2 ++
> >   kernel/trace/trace_mmiotrace.c | 1 +
> >   3 files changed, 10 insertions(+)
> > 
> > diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
> > index 5360b7a..48c474f 100644
> > --- a/kernel/trace/trace.c
> > +++ b/kernel/trace/trace.c
> > @@ -5358,6 +5358,13 @@ static int tracing_set_tracer(struct trace_array *tr, const char *buf)
> >   	if (t == tr->current_trace)
> >   		goto out;
> >   
> > +	/* Some tracers won't work on kernel command line */
> > +	if (system_state < SYSTEM_RUNNING && t->noboot) {
> > +		pr_warn("Tracer '%s' is not allowed on command line, ignored\n",
> > +			t->name);  
> I feel the core trace printed by WARN is not so meaningful, so I use 
> pr_warn instead.

I'm fine with pr_warn, but I'm curious to what you mean by "not so
meaningful"? A WARN() will cause a dump stack, which usually shows up
as a bug in systems and more likely to be seen. But if someone is
adding this to the kernel command line and it's not working, they
should be looking for the tracer name within the dmesg anyway.

Also, I'm currently at OSS in LA and hopefully I don't lose this patch.
If you don't see anything by next Monday from me, feel free to send me a
reminder ping.

-- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ