Re: linux/bitops.h

2016-05-06 Thread H. Peter Anvin
On May 6, 2016 1:07:13 PM PDT, Sasha Levin wrote: >On 05/04/2016 08:30 PM, H. Peter Anvin wrote: >> On 05/04/16 15:06, John Denker wrote: >>> On 05/04/2016 02:56 PM, H. Peter Anvin wrote: > Beware that shifting by an amount >= the number of bits in the > word

Re: linux/bitops.h

2016-05-06 Thread H. Peter Anvin
On May 6, 2016 1:07:13 PM PDT, Sasha Levin wrote: >On 05/04/2016 08:30 PM, H. Peter Anvin wrote: >> On 05/04/16 15:06, John Denker wrote: >>> On 05/04/2016 02:56 PM, H. Peter Anvin wrote: > Beware that shifting by an amount >= the number of bits in the > word

Re: linux/bitops.h

2016-05-06 Thread Sasha Levin
On 05/04/2016 08:30 PM, H. Peter Anvin wrote: > On 05/04/16 15:06, John Denker wrote: >> On 05/04/2016 02:56 PM, H. Peter Anvin wrote: Beware that shifting by an amount >= the number of bits in the word remains Undefined Behavior. >> >>> This construct has been supported as a rotate

Re: [crypto / sparc64] cryptomgr_test OOPS

2016-05-06 Thread David Miller
From: Herbert Xu Date: Thu, 5 May 2016 16:42:49 +0800 > Subject: crypto: testmgr - Use kmalloc memory for RSA input > > As akcipher uses an SG interface, you must not use vmalloc memory > as input for it. This patch fixes testmgr to copy the vmalloc > test vectors

Re: [PATCH RESEND v5 6/6] crypto: AF_ALG - add support for key_id

2016-05-06 Thread Stephan Mueller
Am Donnerstag, 5. Mai 2016, 12:51:20 schrieb Tadeusz Struk: Hi Tadeusz, > This patch adds support for asymmetric key type to AF_ALG. > It will work as follows: A new PF_ALG socket options are > added on top of existing ALG_SET_KEY and ALG_SET_PUBKEY, namely > ALG_SET_KEY_ID and ALG_SET_PUBKEY_ID

Re: [PATCH 3/3 v4] crypto: kpp - Add ECDH software support

2016-05-06 Thread Stephan Mueller
Am Donnerstag, 5. Mai 2016, 10:17:37 schrieb Salvatore Benedetto: Hi Salvatore, > * Implement ECDH under kpp API > * Provide ECC software support for curve P-192 and >P-256. > * Add kpp test for ECDH with data generated by OpenSSL > > Signed-off-by: Salvatore Benedetto

[PATCH] crypto: caam: fix caam_jr_alloc() ret code

2016-05-06 Thread Catalin Vasile
caam_jr_alloc() used to return NULL if a JR device could not be allocated for a session. In turn, every user of this function used IS_ERR() function to verify if anything went wrong, which does NOT look for NULL values. This made the kernel crash if the sanity check failed, because the driver

[PATCH] crypto: caam: add backlogging support

2016-05-06 Thread Catalin Vasile
caam_jr_enqueue() function returns -EBUSY once there are no more slots available in the JR, but it doesn't actually save the current request. This breaks the functionality of users that expect that even if there is no more space for the request, it is at least queued for later execution. In other

Re: [PATCH RESEND v5 1/6] crypto: AF_ALG -- add sign/verify API

2016-05-06 Thread Stephan Mueller
Am Donnerstag, 5. Mai 2016, 12:50:54 schrieb Tadeusz Struk: Hi Tadeusz, David, > From: Stephan Mueller > > Add the flags for handling signature generation and signature > verification. > > Also, the patch adds the interface for setting a public key. > > Signed-off-by:

[RESEND PATCH v2 1/8] asm-generic/io.h: allow barriers in io{read,write}{16,32}be

2016-05-06 Thread Horia Geantă
While reviewing the addition of io{read,write}64be accessors, Arnd -finds a potential problem: "If an architecture overrides readq/writeq to have barriers but does not override ioread64be/iowrite64be, this will lack the barriers and behave differently from the little-endian version. I think the