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, 16 Dec 2011 11:20:17 +0100
From:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
To:	Jeremy Fitzhardinge <jeremy@...p.org>
Cc:	Ingo Molnar <mingo@...e.hu>, linux-kernel@...r.kernel.org,
	"H. Peter Anvin" <hpa@...or.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Frédéric Weisbecker <fweisbec@...il.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Jan Beulich <JBeulich@...e.com>,
	Arjan van de Ven <arjan@...radead.org>,
	Alexander van Heukelum <heukelum@...tmail.fm>,
	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
	rth <rth@...hat.com>
Subject: Re: [PATCH] x86: Use -m-omit-leaf-frame-pointer to shrink text size

On Fri, 2011-12-16 at 01:23 -0800, Jeremy Fitzhardinge wrote:
> On 12/16/2011 12:53 AM, Ingo Molnar wrote:
> > * Ingo Molnar <mingo@...e.hu> wrote:
> >
> >> [...]
> >>
> >> The call-chains are still intact for quality backtraces and 
> >> for call-chain profiling (perf record -g), as the backtrace 
> >> walker can deduct the full backtrace from the RIP of a leaf 
> >> function and the parent chain.
> > Hm, noticed one complication while looking at annotated assembly 
> > code in perf top. Code doing function calls from within asm() is 
> > incorrectly marked 'leaf' by GCC:
> >
> > ffffffff812b82d8 <arch_local_save_flags>:
> > ffffffff812b82d8:       ff 14 25 00 d9 c1 81    callq  *0xffffffff81c1d900
> > ffffffff812b82df:       c3                      retq   
> >
> > So all the paravirt details will have to be fixed, so that GCC 
> > is able to see that there's a real function call done inside. 
> > Jeremy, Konrad?
> 
> Um.  So the issue is that a function that contains only pvops looks like
> it's a leaf to gcc and it does some leaf-function optimisation?
> 
> How can we tell gcc the asm contains a call, or otherwise suppress the
> "leaf function" classification?
> 
> The alternative is to just make it a plain C-level indirect call, but
> then we'd lose all the patching and callee-save optimisations.
> 
> Any suggestions?

Added Richard Henderson to CC.

I only found the function __attribute__((leaf)) to explicitly mark a
function as being a leaf function, but the documentation doesn't list
the inverse of that to explicitly mark it as _not_ being one.

I haven't done a git grep on the gcc sources yet since I seem to have
misplaced my gcc.git tree.


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