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:	Wed, 02 Feb 2011 13:53:27 -0500
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
Cc:	linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...e.hu>,
	Andrew Morton <akpm@...ux-foundation.org>,
	David Miller <davem@...emloft.net>,
	Frederic Weisbecker <fweisbec@...il.com>
Subject: Re: [PATCH 1/2] tracing: Replace trace_event struct array with
 pointer array

On Wed, 2011-02-02 at 13:42 -0500, Mathieu Desnoyers wrote:

> > diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
> > index 6ebb810..f53708b 100644
> > --- a/include/asm-generic/vmlinux.lds.h
> > +++ b/include/asm-generic/vmlinux.lds.h
> > @@ -124,7 +124,8 @@
> >  #endif
> >  
> >  #ifdef CONFIG_EVENT_TRACING
> > -#define FTRACE_EVENTS()	VMLINUX_SYMBOL(__start_ftrace_events) = .;	\
> > +#define FTRACE_EVENTS()	. = ALIGN(8);					\
> > +			VMLINUX_SYMBOL(__start_ftrace_events) = .;	\
> >  			*(_ftrace_events)				\
> >  			VMLINUX_SYMBOL(__stop_ftrace_events) = .;
> >  #else
> > @@ -179,9 +180,6 @@
> >  	TRACE_PRINTKS()							\
> >  									\
> >  	STRUCT_ALIGN();							\
> > -	FTRACE_EVENTS()							\
> > -									\
> > -	STRUCT_ALIGN();							\
> >  	TRACE_SYSCALLS()
> 
> You seem to have forgotten to fix the __syscalls_metadata table. Do you plan to
> do it in another patch ? Its code is pretty much interleaving with the ftrace
> code, so it might make sense to do both fixes in one go.

Thanks for reminding me. No that was going to be a separate patch (it
interleaves with ftrace but is a different entity - developed by two
different people). I was going to do it but got pulled off on a customer
item.

I'll fix that soon too.

> 
> [...]
> > diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h
> > index e16610c..3e68366 100644
> > --- a/include/trace/ftrace.h
> > +++ b/include/trace/ftrace.h
> > @@ -446,14 +446,16 @@ static inline notrace int ftrace_get_offsets_##call(			\
> >   *	.reg			= ftrace_event_reg,
> >   * };
> >   *
> > - * static struct ftrace_event_call __used
> > - * __attribute__((__aligned__(4)))
> > - * __attribute__((section("_ftrace_events"))) event_<call> = {
> > + * static struct ftrace_event_call event_<call> = {
> >   *	.name			= "<call>",
> >   *	.class			= event_class_<template>,
> >   *	.event			= &ftrace_event_type_<call>,
> >   *	.print_fmt		= print_fmt_<call>,
> >   * };
> > + * // its only safe to use pointers when doing linker tricks to
> > + * // create an array.
> 
> Odd comment style.
> 
> The rest looks good.

I knew someone would comment on this comment. Yes, it is an odd comment
stye. The comment is showing "code" that the macro produces. Thus, I
used the '//' to be a comment in the code comment. ;)

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