Re: [PATCH v11 03/20] x86/stackvalidate: Compile-time stack validation

2015-08-28 Thread Josh Poimboeuf
On Fri, Aug 28, 2015 at 07:26:23PM +0200, Andi Kleen wrote: > > > BTW how do handle the increasing number of JITs in the kernel? > > > > Yeah, compile-time CFI wouldn't be applicable for code which is > > generated at runtime. Maybe we will need a mechanism to allow eBPF to > > quickly create

Re: [PATCH v11 03/20] x86/stackvalidate: Compile-time stack validation

2015-08-28 Thread Andi Kleen
> I tried to document everything an asm coder would need to know. Also I > have an invested interest in keeping the tool working and useful, and > I'm listed in the MAINTAINERS file. So any frustrated people will know > who to yell at. I find it somewhat ironic that you're proposing to

Re: [PATCH v11 03/20] x86/stackvalidate: Compile-time stack validation

2015-08-28 Thread Andi Kleen
I tried to document everything an asm coder would need to know. Also I have an invested interest in keeping the tool working and useful, and I'm listed in the MAINTAINERS file. So any frustrated people will know who to yell at. I find it somewhat ironic that you're proposing to simplifying

Re: [PATCH v11 03/20] x86/stackvalidate: Compile-time stack validation

2015-08-28 Thread Josh Poimboeuf
On Fri, Aug 28, 2015 at 07:26:23PM +0200, Andi Kleen wrote: BTW how do handle the increasing number of JITs in the kernel? Yeah, compile-time CFI wouldn't be applicable for code which is generated at runtime. Maybe we will need a mechanism to allow eBPF to quickly create minimal

Re: [PATCH v11 03/20] x86/stackvalidate: Compile-time stack validation

2015-08-27 Thread Josh Poimboeuf
On Wed, Aug 26, 2015 at 04:26:28PM +0200, Andi Kleen wrote: > > b) 100% reliable stack traces for DWARF enabled kernels > > > >This is not yet implemented. See Documentation/stack-validation.txt > >for more details about what is planned. > > The automatic CFI generation tool seems like

Re: [PATCH v11 03/20] x86/stackvalidate: Compile-time stack validation

2015-08-27 Thread Josh Poimboeuf
On Wed, Aug 26, 2015 at 04:26:28PM +0200, Andi Kleen wrote: b) 100% reliable stack traces for DWARF enabled kernels This is not yet implemented. See Documentation/stack-validation.txt for more details about what is planned. The automatic CFI generation tool seems like a bad idea

Re: [PATCH v11 03/20] x86/stackvalidate: Compile-time stack validation

2015-08-26 Thread Andi Kleen
> b) 100% reliable stack traces for DWARF enabled kernels > >This is not yet implemented. See Documentation/stack-validation.txt >for more details about what is planned. The automatic CFI generation tool seems like a bad idea to me. There's not that much assembler code in Linux, and

Re: [PATCH v11 03/20] x86/stackvalidate: Compile-time stack validation

2015-08-26 Thread Andi Kleen
b) 100% reliable stack traces for DWARF enabled kernels This is not yet implemented. See Documentation/stack-validation.txt for more details about what is planned. The automatic CFI generation tool seems like a bad idea to me. There's not that much assembler code in Linux, and often

[PATCH v11 03/20] x86/stackvalidate: Compile-time stack validation

2015-08-24 Thread Josh Poimboeuf
This adds a CONFIG_STACK_VALIDATION option which enables a host tool named stackvalidate which runs at compile time. It analyzes every .o file and ensures the validity of its stack metadata. It enforces a set of rules on asm code and C inline assembly code so that stack traces can be reliable.

[PATCH v11 03/20] x86/stackvalidate: Compile-time stack validation

2015-08-24 Thread Josh Poimboeuf
This adds a CONFIG_STACK_VALIDATION option which enables a host tool named stackvalidate which runs at compile time. It analyzes every .o file and ensures the validity of its stack metadata. It enforces a set of rules on asm code and C inline assembly code so that stack traces can be reliable.