Re: [PATCH] crypto: vmx - fix copy-paste error in CTR mode

2019-05-15 Thread Daniel Axtens
Eric Biggers writes: > On Thu, May 16, 2019 at 12:12:48PM +1000, Daniel Axtens wrote: >> >> I'm also seeing issues with ghash with the extended tests: >> >> [7.582926] alg: hash: p8_ghash test failed (wrong result) on test vector >> 0, cfg="random: use_final src_divs=[9.72%@+39832, >> 18.

Re: [PATCH] crypto: vmx - fix copy-paste error in CTR mode

2019-05-15 Thread Eric Biggers
On Thu, May 16, 2019 at 12:12:48PM +1000, Daniel Axtens wrote: > > I'm also seeing issues with ghash with the extended tests: > > [7.582926] alg: hash: p8_ghash test failed (wrong result) on test vector > 0, cfg="random: use_final src_divs=[9.72%@+39832, > 18.2%@+65504, 45.57%@alignmask+18,

Re: [PATCH] crypto: vmx - fix copy-paste error in CTR mode

2019-05-15 Thread Daniel Axtens
Daniel Axtens writes: > Herbert Xu writes: > >> On Wed, May 15, 2019 at 03:35:51AM +1000, Daniel Axtens wrote: >>> >>> By all means disable vmx ctr if I don't get an answer to you in a >>> timeframe you are comfortable with, but I am going to at least try to >>> have a look. >> >> I'm happy to g

Re: [PATCH] crypto: vmx - fix copy-paste error in CTR mode

2019-05-14 Thread Daniel Axtens
Herbert Xu writes: > On Wed, May 15, 2019 at 03:35:51AM +1000, Daniel Axtens wrote: >> >> By all means disable vmx ctr if I don't get an answer to you in a >> timeframe you are comfortable with, but I am going to at least try to >> have a look. > > I'm happy to give you guys more time. How much

Re: [PATCH] crypto: vmx - fix copy-paste error in CTR mode

2019-05-14 Thread Herbert Xu
On Wed, May 15, 2019 at 03:35:51AM +1000, Daniel Axtens wrote: > > By all means disable vmx ctr if I don't get an answer to you in a > timeframe you are comfortable with, but I am going to at least try to > have a look. I'm happy to give you guys more time. How much time do you think you will nee

Re: [PATCH] crypto: vmx - fix copy-paste error in CTR mode

2019-05-14 Thread Daniel Axtens
Michael Ellerman writes: > Herbert Xu writes: >> On Mon, May 06, 2019 at 08:53:17AM -0700, Eric Biggers wrote: >>> >>> Any progress on this? Someone just reported this again here: >>> https://bugzilla.kernel.org/show_bug.cgi?id=203515 >> >> Guys if I don't get a fix for this soon I'll have to d

Re: [PATCH] crypto: vmx - fix copy-paste error in CTR mode

2019-05-13 Thread Michael Ellerman
Herbert Xu writes: > On Mon, May 06, 2019 at 08:53:17AM -0700, Eric Biggers wrote: >> >> Any progress on this? Someone just reported this again here: >> https://bugzilla.kernel.org/show_bug.cgi?id=203515 > > Guys if I don't get a fix for this soon I'll have to disable CTR > in vmx. No objection

Re: [PATCH] crypto: vmx - fix copy-paste error in CTR mode

2019-05-12 Thread Herbert Xu
On Mon, May 06, 2019 at 08:53:17AM -0700, Eric Biggers wrote: > > Any progress on this? Someone just reported this again here: > https://bugzilla.kernel.org/show_bug.cgi?id=203515 Guys if I don't get a fix for this soon I'll have to disable CTR in vmx. Cheers, -- Email: Herbert Xu Home Page: h

Re: [PATCH] crypto: vmx - fix copy-paste error in CTR mode

