[PATCH] crypto: qat - remove empty functions and turn qat_uregister fn to void

2015-09-22 Thread Tadeusz Struk
Some code cleanups after crypto API changes: - Change qat_algs_unregister to a void function to keep it consistent with qat_asym_algs_unregister. - Remove empty functions qat_algs_init & qat_algs_exit. Signed-off-by: Tadeusz Struk --- drivers/crypto/qat/qat_common/adf_common_drv.h |4 +---

[PATCH v3 1/2] lib/scatterlist: Add sg_len helper

2015-09-22 Thread Tadeusz Struk
Add sg_len function which returns the total number of bytes in sg. Signed-off-by: Tadeusz Struk --- include/linux/scatterlist.h |1 + lib/scatterlist.c | 20 2 files changed, 21 insertions(+) diff --git a/include/linux/scatterlist.h b/include/linux/scatterli

[PATCH v3 2/2] crypto: akcipher - Changes to asymmetric key API

2015-09-22 Thread Tadeusz Struk
Setkey function has been split into set_priv_key and set_pub_key. Akcipher requests takes sgl for src and dst instead of void *. Users of the API i.e. two existing RSA implementation and test mgr code have been updated accordingly. Signed-off-by: Tadeusz Struk --- crypto/Makefile

[PATCH v3 0/2] crypto: akcipher - Changes to asymmetric key API

2015-09-22 Thread Tadeusz Struk
This series updates the asymmetric key API. The changes include - setkey function has been split into set_priv_key and set_pub_key. - akcipher requests takes sgl for src and dst instead of void *. Users of the API i.e. two existing RSA implementation and test mgr code have been updated accordingl

Re: [PATCH] drivers/crypto/nx: Add CRC and validation support for nx842

2015-09-22 Thread Dan Streetman
On Tue, Sep 22, 2015 at 10:42 AM, Herbert Xu wrote: > On Tue, Sep 22, 2015 at 10:39:53AM -0400, Dan Streetman wrote: >> >> hmm, that's true, and that would simplify the code a lot! No need for >> the header anymore. But, since the sw driver is sooo much slower, it >> would be important to be abl

Re: [PATCH] drivers/crypto/nx: Add CRC and validation support for nx842

2015-09-22 Thread Herbert Xu
On Tue, Sep 22, 2015 at 10:39:53AM -0400, Dan Streetman wrote: > > hmm, that's true, and that would simplify the code a lot! No need for > the header anymore. But, since the sw driver is sooo much slower, it > would be important to be able to communicate the alignment and size > limits to the cal

Re: [PATCH] drivers/crypto/nx: Add CRC and validation support for nx842

2015-09-22 Thread Dan Streetman
On Tue, Sep 22, 2015 at 8:21 AM, Herbert Xu wrote: > On Mon, Sep 21, 2015 at 11:21:14AM -0400, Dan Streetman wrote: >> >> As far as the hw and sw drivers producing the exact same output, I >> don't think that's possible with the current hw and sw drivers, >> because the hw driver may have to add a

Re: [PATCH v2 1/2] lib/scatterlist: Add sg_len helper

2015-09-22 Thread Tadeusz Struk
Hi Stephan, On 09/21/2015 10:52 PM, Stephan Mueller wrote: >> /** >> >+ * sg_len - return total size of bytes in the scatterlist >> >+ * @sg: The scatterlist >> >+ * >> >+ * Description: >> >+ * Allows to know how the total size of bytes in sg, taking into account >> >+ * chaining as

Re: [PATCH v3 1/9] crypto: introduce decompression API that can be called via sharable tfm object

2015-09-22 Thread Herbert Xu
On Fri, Sep 18, 2015 at 02:19:16PM +0900, Joonsoo Kim wrote: > Until now, tfm object embeds (de)compression context in it and > (de)compression in crypto API requires tfm object to use > this context. But, there are some algorithms that doesn't need > such context to operate. Therefore, this patch

Re: [PATCH] drivers/crypto/nx: Add CRC and validation support for nx842

2015-09-22 Thread Herbert Xu
On Mon, Sep 21, 2015 at 11:21:14AM -0400, Dan Streetman wrote: > > As far as the hw and sw drivers producing the exact same output, I > don't think that's possible with the current hw and sw drivers, > because the hw driver may have to add a header to the actual byte > stream that the hw creates,

Re: [PATCH 00/38] Fixes related to incorrect usage of unsigned types

2015-09-22 Thread Jacek Anaszewski
On 09/22/2015 11:13 AM, Andrzej Hajda wrote: On 09/21/2015 03:42 PM, David Howells wrote: Andrzej Hajda wrote: Semantic patch finds comparisons of types: unsigned < 0 unsigned >= 0 The former is always false, the latter is always true. Such comparisons are useless, so theoretically

Re: [PATCH 00/38] Fixes related to incorrect usage of unsigned types

2015-09-22 Thread Andrzej Hajda
On 09/21/2015 03:42 PM, David Howells wrote: > Andrzej Hajda wrote: > >> Semantic patch finds comparisons of types: >> unsigned < 0 >> unsigned >= 0 >> The former is always false, the latter is always true. >> Such comparisons are useless, so theoretically they could be >> safely removed,