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]
Date:	Thu, 16 Apr 2009 13:34:46 -0400 (EDT)
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Christoph Hellwig <hch@....de>
cc:	linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...e.hu>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Peter Zijlstra <peterz@...radead.org>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Theodore Tso <tytso@....edu>,
	Arjan van de Ven <arjan@...radead.org>,
	Mathieu Desnoyers <compudj@...stal.dyndns.org>,
	Jeremy Fitzhardinge <jeremy@...p.org>,
	Lai Jiangshan <laijs@...fujitsu.com>,
	Zhaolei <zhaolei@...fujitsu.com>, Li Zefan <lizf@...fujitsu.com>,
	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
	Masami Hiramatsu <mhiramat@...hat.com>,
	"Frank Ch. Eigler" <fche@...stic.org>,
	Tom Zanussi <tzanussi@...il.com>,
	Jiaying Zhang <jiayingz@...gle.com>,
	Michael Rubin <mrubin@...gle.com>,
	Martin Bligh <mbligh@...gle.com>
Subject: Re: [PATCH 4/4] tracing/events: add trace-events-sample


On Thu, 16 Apr 2009, Christoph Hellwig wrote:

> On Tue, Apr 14, 2009 at 11:15:15PM -0400, Steven Rostedt wrote:
> > +++ b/samples/trace_events/Makefile
> > @@ -0,0 +1,8 @@
> > +# builds the trace events example kernel modules;
> > +# then to use one (as root):  insmod <module_name.ko>
> > +
> > +PWD := $(shell pwd)
> > +
> > +CFLAGS_trace-events-sample.o := -I$(PWD)/samples/trace_events/
> 
> CFLAGS_trace-events-sample.o += -I$(src)

Is $(src) defined to be where the object is compiled?

> 
> That should better be written as.  But you'd easily get rid of that
> by just including the file using #include "foo.h" instead of <foo.h>,
> no?

That is for the define_trace.h to find the file. The define_trace.h will 
look from where it is located. ie. include/trace


> 
> > --- /dev/null
> > +++ b/samples/trace_events/trace-events-sample.h
> > @@ -0,0 +1,124 @@
> > +/*
> > + * Notice that this file is not protected like a normal header.
> > + * We also must allow for rereading of this file. The
> > + *
> > + *  || defined(TRACE_HEADER_MULTI_READ)
> > + *
> > + * serves this purpose.
> > + */
> > +#if !defined(_TRACE_EVENT_SAMPLE_H) || defined(TRACE_HEADER_MULTI_READ)
> > +#define _TRACE_EVENT_SAMPLE_H
> 
> Why do we need this protection at all?  It only be included by the users
> of the tracepoints, and it seems just fair to take some more than normal
> precaution for more than unusual magic headers.

This was needed for kmem.h because it was causing header recursive hell.
But instead of doing this for just a few headers, having it in all was a 
way to be:

1) safe

2) descriptive

#2 is because people are use to the #ifndef _MY_HEADER_H  and seeing that 
there is also a TRACE_HEADER_MULTI_READ it makes it obvious that this 
header may be included more than once, purposefully.

-- 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