2019-05-06 Thread Eric Biggers
On Sat, Apr 13, 2019 at 01:41:36PM +1000, Michael Ellerman wrote: > Nayna writes: > > > On 04/11/2019 10:47 AM, Daniel Axtens wrote: > >> Eric Biggers writes: > >> > >>> Are you still planning to fix the remaining bug? I booted a ppc64le VM, > >>> and I > >>> see the same test failure (I think

Re: [PATCH] crypto: vmx - fix copy-paste error in CTR mode

2019-04-12 Thread Michael Ellerman
Nayna writes: > On 04/11/2019 10:47 AM, Daniel Axtens wrote: >> Eric Biggers writes: >> >>> Are you still planning to fix the remaining bug? I booted a ppc64le VM, >>> and I >>> see the same test failure (I think) you were referring to: >>> >>> alg: skcipher: p8_aes_ctr encryption test failed

Re: [PATCH] crypto: vmx - fix copy-paste error in CTR mode

2019-04-11 Thread Nayna
On 04/11/2019 10:47 AM, Daniel Axtens wrote: Eric Biggers writes: Are you still planning to fix the remaining bug? I booted a ppc64le VM, and I see the same test failure (I think) you were referring to: alg: skcipher: p8_aes_ctr encryption test failed (wrong result) on test vector 3, cfg=

Re: [PATCH] crypto: vmx - fix copy-paste error in CTR mode

2019-04-11 Thread Daniel Axtens
Eric Biggers writes: > Hi Daniel, > > On Fri, Mar 15, 2019 at 04:23:02PM +1100, Daniel Axtens wrote: >> Eric Biggers writes: >> >> > Hi Daniel, >> > >> > On Fri, Mar 15, 2019 at 03:24:35PM +1100, Daniel Axtens wrote: >> >> Hi Eric, >> >> >> >> >> The original assembly imported from OpenSSL has

Re: [PATCH] crypto: vmx - fix copy-paste error in CTR mode

2019-04-10 Thread Eric Biggers
Hi Daniel, On Fri, Mar 15, 2019 at 04:23:02PM +1100, Daniel Axtens wrote: > Eric Biggers writes: > > > Hi Daniel, > > > > On Fri, Mar 15, 2019 at 03:24:35PM +1100, Daniel Axtens wrote: > >> Hi Eric, > >> > >> >> The original assembly imported from OpenSSL has two copy-paste > >> >> errors in ha

Re: [PATCH] crypto: vmx - fix copy-paste error in CTR mode

2019-03-22 Thread Herbert Xu
On Fri, Mar 15, 2019 at 01:09:01PM +1100, Daniel Axtens wrote: > The original assembly imported from OpenSSL has two copy-paste > errors in handling CTR mode. When dealing with a 2 or 3 block tail, > the code branches to the CBC decryption exit path, rather than to > the CTR exit path. > > This le

Re: [PATCH] crypto: vmx - fix copy-paste error in CTR mode

2019-03-20 Thread Ondrej Mosnáček
Hi Daniel, pi 15. 3. 2019 o 3:09 Daniel Axtens napísal(a): > The original assembly imported from OpenSSL has two copy-paste > errors in handling CTR mode. When dealing with a 2 or 3 block tail, > the code branches to the CBC decryption exit path, rather than to > the CTR exit path. > > This leads

Re: [PATCH] crypto: vmx - fix copy-paste error in CTR mode

2019-03-18 Thread Michael Ellerman
Ard Biesheuvel writes: > On Mon, 18 Mar 2019 at 09:41, Michael Ellerman wrote: ... >> >> I don't understand how the crypto core chooses which crypto_alg to use, >> but I didn't expect enabling the tests to change it? > > This is not entirely unexpected. Based on the tests, algos that are > found

Re: [PATCH] crypto: vmx - fix copy-paste error in CTR mode

2019-03-18 Thread Ard Biesheuvel
On Mon, 18 Mar 2019 at 09:41, Michael Ellerman wrote: > > Eric Biggers writes: > > On Fri, Mar 15, 2019 at 03:24:35PM +1100, Daniel Axtens wrote: > ... > >> >> This leads to corruption of the IV, which leads to subsequent blocks > >> >> being corrupted. > >> >> > >> >> This can be detected with l

Re: [PATCH] crypto: vmx - fix copy-paste error in CTR mode

2019-03-18 Thread Michael Ellerman
Eric Biggers writes: > On Fri, Mar 15, 2019 at 03:24:35PM +1100, Daniel Axtens wrote: ... >> >> This leads to corruption of the IV, which leads to subsequent blocks >> >> being corrupted. >> >> >> >> This can be detected with libkcapi test suite, which is available at >> >> https://github.com/smu

Re: [PATCH] crypto: vmx - fix copy-paste error in CTR mode

2019-03-17 Thread Michael Ellerman
Daniel Axtens writes: > The original assembly imported from OpenSSL has two copy-paste > errors in handling CTR mode. When dealing with a 2 or 3 block tail, > the code branches to the CBC decryption exit path, rather than to > the CTR exit path. > > This leads to corruption of the IV, which leads

Re: [PATCH] crypto: vmx - fix copy-paste error in CTR mode

2019-03-14 Thread Daniel Axtens
Eric Biggers writes: > Hi Daniel, > > On Fri, Mar 15, 2019 at 03:24:35PM +1100, Daniel Axtens wrote: >> Hi Eric, >> >> >> The original assembly imported from OpenSSL has two copy-paste >> >> errors in handling CTR mode. When dealing with a 2 or 3 block tail, >> >> the code branches to the CBC de

Re: [PATCH] crypto: vmx - fix copy-paste error in CTR mode

2019-03-14 Thread Eric Biggers
Hi Daniel, On Fri, Mar 15, 2019 at 03:24:35PM +1100, Daniel Axtens wrote: > Hi Eric, > > >> The original assembly imported from OpenSSL has two copy-paste > >> errors in handling CTR mode. When dealing with a 2 or 3 block tail, > >> the code branches to the CBC decryption exit path, rather than t

Re: [PATCH] crypto: vmx - fix copy-paste error in CTR mode

2019-03-14 Thread Eric Biggers
Hi Daniel, On Fri, Mar 15, 2019 at 01:09:01PM +1100, Daniel Axtens wrote: > The original assembly imported from OpenSSL has two copy-paste > errors in handling CTR mode. When dealing with a 2 or 3 block tail, > the code branches to the CBC decryption exit path, rather than to > the CTR exit path.

Re: [PATCH] crypto: vmx - fix copy-paste error in CTR mode

2019-03-14 Thread Daniel Axtens
Hi Eric, >> The original assembly imported from OpenSSL has two copy-paste >> errors in handling CTR mode. When dealing with a 2 or 3 block tail, >> the code branches to the CBC decryption exit path, rather than to >> the CTR exit path. > > So does this need to be fixed in OpenSSL too? Yes, I'm g