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] [day] [month] [year] [list]
Date:	Fri, 13 Sep 2013 21:05:53 -0400
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Tom Zanussi <tom.zanussi@...ux.intel.com>
Cc:	masami.hiramatsu.pt@...achi.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v9 04/10] tracing: Add 'snapshot' event trigger command

On Fri, 13 Sep 2013 16:10:19 -0500
Tom Zanussi <tom.zanussi@...ux.intel.com> wrote:

> On Fri, 2013-09-13 at 16:01 -0400, Steven Rostedt wrote:
> > On Sat,  7 Sep 2013 10:29:00 -0500
> > Tom Zanussi <tom.zanussi@...ux.intel.com> wrote:
> > 
> > 
> > > --- a/kernel/trace/trace_events_trigger.c
> > > +++ b/kernel/trace/trace_events_trigger.c
> > > @@ -696,6 +696,74 @@ static struct event_command trigger_traceoff_cmd = {
> > >  	.get_trigger_ops	= onoff_get_trigger_ops,
> > >  };
> > >  
> > > +static void
> > > +snapshot_trigger(struct event_trigger_data *data)
> > > +{
> > > +	tracing_snapshot();
> > > +}
> > 
> > If CONFIG_TRACER_SNAPSHOT is not defined, then we should not bother
> > implementing the snapshot trigger. This should be encapsulated around
> > ifdefs.
> 
> OK, I guess I was just trying to avoid the ifdef since
> tracing_snapshot() is already ifdef'ed out (but with a WARN_ONCE()) if
> CONFIG_TRACER_SNAPSHOT isn't defined.
> 
> I agree though, it would be better to just ignore all the snapshot
> trigger code if that's the case.  Same for the stacktrace trigger,
> though as much as I hate to put big ifdefs in the main code...
> 

#ifdef's are OK when they surround entire functions and structures. I
don't think ifdef'ing out these will cause #ifdef's within functions.
That's when things start to look ugly.

-- Steve

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