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: <20140401231741.GM32556@tassilo.jf.intel.com>
Date:	Tue, 1 Apr 2014 16:17:41 -0700
From:	Andi Kleen <ak@...ux.intel.com>
To:	Paul Bolle <pebolle@...cali.nl>
Cc:	"H. Peter Anvin" <hpa@...ux.intel.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	gleb@...hat.com, hpa@...or.com, hubicka@....cz,
	linux-kernel@...r.kernel.org, mingo@...nel.org,
	pbonzini@...hat.com, perex@...ex.cz, peterz@...radead.org,
	rostedt@...dmis.org, rusty@...tcorp.com.au, tglx@...utronix.de
Subject: Re: [GIT PULL] x86 LTO changes for v3.15

On Tue, Apr 01, 2014 at 10:49:51PM +0200, Paul Bolle wrote:
> On Mon, 2014-03-31 at 14:05 -0700, H. Peter Anvin wrote:
> > --- a/include/linux/init.h
> > +++ b/include/linux/init.h
> > @@ -163,6 +163,23 @@ extern bool initcall_debug;
> >  
> >  #ifndef __ASSEMBLY__
> >  
> > +#ifdef CONFIG_LTO
> 
> I can't find a Kconfig symbol LTO nor a preprocessor define for
> CONFIG_LTO. (I only checked master of Linus's tree and linux-next.)

The patch for LTO is not merged yet, this is all preparation.

> 
> Why is this check for CONFIG_LTO needed?

The comment just below describes the problem.

Or is your question what LTO is? Link Time Optimization

> 
> > +/* Work around a LTO gcc problem: when there is no reference to a variable
> > + * in a module it will be moved to the end of the program. This causes
> > + * reordering of initcalls which the kernel does not like.
> > + * Add a dummy reference function to avoid this. The function is
> > + * deleted by the linker.
> > + */
> > +#define LTO_REFERENCE_INITCALL(x) \
> > +	; /* yes this is needed */			\
> > +	static __used __exit void *reference_##x(void)	\
> > +	{						\
> > +		return &x;				\
> > +	}
> > +#else
> > +#define LTO_REFERENCE_INITCALL(x)
> > +#endif

-- 
ak@...ux.intel.com -- Speaking for myself only
--
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