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

2015-07-22 Thread Josh Poimboeuf
On Mon, Jul 20, 2015 at 01:00:06PM -0500, Josh Poimboeuf wrote: > On Mon, Jul 20, 2015 at 07:21:24PM +0200, Ingo Molnar wrote: > > * Josh Poimboeuf wrote: > > Ok, I see how the naming scheme I proposed won't work with all that very > > well, but > > I'd still suggest using consistently named pat

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

2015-07-21 Thread Josh Poimboeuf
On Tue, Jul 21, 2015 at 10:00:16AM +0200, Ingo Molnar wrote: > > * Josh Poimboeuf wrote: > > > On Mon, Jul 20, 2015 at 08:30:52AM -0700, Andy Lutomirski wrote: > > > On Fri, Jul 17, 2015 at 8:56 PM, Josh Poimboeuf > > > wrote: > > > > The reason I suggested to put FRAME in the macro name is to

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

2015-07-21 Thread Ingo Molnar
* Josh Poimboeuf wrote: > On Mon, Jul 20, 2015 at 08:30:52AM -0700, Andy Lutomirski wrote: > > On Fri, Jul 17, 2015 at 8:56 PM, Josh Poimboeuf wrote: > > > The reason I suggested to put FRAME in the macro name is to try to > > > prevent it from being accidentally used for leaf functions, where

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

2015-07-20 Thread Josh Poimboeuf
On Mon, Jul 20, 2015 at 07:21:24PM +0200, Ingo Molnar wrote: > * Josh Poimboeuf wrote: > > On Mon, Jul 20, 2015 at 09:56:11AM +0200, Ingo Molnar wrote: > > I should point out that there are still a few cases where the more granular > > FRAME/ENDFRAME and ENTRY/ENDPROC macros would still be needed

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

2015-07-20 Thread Ingo Molnar
* Josh Poimboeuf wrote: > On Mon, Jul 20, 2015 at 09:56:11AM +0200, Ingo Molnar wrote: > > > > > > The reason I suggested to put FRAME in the macro name is to try to > > > prevent it > > > from being accidentally used for leaf functions, where it isn't needed. > > > > Well, we could use LEAF

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

2015-07-20 Thread Josh Poimboeuf
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 cas

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

2015-07-20 Thread Peter Zijlstra
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

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

2015-07-20 Thread Josh Poimboeuf
On Mon, Jul 20, 2015 at 08:30:52AM -0700, Andy Lutomirski wrote: > On Fri, Jul 17, 2015 at 8:56 PM, Josh Poimboeuf wrote: > > The reason I suggested to put FRAME in the macro name is to try to > > prevent it from being accidentally used for leaf functions, where it > > isn't needed. > > > > Could

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

2015-07-20 Thread Andy Lutomirski
On Fri, Jul 17, 2015 at 8:56 PM, Josh Poimboeuf wrote: > The reason I suggested to put FRAME in the macro name is to try to > prevent it from being accidentally used for leaf functions, where it > isn't needed. > Could someone remind me why it isn't needed for leaf functions? --Andy -- To unsubs

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

2015-07-20 Thread Josh Poimboeuf
On Mon, Jul 20, 2015 at 09:56:11AM +0200, Ingo Molnar wrote: > > > > The reason I suggested to put FRAME in the macro name is to try to prevent > > it > > from being accidentally used for leaf functions, where it isn't needed. > > Well, we could use LEAF_FUNCTION to mark that fact. > > Wether

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

2015-07-20 Thread Ingo Molnar
* Josh Poimboeuf wrote: > On Sat, Jul 18, 2015 at 04:51:16AM +0200, Ingo Molnar wrote: > > Note what the names _don't_ contain: that we generate debug info! That fact > > is not > > present in the naming, and that's very much intentional, because the > > precise form > > of debug info is con

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

