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:	Fri, 24 Jun 2016 12:04:40 -0400
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Namhyung Kim <namhyung@...nel.org>
Cc:	Ingo Molnar <mingo@...nel.org>,
	LKML <linux-kernel@...r.kernel.org>,
	"linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>
Subject: Re: [RFC/PATCH] ftrace: Reduce size of function graph entries

On Fri, 24 Jun 2016 15:35:44 +0900
Namhyung Kim <namhyung@...nel.org> wrote:


> > > diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
> > > index dea12a6e413b..35c523ba5c59 100644
> > > --- a/include/linux/ftrace.h
> > > +++ b/include/linux/ftrace.h
> > > @@ -751,25 +751,33 @@ extern void ftrace_init(void);
> > >  static inline void ftrace_init(void) { }
> > >  #endif
> > >  
> > > +#ifndef CONFIG_HAVE_64BIT_ALIGNED_ACCESS
> > > +# define FTRACE_ALIGNMENT	4
> > > +#else
> > > +# define FTRACE_ALIGNMENT	8
> > > +#endif  
> > 
> > Swap the above. Having the #ifndef is more confusing to understand than
> > to have a #ifdef.  
> 
> Will do.
> 
> >   
> > > +
> > > +#define FTRACE_ALIGN_DATA	__attribute__((packed, aligned(FTRACE_ALIGNMENT)))  
> > 
> > Do we really need to pack it? I mean, just get rid of the hole (like
> > you did with the movement of the overrun) and shouldn't the array be
> > aligned normally without holes, if the arch can support it? Doesn't gcc
> > take care of that?  
> 
> I'm not sure I understood you correctly.  AFAIK the size of struct is
> a multiple of alignment unit and gcc manual says the aligment
> attribute only can be increased unless the 'packed' is used as well..

Ah, I see you are trying to get the recorded size in the array down to
a 4 byte alignment (due to the "int depth"), instead of adding the 4
bytes to the buffer.

Hmm, I wondering if we need the ifdef above, as the ring buffer itself
will force the 8 byte alignment of structures added to the buffer.

-- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