Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1188382 > unrolled thread

Re: [RFC PATCH 13/21] x86/asm/crypto: Fix frame pointer usage in aesni-intel_asm.S

Started byJosh Poimboeuf <jpoimboe@redhat.com>
First post2015-07-20 19:20 +0200
Last post2015-07-20 19:20 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [RFC PATCH 13/21] x86/asm/crypto: Fix frame pointer usage in  aesni-intel_asm.S Josh Poimboeuf <jpoimboe@redhat.com> - 2015-07-20 19:20 +0200

#1188382 — Re: [RFC PATCH 13/21] x86/asm/crypto: Fix frame pointer usage in aesni-intel_asm.S

FromJosh Poimboeuf <jpoimboe@redhat.com>
Date2015-07-20 19:20 +0200
SubjectRe: [RFC PATCH 13/21] x86/asm/crypto: Fix frame pointer usage in aesni-intel_asm.S
Message-ID<pOmTo-7FW-9@gated-at.bofh.it>
On Mon, Jul 20, 2015 at 06:52:32PM +0200, Peter Zijlstra wrote:
> On Mon, Jul 20, 2015 at 11:36:46AM -0500, Josh Poimboeuf wrote:
> > If a function doesn't call any other functions, then it won't ever show
> > up in a stack trace unless:
> > 
> > a) the function itself walks the stack, in which case the frame pointer
> >    isn't necessary; or
> > 
> > b) The function gets hit by an interrupt/exception, in which case frame
> >    pointers can't be 100% relied upon anyway.
> 
> In case the interrupt happens whilst setting up the frame, right?

Right.

> > I've noticed that gcc *does* seem to create stack frames for leaf
> > functions.  But it's inconsistent, because the early exit path of some
> > functions will skip the stack frame creation and go straight to the
> > return.
> > 
> > We could probably get a good performance boost with the
> > -momit-leaf-frame-pointer flag.  Though it would make stack traces less
> > reliable when a leaf function gets interrupted.
> 
> So the information we'd loose in that case would be the location in the
> calling function, right?

Right.

> Which isn't a problem, if the current function (as obtained
> through RIP) is only ever called once. However if there's multiple call
> sites this might be a wee bit confusing.

Agreed, though the stack dump code always prints '?' for any kernel
address it finds on the stack.  So there would still be a good clue.


-- 
Josh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web