Re: [PATCH] x86/crypto: Add missing RETs

2018-07-06 Thread Ingo Molnar
* Josh Poimboeuf wrote: > > Great, I'd be perfectly fine with such an approach. > > > > Also, if we have that then we could re-apply Alexey's patch and switch to > > INT3 > > (only on 64-bit kernels) without any trouble, because objtool should detect > > any > > execution flow bugs before

Re: [PATCH] x86/crypto: Add missing RETs

2018-07-06 Thread Josh Poimboeuf
On Thu, Jul 05, 2018 at 09:58:15AM +0200, Ingo Molnar wrote: > > * Josh Poimboeuf wrote: > > > > So that's still incomplete in that doesn't analyze the 32-bit build yet, > > > right? > > > > We could do INT3s on 64-bit and NOPs on 32-bit. > > > > Or, possibly even better, we could just keep N

Re: [PATCH] x86/crypto: Add missing RETs

2018-07-05 Thread Ingo Molnar
* Josh Poimboeuf wrote: > > So that's still incomplete in that doesn't analyze the 32-bit build yet, > > right? > > We could do INT3s on 64-bit and NOPs on 32-bit. > > Or, possibly even better, we could just keep NOPs everywhere and instead > make objtool smart enough to detect function fall

Re: [PATCH] x86/crypto: Add missing RETs

2018-07-01 Thread Herbert Xu
On Sun, Jul 01, 2018 at 05:24:39PM +0200, Ondrej Mosnáček wrote: > > I can see you applied this patch to your cryptodev-2.6 tree (which I > believe is for the next release). Shouldn't this go into the > crypto-2.6 tree so it gets into 4.18-rcX? I'm not sure, but it seems > to me that it qualifies a

Re: [PATCH] x86/crypto: Add missing RETs

2018-07-01 Thread Ondrej Mosnáček
ne 1. 7. 2018 o 15:20 Herbert Xu napísal(a): > > On Sat, Jun 23, 2018 at 12:36:22PM +0200, Borislav Petkov wrote: > > Lemme send a proper patch now... > > > > --- > > From: Borislav Petkov > > Date: Sun, 17 Jun 2018 13:57:42 +0200 > > Subject: [PATCH

Re: [PATCH] x86/crypto: Add missing RETs

2018-07-01 Thread Herbert Xu
On Sat, Jun 23, 2018 at 12:36:22PM +0200, Borislav Petkov wrote: > Lemme send a proper patch now... > > --- > From: Borislav Petkov > Date: Sun, 17 Jun 2018 13:57:42 +0200 > Subject: [PATCH] x86/crypto: Add missing RETs > > Add explicit RETs to the tail calls o

Re: [PATCH] x86/crypto: Add missing RETs

2018-06-26 Thread Josh Poimboeuf
On Tue, Jun 26, 2018 at 08:49:30AM +0200, Ingo Molnar wrote: > > * Josh Poimboeuf wrote: > > > On Mon, Jun 25, 2018 at 09:24:38AM +0200, Ingo Molnar wrote: > > > > > > * Alexey Dobriyan wrote: > > > > > > > On Sun, Jun 24, 2018 at 09:11:05AM +0200, Ingo Molnar wrote: > > > > > > Add explicit

Re: [PATCH] x86/crypto: Add missing RETs

2018-06-25 Thread Ingo Molnar
* Josh Poimboeuf wrote: > On Mon, Jun 25, 2018 at 09:24:38AM +0200, Ingo Molnar wrote: > > > > * Alexey Dobriyan wrote: > > > > > On Sun, Jun 24, 2018 at 09:11:05AM +0200, Ingo Molnar wrote: > > > > > Add explicit RETs to the tail calls of AEGIS and MORUS crypto > > > > > algorithms > > > >

Re: [PATCH] x86/crypto: Add missing RETs

2018-06-25 Thread Josh Poimboeuf
On Mon, Jun 25, 2018 at 09:24:38AM +0200, Ingo Molnar wrote: > > * Alexey Dobriyan wrote: > > > On Sun, Jun 24, 2018 at 09:11:05AM +0200, Ingo Molnar wrote: > > > > Add explicit RETs to the tail calls of AEGIS and MORUS crypto algorithms > > > > otherwise they run into INT3 padding due to > > >

Re: [PATCH] x86/crypto: Add missing RETs

2018-06-25 Thread Ingo Molnar
* Alexey Dobriyan wrote: > On Sun, Jun 24, 2018 at 09:11:05AM +0200, Ingo Molnar wrote: > > > Add explicit RETs to the tail calls of AEGIS and MORUS crypto algorithms > > > otherwise they run into INT3 padding due to > > > > > > 51bad67ffbce ("x86/asm: Pad assembly functions with INT3 instru

Re: [PATCH] x86/crypto: Add missing RETs

2018-06-24 Thread Alexey Dobriyan
On Sun, Jun 24, 2018 at 09:11:05AM +0200, Ingo Molnar wrote: > > Add explicit RETs to the tail calls of AEGIS and MORUS crypto algorithms > > otherwise they run into INT3 padding due to > > > > 51bad67ffbce ("x86/asm: Pad assembly functions with INT3 instructions") > > > > leading to spurious d

Re: [PATCH] x86/crypto: Add missing RETs

2018-06-24 Thread Borislav Petkov
On Sun, Jun 24, 2018 at 09:12:35AM +0200, Thomas Gleixner wrote: > We should really have something like that exactly to catch cases like this. Sounds like a good use case for the snake language. -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply.

Re: [PATCH] x86/crypto: Add missing RETs

2018-06-24 Thread Thomas Gleixner
On Sun, 24 Jun 2018, Ingo Molnar wrote: > * Borislav Petkov wrote: > > > Lemme send a proper patch now... > > > > --- > > From: Borislav Petkov > > Date: Sun, 17 Jun 2018 13:57:42 +0200 > > Subject: [PATCH] x86/crypto: Add missing RETs > > >

Re: [PATCH] x86/crypto: Add missing RETs

2018-06-24 Thread Ingo Molnar
* Borislav Petkov wrote: > Lemme send a proper patch now... > > --- > From: Borislav Petkov > Date: Sun, 17 Jun 2018 13:57:42 +0200 > Subject: [PATCH] x86/crypto: Add missing RETs > > Add explicit RETs to the tail calls of AEGIS and MORUS crypto algorithms > o

Re: [PATCH] x86/crypto: Add missing RETs

2018-06-23 Thread Ondrej Mosnáček
so 23. 6. 2018 o 12:36 Borislav Petkov napísal(a): > > Lemme send a proper patch now... > > --- > From: Borislav Petkov > Date: Sun, 17 Jun 2018 13:57:42 +0200 > Subject: [PATCH] x86/crypto: Add missing RETs > > Add explicit RETs to the tail calls of AEGIS and MORUS cr

[PATCH] x86/crypto: Add missing RETs

2018-06-23 Thread Borislav Petkov
Lemme send a proper patch now... --- From: Borislav Petkov Date: Sun, 17 Jun 2018 13:57:42 +0200 Subject: [PATCH] x86/crypto: Add missing RETs Add explicit RETs to the tail calls of AEGIS and MORUS crypto algorithms otherwise they run into INT3 padding due to 51bad67ffbce ("x86/asm