2015-07-18 Thread Gustavo da Silva
Hi, brothers. I was reading the e-mails about the topic, and I have a simple suggestion: FRAMED_FUNCTION_ENTRYPOINT(xyz) ... FRAMED_FUNCTION_RETPOINT(xyz) -- Atenciosamente, Gustavo da Silva. (Brazil) > On Sat, Jul 18, 2015 at 04:25:25PM +0200, Borislav Petkov wrote: > > On Sat, Jul 18, 2015 a

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

2015-07-18 Thread Josh Poimboeuf
On Sat, Jul 18, 2015 at 04:25:25PM +0200, Borislav Petkov wrote: > On Sat, Jul 18, 2015 at 08:46:55AM -0500, Josh Poimboeuf wrote: > > I like the balance, but the "ret" is still non-obvious. > > Does it have to be obvious? I feel that making "ret" obvious is better. But if somebody messes up and

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

2015-07-18 Thread Borislav Petkov
On Sat, Jul 18, 2015 at 08:46:55AM -0500, Josh Poimboeuf wrote: > I like the balance, but the "ret" is still non-obvious. Does it have to be obvious? -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply. -- -- To unsubscribe from this list: send the line "unsubscribe linux-

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

2015-07-18 Thread Josh Poimboeuf
On Sat, Jul 18, 2015 at 10:42:36AM +0200, Borislav Petkov wrote: > On Fri, Jul 17, 2015 at 04:10:19PM -0500, Josh Poimboeuf wrote: > > Actually I'm not done painting. Personally it seems a little too > > verbose. I still like ENTRY_FRAME and ENDPROC_FRAME_RETURN :p > > Let's balance it out even

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

2015-07-18 Thread Borislav Petkov
On Fri, Jul 17, 2015 at 04:10:19PM -0500, Josh Poimboeuf wrote: > Actually I'm not done painting. Personally it seems a little too > verbose. I still like ENTRY_FRAME and ENDPROC_FRAME_RETURN :p Let's balance it out even more: ENTRY_FRAME(..) ... ENDPROC_FRAME(..) -- Regards/Gruss,

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

2015-07-17 Thread Josh Poimboeuf
On Sat, Jul 18, 2015 at 04:51:16AM +0200, Ingo Molnar wrote: > Note what the names _don't_ contain: that we generate debug info! That fact > is not > present in the naming, and that's very much intentional, because the precise > form > of debug info is conditional: > > - if CONFIG_FRAME_POIN

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

2015-07-17 Thread Ingo Molnar
* Josh Poimboeuf wrote: > On Fri, Jul 17, 2015 at 12:44:42PM -0700, Andy Lutomirski wrote: > > On Fri, Jul 17, 2015 at 12:43 PM, Ingo Molnar wrote: > > > > > > * Josh Poimboeuf wrote: > > > > > >> ENTRY(aesni_set_key) > > >> + FRAME > > >> #ifndef __x86_64__ > > >> pushl KEYP > > >

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

2015-07-17 Thread Josh Poimboeuf
On Fri, Jul 17, 2015 at 02:01:33PM -0700, Andy Lutomirski wrote: > On Fri, Jul 17, 2015 at 1:59 PM, Josh Poimboeuf wrote: > > On Fri, Jul 17, 2015 at 01:46:39PM -0700, Andy Lutomirski wrote: > >> On Fri, Jul 17, 2015 at 1:44 PM, Josh Poimboeuf > >> wrote: > >> > On Fri, Jul 17, 2015 at 01:39:09P

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

2015-07-17 Thread Andy Lutomirski
On Fri, Jul 17, 2015 at 1:59 PM, Josh Poimboeuf wrote: > On Fri, Jul 17, 2015 at 01:46:39PM -0700, Andy Lutomirski wrote: >> On Fri, Jul 17, 2015 at 1:44 PM, Josh Poimboeuf wrote: >> > On Fri, Jul 17, 2015 at 01:39:09PM -0700, Andy Lutomirski wrote: >> >> On Fri, Jul 17, 2015 at 1:37 PM, Josh Poi

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

