Re: [PATCH] objtool: Detect assembly code falling through to INT3 padding

2018-05-19 Thread hpa
On May 18, 2018 10:51:36 AM PDT, Alexey Dobriyan wrote: >On Fri, May 18, 2018 at 09:18:14AM +0200, Ingo Molnar wrote: >> The concept of built-in kernel tooling working at the machine code >level is just >> so powerful - we should have added our own KCC compiler 20 years ago. > >...for two very se

Re: [PATCH] objtool: Detect assembly code falling through to INT3 padding

2018-05-18 Thread Alexey Dobriyan
On Fri, May 18, 2018 at 09:18:14AM +0200, Ingo Molnar wrote: > The concept of built-in kernel tooling working at the machine code level is > just > so powerful - we should have added our own KCC compiler 20 years ago. ...for two very serious reasons * C as a language moves very slowly, last hel

Re: [PATCH] objtool: Detect assembly code falling through to INT3 padding

2018-05-18 Thread Borislav Petkov
On Fri, May 18, 2018 at 12:27:15AM -0700, H. Peter Anvin wrote: > On 05/18/18 00:18, Ingo Molnar wrote: > > > > Ok, this is cool, it addresses the robustness problem that INT3 padding > > introduced > > very nicely. > > > > The concept of built-in kernel tooling working at the machine code leve

Re: [PATCH] objtool: Detect assembly code falling through to INT3 padding

2018-05-18 Thread Ingo Molnar
* Ingo Molnar wrote: > > * Josh Poimboeuf wrote: > > > With the following commit: > > > > 51bad67ffbce ("x86/asm: Pad assembly functions with INT3 instructions") > > > > ... asm function alignments are padded with INT3, so it's no longer safe > > to fall through to an aligned function. M

Re: [PATCH] objtool: Detect assembly code falling through to INT3 padding

2018-05-18 Thread H. Peter Anvin
On 05/18/18 00:18, Ingo Molnar wrote: > > Ok, this is cool, it addresses the robustness problem that INT3 padding > introduced > very nicely. > > The concept of built-in kernel tooling working at the machine code level is > just > so powerful - we should have added our own KCC compiler 20 yea

Re: [PATCH] objtool: Detect assembly code falling through to INT3 padding

2018-05-18 Thread Ingo Molnar
* Peter Zijlstra wrote: > On Thu, May 17, 2018 at 08:49:34AM -0500, Josh Poimboeuf wrote: > > With the following commit: > > > > 51bad67ffbce ("x86/asm: Pad assembly functions with INT3 instructions") > > > > ... asm function alignments are padded with INT3, so it's no longer safe > > to fal

Re: [PATCH] objtool: Detect assembly code falling through to INT3 padding

2018-05-18 Thread Ingo Molnar
* Josh Poimboeuf wrote: > With the following commit: > > 51bad67ffbce ("x86/asm: Pad assembly functions with INT3 instructions") > > ... asm function alignments are padded with INT3, so it's no longer safe > to fall through to an aligned function. Make sure we catch any such > cases with ob

Re: [PATCH] objtool: Detect assembly code falling through to INT3 padding

2018-05-17 Thread Peter Zijlstra
On Thu, May 17, 2018 at 08:49:34AM -0500, Josh Poimboeuf wrote: > With the following commit: > > 51bad67ffbce ("x86/asm: Pad assembly functions with INT3 instructions") > > ... asm function alignments are padded with INT3, so it's no longer safe > to fall through to an aligned function. Make s