Re: [PATCH 3/5] crypto: testmgr - Improve compression/decompression test

2018-06-29 Thread Jan Glauber
Hi Eric, sorry for my late response. On Fri, Jun 22, 2018 at 08:12:26PM -0700, Eric Biggers wrote: > Hi Jan, > > On Fri, Jun 22, 2018 at 04:37:20PM +0200, Jan Glauber wrote: > > While commit 336073840a87 ("crypto: testmgr - Allow different compression > > results

Re: [PATCH 4/5] crypto: testmgr - Add test vectors for LZS compression

2018-06-23 Thread Jan Glauber
On Fri, Jun 22, 2018 at 07:50:02PM -0700, Eric Biggers wrote: > Hi Jan, > > On Fri, Jun 22, 2018 at 04:37:21PM +0200, Jan Glauber wrote: > > The test vectors were generated using the ThunderX ZIP coprocessor. > > > > Signed-off-by: Jan Glauber > &g

[PATCH 3/5] crypto: testmgr - Improve compression/decompression test

2018-06-22 Thread Jan Glauber
d the same bytes the test would still pass. Improve the compression test by using the generic variant (if available) to decompress the compressed test vector from the non-generic algorithm. Suggested-by: Herbert Xu Signed-off-by: Jan Glauber --- crypto/testmgr.c | 23 ++- 1

[PATCH 4/5] crypto: testmgr - Add test vectors for LZS compression

2018-06-22 Thread Jan Glauber
The test vectors were generated using the ThunderX ZIP coprocessor. Signed-off-by: Jan Glauber --- crypto/testmgr.c | 9 ++ crypto/testmgr.h | 77 2 files changed, 86 insertions(+) diff --git a/crypto/testmgr.c b/crypto/testmgr.c index

[PATCH 0/5] Improve crypto compression tests

2018-06-22 Thread Jan Glauber
that could use the mixed test. Jan Glauber (5): crypto: deflate - Rename to generic crypto: thunderx_zip - Add driver names and module aliases crypto: testmgr - Improve compression/decompression test crypto: testmgr - Add test vectors for LZS compression crypto: thunderx_zip - Make functions

[PATCH 2/5] crypto: thunderx_zip - Add driver names and module aliases

2018-06-22 Thread Jan Glauber
Add missing cra_driver_name's and module aliases for deflate and lzs. Signed-off-by: Jan Glauber --- drivers/crypto/cavium/zip/zip_main.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/cavium/zip/zip_main.c b/drivers/crypto/cavium/zip/zip_main.c

[PATCH 5/5] crypto: thunderx_zip - Make functions static

2018-06-22 Thread Jan Glauber
Make functions static where possible, found by sparse. Signed-off-by: Jan Glauber --- drivers/crypto/cavium/zip/zip_crypto.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/crypto/cavium/zip/zip_crypto.c b/drivers/crypto/cavium/zip/zip_crypto.c

[PATCH 1/5] crypto: deflate - Rename to generic

2018-06-22 Thread Jan Glauber
Rename deflate -> deflate_generic and add the default priority of 100. Signed-off-by: Jan Glauber --- crypto/Makefile | 2 +- crypto/{deflate.c => deflate_generic.c} | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) rename crypto/{deflate.c => deflate_

Re: [PATCH] crypto: testmgr: Allow different compression results

2018-04-19 Thread Jan Glauber
On Thu, Apr 19, 2018 at 11:42:11AM +0800, Herbert Xu wrote: > On Wed, Apr 11, 2018 at 08:28:32PM +0200, Jan Glauber wrote: > > > > @@ -1362,7 +1373,17 @@ static int test_comp(struct crypto_comp *tfm, > > goto out; > > } > > > &

[PATCH] crypto: testmgr: Allow different compression results

2018-04-11 Thread Jan Glauber
test. Do something similar for test_comp(). Signed-off-by: Mahipal Challa <mcha...@cavium.com> Signed-off-by: Balakrishna Bhamidipati <bbhamidip...@cavium.com> [jglau...@cavium.com: removed unrelated printk changes, rewrote commit msg, fixed whitespace and unneeded initialization] Signe

[PATCH v2 1/5] crypto: thunderx_zip: Fix fallout from CONFIG_VMAP_STACK

2018-04-09 Thread Jan Glauber
forever for the completion byte to contain a non-zero value. Allocating the result struct from 1:1 mapped memory resolves this bug. Signed-off-by: Jan Glauber <jglau...@cavium.com> Reviewed-by: Robert Richter <rrich...@cavium.com> Cc: stable <sta...@vger.kernel.org> # 4.14 --- dri

[PATCH v2 0/5] ThunderX ZIP driver bug fixes

2018-04-09 Thread Jan Glauber
Some bug fixes for this driver after it stopped working with virtual mapped stacks. I think the first two patches qualify for stable. Jan Glauber (5): crypto: thunderx_zip: Fix fallout from CONFIG_VMAP_STACK crypto: thunderx_zip: Limit result reading attempts crypto: thunderx_zip: Prevent

[PATCH v2 5/5] crypto: thunderx_zip: Fix smp_processor_id() warnings

2018-04-09 Thread Jan Glauber
will occur but everything will continue to work, so just ignore it. Signed-off-by: Jan Glauber <jglau...@cavium.com> Reviewed-by: Robert Richter <rrich...@cavium.com> --- drivers/crypto/cavium/zip/zip_device.c | 4 ++-- drivers/crypto/cavium/zip/zip_main.c | 2 +- 2 files changed, 3 inse

[PATCH v2 4/5] crypto: thunderx_zip: Fix statistics pending request value

2018-04-09 Thread Jan Glauber
The pending request counter was read from the wrong register. While at it, there is no need to use an atomic for it as it is only read localy in a loop. Signed-off-by: Jan Glauber <jglau...@cavium.com> Reviewed-by: Robert Richter <rrich...@cavium.com> --- drivers/crypto/cavium/zi

[PATCH v2 3/5] crypto: thunderx_zip: Prevent division by zero

2018-04-09 Thread Jan Glauber
Avoid two potential divisions by zero when calculating average values for the zip statistics. Signed-off-by: Jan Glauber <jglau...@cavium.com> Reviewed-by: Robert Richter <rrich...@cavium.com> --- drivers/crypto/cavium/zip/zip_main.c | 9 + 1 file changed, 5 insertions(+),

[PATCH v2 2/5] crypto: thunderx_zip: Limit result reading attempts

2018-04-09 Thread Jan Glauber
and a small delay between the reading attempts. Signed-off-by: Jan Glauber <jglau...@cavium.com> Reviewed-by: Robert Richter <rrich...@cavium.com> Cc: stable <sta...@vger.kernel.org> # 4.14 --- drivers/crypto/cavium/zip/common.h | 21 + drivers/crypto/cavium/zip/

Re: [PATCH 1/2] crypto: thunderx_zip: Fix fallout from CONFIG_VMAP_STACK

2018-04-05 Thread Jan Glauber
On Wed, Mar 28, 2018 at 03:05:56PM +0200, Jan Glauber wrote: > Enabling virtual mapped kernel stacks breaks the thunderx_zip > driver. On compression or decompression the executing CPU hangs > in an endless loop. The reason for this is the usage of __pa > by the driver which does no

[PATCH 1/2] crypto: thunderx_zip: Fix fallout from CONFIG_VMAP_STACK

2018-03-28 Thread Jan Glauber
forever for the completion byte to contain a non-zero value. Allocating the result struct from 1:1 mapped memory resolves this bug. Signed-off-by: Jan Glauber <jglau...@cavium.com> Reviewed-by: Robert Richter <rrich...@cavium.com> Cc: stable <sta...@vger.kernel.org> # 4.14 --- dri

[PATCH 2/2] crypto: thunderx_zip: Limit result reading attempts

2018-03-28 Thread Jan Glauber
and a small delay between the reading attempts. Signed-off-by: Jan Glauber <jglau...@cavium.com> Reviewed-by: Robert Richter <rrich...@cavium.com> Cc: stable <sta...@vger.kernel.org> # 4.14 --- drivers/crypto/cavium/zip/common.h | 22 ++ drivers/crypto/cavium/zip/

Re: Poor RNG performance on Ryzen

2017-07-25 Thread Jan Glauber
On Sat, Jul 22, 2017 at 02:16:41PM -0400, Theodore Ts'o wrote: > On Fri, Jul 21, 2017 at 04:55:12PM +0200, Oliver Mangold wrote: > > On 21.07.2017 16:47, Theodore Ts'o wrote: > > > On Fri, Jul 21, 2017 at 01:39:13PM +0200, Oliver Mangold wrote: > > > > Better, but obviously there is still much

Re: Poor RNG performance on Ryzen

2017-07-21 Thread Jan Glauber
On Fri, Jul 21, 2017 at 09:12:01AM +0200, Oliver Mangold wrote: > Hi, > > I was wondering why reading from /dev/urandom is much slower on > Ryzen than on Intel, and did some analysis. It turns out that the > RDRAND instruction is at fault, which takes much longer on AMD. > > if I read this

Re: [RFC PATCH 1/3] crypto: zip - Add ThunderX ZIP driver core

2016-12-19 Thread Jan Glauber
, Corentin Labbe wrote: > Hello > > I have some comment below > > On Mon, Dec 12, 2016 at 04:04:37PM +0100, Jan Glauber wrote: > > From: Mahipal Challa <mahipal.cha...@cavium.com> > > > [...] > > --- a/drivers/crypto/Makefile > > +++ b/d

[RFC PATCH 1/3] crypto: zip - Add ThunderX ZIP driver core

2016-12-12 Thread Jan Glauber
Vishnu Nair <vishnu.n...@cavium.com> Signed-off-by: Jan Glauber <jglau...@cavium.com> --- drivers/crypto/Kconfig |7 + drivers/crypto/Makefile|1 + drivers/crypto/cavium/Makefile |4 + drivers/crypto/cavium/zip/Makefile |8 + d

[RFC PATCH 2/3] crypto: zip - Wire-up Compression / decompression HW offload

2016-12-12 Thread Jan Glauber
From: Mahipal Challa <mahipal.cha...@cavium.com> This contains changes for adding compression/decompression h/w offload functionality for both DEFLATE and LZS. Signed-off-by: Mahipal Challa <mahipal.cha...@cavium.com> Signed-off-by: Vishnu Nair <vishnu.n...@cavium.com> Signed-o

[RFC PATCH 3/3] crypto: zip - Add Compression/decompression statistics

2016-12-12 Thread Jan Glauber
From: Mahipal Challa <mahipal.cha...@cavium.com> Add statistics for compression/decompression hardware offload under debugfs. Signed-off-by: Mahipal Challa <mahipal.cha...@cavium.com> Signed-off-by: Vishnu Nair <vishnu.n...@cavium.com> Signed-off-by: Jan Glauber &l

[RFC PATCH 0/3] Cavium ThunderX ZIP driver

2016-12-12 Thread Jan Glauber
Hi Herbert, this series adds support for hardware accelerated compression & decompression as found on ThunderX (arm64) SOCs. I've been reviewing this driver internally for some time and would like to get feedback on the RFC to see if this goes into the right direction and to see if there are any

Re: crypto: s390 - Fix aes-cbc IV corruption

2013-11-14 Thread Jan Glauber
On Thu, Oct 31, 2013 at 11:25:47AM +0800, Herbert Xu wrote: Hi: Hi Herbert, just seen this as my old email address is dead... Your patch looks fine as it keeps the iv and the key together as required by the instruction. However, I'm curious how this could be racy with threads. The encryption

Re: [PATCH 14/14] crypto: arch/s390 - cleanup - remove unneeded cra_list initialization

2012-07-12 Thread Jan Glauber
(). Therefore perform cleanup to remove all unneeded initializations of this field in 'arch/s390/crypto/' Cc: Jan Glauber j...@de.ibm.com Cc: Gerald Schaefer gerald.schae...@de.ibm.com Cc: linux-s...@vger.kernel.org Signed-off-by: Jussi Kivilinna jussi.kivili...@mbnet.fi Signed-off-by: Jan

[RFC] Generic crypto counters

2012-06-15 Thread Jan Glauber
Hi Herbert, I've noticed that the powerpc folks were able to sneak counters for their hardware crypto implementation into upstream [1]. Simple counters for the number of processed bytes per algorithm is something which I wanted to have for some time now. The reason is that its not obvious to

[PATCH] s390: support hardware accelerated SHA-224

2011-06-29 Thread Jan Glauber
On recent s390 machines hardware acceleration is available for SHA-256. SHA-224 is based on SHA-256 so it can also be accelerated by hardware. Do this by adding the proper algorithm description and initialization. Signed-off-by: Jan Glauber j...@linux.vnet.ibm.com --- arch/s390/crypto

Re: [PATCH 4/8] s390: add System z hardware support for CTR mode

2011-05-04 Thread Jan Glauber
On Wed, 2011-05-04 at 15:10 +1000, Herbert Xu wrote: On Wed, Apr 27, 2011 at 08:40:04PM +1000, Herbert Xu wrote: On Wed, Apr 27, 2011 at 12:37:20PM +0200, Jan Glauber wrote: This hunk is a left-over from development in the XTS patch and superfluous so it should be removed. Should I

[PATCH] s390: add fallback for unsupported XTS-384 mode

2011-04-21 Thread Jan Glauber
Hi Herbert, this is the fallback code for XTS. It should fit on top of the s390 series. thanks, Jan - From: Jan Glauber j...@linux.vnet.ibm.com The z196 XTS acceleration only supports the two official XTS modes (256 and 512 bit keys). Since the software XTS implementation allows all three

Re: [PATCH 7/8] tcrypt: disable 384 bit key XTS test

2011-04-20 Thread Jan Glauber
On Wed, 2011-04-20 at 08:33 +0800, Herbert Xu wrote: On Tue, Apr 19, 2011 at 09:29:20PM +0200, j...@linux.vnet.ibm.com wrote: From: Jan Glauber j...@linux.vnet.ibm.com XTS mode is only defined for 256 and 512 bit key lengths. s390 only implements these two modes and running the test

[PATCH 1/8] s390:

2011-04-19 Thread Jan Glauber
Subject: [PATCH] crypto: extend crypto facility check From: Jan Glauber j...@linux.vnet.ibm.com The specification which crypto facility is required for an algorithm is added as a parameter to the availability check which is done before an algorithm is registered. With this change

Re: [PATCH 1/8] s390:

2011-04-19 Thread Jan Glauber
Sorry, hit the undo once too often. Just ignore. On Tue, 2011-04-19 at 13:23 +0200, Jan Glauber wrote: Subject: [PATCH] crypto: extend crypto facility check From: Jan Glauber j...@linux.vnet.ibm.com The specification which crypto facility is required for an algorithm is added

[PATCH 1/2] des_s390: remove des3_ede128 mode

2010-05-20 Thread Jan Glauber
des_s390 implements support for 3DES with a 128 bit key. This mode is probably not used anywhere, less secure than 3DES with a 192 bit key and not implemented in the generic des version. Removing this mode seems to be low risk and will ease maintenance of the code. Signed-off-by: Jan Glauber j

[PATCH 2/2] des_s390: use generic weak key check

2010-05-20 Thread Jan Glauber
Get rid of the des_s390 specific key check module and use the generic DES weak key check instead. Also use the generic DES header and remove the weak key check in 3DES mode, as RFC2451 mentions that the DES weak keys are not relevant for 3DES. Signed-off-by: Jan Glauber j...@linux.vnet.ibm.com

vmac test fails on s390

2010-01-14 Thread Jan Glauber
Hi, Jan 14 14:47:38 h42lp52 kernel: alg: hash: Test 1 failed for vmac(aes-s390) Jan 14 14:47:38 h42lp52 kernel: : e7 79 33 b7 fd 8a d7 cb Looking at the digest from the failing test vector: .digest = \xcb\xd7\x8a\xfd\xb7\x33\x79\xe7, the output looks somehow familiar... Maybe a missing

Re: hanging modprobe aes_s390

2009-02-26 Thread Jan Glauber
Hi Herbert, your patch solves the hanging modprobe (tested on top of cryptodev-2.6). Both modules (aes_generic and aes_s390) are loaded after the modprobe aes_s390. Thanks a lot, Jan On Thu, 2009-02-26 at 14:06 +0800, Herbert Xu wrote: On Wed, Feb 25, 2009 at 05:33:50PM +, Jan Glauber

hanging modprobe aes_s390

2009-02-24 Thread Jan Glauber
Hi Herbert, commit 73d3864a4823abda19ebc4387b6ddcbf416e3a77 leads to a hanging modprobe aes_s390 process. If the process is interrupted the following oops occurs: [ cut here ] Badness at crypto/algapi.c:293 Modules linked in: aes_generic aes_s390(+) binfmt_misc CPU: 0

Re: crypto: sha-s390 - Switch to shash

2009-02-03 Thread Jan Glauber
On Tue, 2009-02-03 at 12:48 +1100, Herbert Xu wrote: On Mon, Feb 02, 2009 at 06:01:07PM +, Jan Glauber wrote: The patch is not yet in cryptodev, so I applied it on top of cryptodev. Compiling it gives me the following error: CC [M] arch/s390/crypto/sha256_s390.o arch/s390

Re: crypto: sha-s390 - Switch to shash

2009-02-02 Thread Jan Glauber
On Mon, 2009-02-02 at 13:20 +0100, Martin Schwidefsky wrote: On Wed, 2009-01-28 at 14:56 +1100, Herbert Xu wrote: On Mon, Jan 19, 2009 at 09:55:17AM +1100, Herbert Xu wrote: Could you let me if this patch breaks s390? commit 0fe7dddf02811152d7e58747bfe419ec0f43ea4e Author:

Re: [PATCH] check for s390 crypto facility availablility

2008-07-11 Thread Jan Glauber
[PATCH] respect STFL bit for s390 crypto From: [EMAIL PROTECTED] Bevore issuing any s390 crypto operation check whether the CPACF facility is enabled in the facility list. That way a virtualization layer can prevent usage of the CPACF facility regardless of the availability of the crypto

[PATCH] check for s390 crypto facility availablility

2008-07-10 Thread Jan Glauber
Hi Herbert, here is a small patch for the s390 crypto detection. [PATCH] respect STFL bit for s390 crypto From: [EMAIL PROTECTED] For all s390 in-kernel crypto algorithms we check at module load time whether the CPACF facility bit is on. If the facility is not enabled we bail out.

[PATCH] AES CBC test vectors for tcrypt

2007-11-29 Thread Jan Glauber
Add test vectors to tcrypt for AES in CBC mode for key sizes 192 and 256. The test vectors are copied from NIST SP800-38A. Signed-off-by: Jan Glauber [EMAIL PROTECTED] Index: cryptodev-2.6/crypto/tcrypt.h === --- cryptodev-2.6.orig

[PATCH] HIFN: make Kconfig option depend on PCI

2007-11-12 Thread Jan Glauber
The HIFN driver is currently selectable on s390 but wont compile. Since it looks like HIFN needs PCI make the Kconfig dependent on PCI, which is not available on s390. -jang Signed-off-by: Jan Glauber [EMAIL PROTECTED] Index: cryptodev-2.6/drivers/crypto/Kconfig

Re: [RFC] [crypto] S390-AES add fallback driver.

2007-11-12 Thread Jan Glauber
/crypto/aes_s390.c index 812511b..393a450 100644 --- a/arch/s390/crypto/aes_s390.c +++ b/arch/s390/crypto/aes_s390.c @@ -6,6 +6,7 @@ * s390 Version: * Copyright IBM Corp. 2005,2007 * Author(s): Jan Glauber ([EMAIL PROTECTED]) + * Sebastian Siewior ([EMAIL PROTECTED] SW

Re: [RFC][PATCH] Pseudo-random number generator

2006-12-07 Thread Jan Glauber
On Thu, 2006-12-07 at 16:06 +0100, Arnd Bergmann wrote: On Friday 01 December 2006 14:19, Jan Glauber wrote: I've chosen the char driver since it allows the user to decide which pseudo-random numbers he wants to use. That means there is a new interface for the s390 PRNG, called /dev