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: <1294668888.26623.238.camel@gandalf.stny.rr.com>
Date:	Mon, 10 Jan 2011 09:14:48 -0500
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc:	linux-kernel@...r.kernel.org, mingo@...hat.com, hpa@...or.com,
	srostedt@...hat.com, tglx@...utronix.de,
	linux-tip-commits@...r.kernel.org
Subject: Re: [tip:perf/urgent] tracing: Include module.h in define_trace.h

On Mon, 2011-01-10 at 14:49 +0100, Peter Zijlstra wrote:
> After I got everything building on that tree I was working on, the above
> was found to compile but not to link, since it makes every:
> 
>  #define CREATE_TRACE_POINTS
>  #include <trace/event/foo.h>
> 
> site also create the trace/event/module.h tracepoints, thus confusing
> the linker with tons of duplicate symbols.
> 
> The below patch makes things compile and link:
> 
> ---
>  include/trace/define_trace.h |   23 +++++++++++++----------
>  1 files changed, 13 insertions(+), 10 deletions(-)
> 
> diff --git a/include/trace/define_trace.h b/include/trace/define_trace.h
> index da39b22..9ebd0d3 100644
> --- a/include/trace/define_trace.h
> +++ b/include/trace/define_trace.h
> @@ -21,16 +21,6 @@
>  #undef CREATE_TRACE_POINTS

But here we undefine CREATE_TRACE_POINTS, why would this cause a problem
in module.h?

-- Steve

>  
>  #include <linux/stringify.h>
> -/*
> - * module.h includes tracepoints, and because ftrace.h
> - * pulls in module.h:
> - *  trace/ftrace.h -> linux/ftrace_event.h -> linux/perf_event.h ->
> - *  linux/ftrace.h -> linux/module.h
> - * we must include module.h here before we play with any of
> - * the TRACE_EVENT() macros, otherwise the tracepoints included
> - * by module.h may break the build.
> - */
> -#include <linux/module.h>
>  
>  #undef TRACE_EVENT
>  #define TRACE_EVENT(name, proto, args, tstruct, assign, print)	\
> @@ -120,4 +110,17 @@
>  /* We may be processing more files */
>  #define CREATE_TRACE_POINTS
>  
> +#else /* CREATE_TRACE_POINTS */
> +
> +/*
> + * module.h includes tracepoints, and because ftrace.h
> + * pulls in module.h:
> + *  trace/ftrace.h -> linux/ftrace_event.h -> linux/perf_event.h ->
> + *  linux/ftrace.h -> linux/module.h
> + * we must include module.h here before we play with any of
> + * the TRACE_EVENT() macros, otherwise the tracepoints included
> + * by module.h may break the build.
> + */
> +#include <linux/module.h>
> +
>  #endif /* CREATE_TRACE_POINTS */


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