2015-07-17 Thread Josh Poimboeuf
On Fri, Jul 17, 2015 at 01:46:39PM -0700, Andy Lutomirski wrote: > On Fri, Jul 17, 2015 at 1:44 PM, Josh Poimboeuf wrote: > > On Fri, Jul 17, 2015 at 01:39:09PM -0700, Andy Lutomirski wrote: > >> On Fri, Jul 17, 2015 at 1:37 PM, Josh Poimboeuf > >> wrote: > >> > On Fri, Jul 17, 2015 at 12:44:42P

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

2015-07-17 Thread Andy Lutomirski
On Fri, Jul 17, 2015 at 1:44 PM, Josh Poimboeuf wrote: > On Fri, Jul 17, 2015 at 01:39:09PM -0700, Andy Lutomirski wrote: >> On Fri, Jul 17, 2015 at 1:37 PM, Josh Poimboeuf wrote: >> > On Fri, Jul 17, 2015 at 12:44:42PM -0700, Andy Lutomirski wrote: >> >> On Fri, Jul 17, 2015 at 12:43 PM, Ingo Mo

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

2015-07-17 Thread Josh Poimboeuf
On Fri, Jul 17, 2015 at 01:39:09PM -0700, Andy Lutomirski wrote: > On Fri, Jul 17, 2015 at 1:37 PM, Josh Poimboeuf wrote: > > On Fri, Jul 17, 2015 at 12:44:42PM -0700, Andy Lutomirski wrote: > >> On Fri, Jul 17, 2015 at 12:43 PM, Ingo Molnar wrote: > >> > > >> > * Josh Poimboeuf wrote: > >> > >

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

2015-07-17 Thread Andy Lutomirski
On Fri, Jul 17, 2015 at 1:37 PM, Josh Poimboeuf wrote: > On Fri, Jul 17, 2015 at 12:44:42PM -0700, Andy Lutomirski wrote: >> On Fri, Jul 17, 2015 at 12:43 PM, Ingo Molnar wrote: >> > >> > * Josh Poimboeuf wrote: >> > >> >> ENTRY(aesni_set_key) >> >> + FRAME >> >> #ifndef __x86_64__ >> >>

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

2015-07-17 Thread Josh Poimboeuf
On Fri, Jul 17, 2015 at 12:44:42PM -0700, Andy Lutomirski wrote: > On Fri, Jul 17, 2015 at 12:43 PM, Ingo Molnar wrote: > > > > * Josh Poimboeuf wrote: > > > >> ENTRY(aesni_set_key) > >> + FRAME > >> #ifndef __x86_64__ > >> pushl KEYP > >> movl 8(%esp), KEYP # ctx >

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

2015-07-17 Thread Andy Lutomirski
On Fri, Jul 17, 2015 at 12:43 PM, Ingo Molnar wrote: > > * Josh Poimboeuf wrote: > >> ENTRY(aesni_set_key) >> + FRAME >> #ifndef __x86_64__ >> pushl KEYP >> movl 8(%esp), KEYP # ctx >> @@ -1905,6 +1907,7 @@ ENTRY(aesni_set_key) >> #ifndef __x86_64__ >> popl K

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

2015-07-17 Thread Ingo Molnar
* Josh Poimboeuf wrote: > ENTRY(aesni_set_key) > + FRAME > #ifndef __x86_64__ > pushl KEYP > movl 8(%esp), KEYP # ctx > @@ -1905,6 +1907,7 @@ ENTRY(aesni_set_key) > #ifndef __x86_64__ > popl KEYP > #endif > + ENDFRAME > ret > ENDPROC(aesni_set_ke

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

2015-07-17 Thread Josh Poimboeuf
aesni-intel_asm.S has several callable non-leaf functions which don't honor CONFIG_FRAME_POINTER, which can result in bad stack traces. Create stack frames for them when CONFIG_FRAME_POINTER is enabled. Signed-off-by: Josh Poimboeuf --- arch/x86/crypto/aesni-intel_asm.S | 19 +++