[PATCH v2 4/5] crypto: qat - replace device ids defines

2020-07-13 Thread Giovanni Cabiddu
Replace device ids defined in the QAT drivers with the ones in include/linux/pci_ids.h. Signed-off-by: Giovanni Cabiddu --- drivers/crypto/qat/qat_c3xxx/adf_drv.c| 6 +++--- drivers/crypto/qat/qat_c3xxxvf/adf_drv.c | 6 +++--- drivers/crypto/qat/qat_c62x/adf_drv.c

[PATCH v2 3/5] vfio/pci: Add QAT devices to blocklist

2020-07-13 Thread Giovanni Cabiddu
from https://01.org/intel-quickassist-technology at the following link: https://01.org/sites/default/files/downloads/336211-014-qatforlinux-releasenotes-hwv1.7_0.pdf This patch adds the following QAT devices to the blocklist: DH895XCC, C3XXX and C62X. Signed-off-by: Giovanni Cabiddu --- driver

[PATCH v2 1/5] PCI: Add Intel QuickAssist device IDs

2020-07-13 Thread Giovanni Cabiddu
Add device IDs for the following Intel QuickAssist devices: DH895XCC, C3XXX and C62X. The defines in this patch are going to be referenced in two independent drivers, qat and vfio-pci. Signed-off-by: Giovanni Cabiddu --- include/linux/pci_ids.h | 6 ++ 1 file changed, 6 insertions(+) diff

[PATCH v2 5/5] crypto: qat - use PCI_VDEVICE

2020-07-13 Thread Giovanni Cabiddu
Build pci_device_id structure using the PCI_VDEVICE macro. This removes any references to the ADF_SYSTEM_DEVICE macro. Signed-off-by: Giovanni Cabiddu --- drivers/crypto/qat/qat_c3xxx/adf_drv.c | 7 ++- drivers/crypto/qat/qat_c3xxxvf/adf_drv.c| 7 ++- drivers/crypto/qat

Re: [PATCH 3/5] vfio/pci: add qat devices to blocklist

2020-07-10 Thread Giovanni Cabiddu
On Fri, Jul 10, 2020 at 10:10:34AM -0600, Alex Williamson wrote: > On Fri, 10 Jul 2020 10:44:33 -0500 > Bjorn Helgaas wrote: > > > On Fri, Jul 10, 2020 at 10:37:45AM -0500, Bjorn Helgaas wrote: > > > On Fri, Jul 10, 2020 at 04:08:19PM +0100, Giovanni Cabiddu wrote: >

Re: [PATCH 0/5] vfio/pci: add blocklist and disable qat

2020-07-10 Thread Giovanni Cabiddu
On Fri, Jul 10, 2020 at 04:48:07PM +0100, Christoph Hellwig wrote: > On Wed, Jul 01, 2020 at 01:42:09PM +0100, Christoph Hellwig wrote: > > On Wed, Jul 01, 2020 at 12:02:57PM +0100, Giovanni Cabiddu wrote: > > > This patchset defines a blocklist of devices in the vfio-pci modu

Re: [PATCH 3/5] vfio/pci: add qat devices to blocklist

2020-07-10 Thread Giovanni Cabiddu
On Wed, Jul 01, 2020 at 04:28:12PM -0500, Bjorn Helgaas wrote: > On Wed, Jul 01, 2020 at 12:03:00PM +0100, Giovanni Cabiddu wrote: > > The current generation of IntelĀ® QuickAssist Technology devices > > are not designed to run in an untrusted environment because of the >

[PATCH 1/5] PCI: add Intel QuickAssist device IDs

2020-07-01 Thread Giovanni Cabiddu
Add device IDs for the following Intel QuickAssist devices: DH895XCC, C3XXX and C62X. The defines in this patch are going to be referenced in two independent drivers, qat and vfio-pci. Signed-off-by: Giovanni Cabiddu --- include/linux/pci_ids.h | 6 ++ 1 file changed, 6 insertions(+) diff

[PATCH 4/5] crypto: qat - replace device ids defines

2020-07-01 Thread Giovanni Cabiddu
Replace device ids defined in the qat drivers with the ones in include/linux/pci_ids.h. Signed-off-by: Giovanni Cabiddu --- drivers/crypto/qat/qat_c3xxx/adf_drv.c| 6 +++--- drivers/crypto/qat/qat_c3xxxvf/adf_drv.c | 6 +++--- drivers/crypto/qat/qat_c62x/adf_drv.c

[PATCH 5/5] crypto: qat - use PCI_VDEVICE

2020-07-01 Thread Giovanni Cabiddu
Build pci_device_id structure using the PCI_VDEVICE macro. This removes any references to the ADF_SYSTEM_DEVICE macro. Signed-off-by: Giovanni Cabiddu --- drivers/crypto/qat/qat_c3xxx/adf_drv.c | 7 ++- drivers/crypto/qat/qat_c3xxxvf/adf_drv.c| 7 ++- drivers/crypto/qat

[PATCH 0/5] vfio/pci: add blocklist and disable qat

2020-07-01 Thread Giovanni Cabiddu
they will be shared between the vfio-pci and the qat drivers and replaces the custom ADF_SYSTEM_DEVICE macro with PCI_VDEVICE. The series is applicable to Herbert's tree but only partially applicable to Alex's tree due to a merge conflict. Giovanni Cabiddu (5): PCI: add Intel QuickAss

[PATCH 2/5] vfio/pci: add device blocklist

2020-07-01 Thread Giovanni Cabiddu
parameter disable_blocklist. Signed-off-by: Giovanni Cabiddu --- drivers/vfio/pci/vfio_pci.c | 33 + 1 file changed, 33 insertions(+) diff --git a/drivers/vfio/pci/vfio_pci.c b/drivers/vfio/pci/vfio_pci.c index 7c0779018b1b..ea5904ca6cbf 100644 --- a/drivers/vfio/pci

[PATCH 3/5] vfio/pci: add qat devices to blocklist

2020-07-01 Thread Giovanni Cabiddu
. Signed-off-by: Giovanni Cabiddu --- drivers/vfio/pci/vfio_pci.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/drivers/vfio/pci/vfio_pci.c b/drivers/vfio/pci/vfio_pci.c index ea5904ca6cbf..dcac5408c764 100644 --- a/drivers/vfio/pci/vfio_pci.c +++ b/drivers/vfio/pci

[PATCH v3 0/4] crypto: qat - fixes to aes xts

2020-06-29 Thread Giovanni Cabiddu
logs in one line. Changes from v1: - Removed extra pair of parenthesis around PTR_ERR in patch #4 (crypto: qat - allow xts requests not multiple of block) Giovanni Cabiddu (4): crypto: qat - allow xts requests not multiple of block crypto: qat - validate xts key crypto: qat - remove

[PATCH v3 1/4] crypto: qat - allow xts requests not multiple of block

2020-06-29 Thread Giovanni Cabiddu
en=64"; expected_error=0, actual_error=-22, cfg="random: inplace may_sleep use_finup src_divs=[45.85%@+4077, 54.15%@alignmask+18]" Fixes: 96ee111a659e ("crypto: qat - return error for block...") Signed-off-by: Giovanni Cabiddu --- drivers/crypto/qat/qat_common/qat_algs.c | 22

[PATCH v3 2/4] crypto: qat - validate xts key

2020-06-29 Thread Giovanni Cabiddu
Validate AES-XTS key using the function xts_verify_key() to prevent malformed keys. Signed-off-by: Giovanni Cabiddu --- drivers/crypto/qat/qat_common/qat_algs.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/crypto/qat/qat_common/qat_algs.c b/drivers/crypto/qat/qat_common

[PATCH v3 3/4] crypto: qat - remove unused field in skcipher ctx

2020-06-29 Thread Giovanni Cabiddu
Remove tfm field in qat_alg_skcipher_ctx structure. This is not used. Signed-off-by: Giovanni Cabiddu --- drivers/crypto/qat/qat_common/qat_algs.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/crypto/qat/qat_common/qat_algs.c b/drivers/crypto/qat/qat_common/qat_algs.c index

[PATCH v3 4/4] crypto: qat - fallback for xts with 192 bit keys

2020-06-29 Thread Giovanni Cabiddu
=3204 klen=48"; expected_error=0, actual_error=-22, flags=0x1 Signed-off-by: Giovanni Cabiddu --- drivers/crypto/qat/qat_common/qat_algs.c | 68 ++-- 1 file changed, 65 insertions(+), 3 deletions(-) diff --git a/drivers/crypto/qat/qat_common/qat_algs.c b/drivers/

Re: [PATCH v2 4/4] crypto: qat - fallback for xts with 192 bit keys

2020-06-29 Thread Giovanni Cabiddu
Thanks for your feedback Ard. On Fri, Jun 26, 2020 at 08:15:16PM +0200, Ard Biesheuvel wrote: > On Fri, 26 Jun 2020 at 10:04, Giovanni Cabiddu > wrote: > > > > +static int qat_alg_skcipher_init_xts_tfm(struct crypto_skcipher *tfm) > > +{ > > + st

[PATCH v2 4/4] crypto: qat - fallback for xts with 192 bit keys

2020-06-26 Thread Giovanni Cabiddu
tual_error=-22, flags=0x1 Signed-off-by: Giovanni Cabiddu --- drivers/crypto/qat/qat_common/qat_algs.c | 67 ++-- 1 file changed, 64 insertions(+), 3 deletions(-) diff --git a/drivers/crypto/qat/qat_common/qat_algs.c b/drivers/crypto/qat/qat_common/qat_algs.c index 77

[PATCH v2 1/4] crypto: qat - allow xts requests not multiple of block

2020-06-26 Thread Giovanni Cabiddu
en=64"; expected_error=0, actual_error=-22, cfg="random: inplace may_sleep use_finup src_divs=[45.85%@+4077, 54.15%@alignmask+18]" Fixes: 96ee111a659e ("crypto: qat - return error for block...") Signed-off-by: Giovanni Cabiddu --- drivers/crypto/qat/qat_common/qat_algs.c | 22

[PATCH v2 0/4] crypto: qat - fixes to aes xts

2020-06-26 Thread Giovanni Cabiddu
parenthesis around PTR_ERR in patch #4 (crypto: qat - allow xts requests not multiple of block) Giovanni Cabiddu (4): crypto: qat - allow xts requests not multiple of block crypto: qat - validate xts key crypto: qat - remove unused field in skcipher ctx crypto: qat - fallback for xts with

[PATCH v2 2/4] crypto: qat - validate xts key

2020-06-26 Thread Giovanni Cabiddu
Validate xts key using the function xts_verify_key() to prevent malformed keys. Signed-off-by: Giovanni Cabiddu --- drivers/crypto/qat/qat_common/qat_algs.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/crypto/qat/qat_common/qat_algs.c b/drivers/crypto/qat/qat_common

[PATCH v2 3/4] crypto: qat - remove unused field in skcipher ctx

2020-06-26 Thread Giovanni Cabiddu
Remove tfm field in qat_alg_skcipher_ctx structure. This is not used. Signed-off-by: Giovanni Cabiddu --- drivers/crypto/qat/qat_common/qat_algs.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/crypto/qat/qat_common/qat_algs.c b/drivers/crypto/qat/qat_common/qat_algs.c index

Re: [PATCH 4/4] crypto: qat - fallback for xts with 192 bit keys

2020-06-25 Thread Giovanni Cabiddu
On Thu, Jun 25, 2020 at 01:59:04PM +0100, Giovanni Cabiddu wrote: > + ctx->ftfm = crypto_alloc_skcipher("xts(aes)", 0, CRYPTO_ALG_ASYNC); > + if (IS_ERR(ctx->ftfm)) > + return(PTR_ERR(ctx->ftfm)); I just realized I added an extra pair of parenthesi

[PATCH 4/4] crypto: qat - fallback for xts with 192 bit keys

2020-06-25 Thread Giovanni Cabiddu
tual_error=-22, flags=0x1 Signed-off-by: Giovanni Cabiddu --- drivers/crypto/qat/qat_common/qat_algs.c | 67 ++-- 1 file changed, 64 insertions(+), 3 deletions(-) diff --git a/drivers/crypto/qat/qat_common/qat_algs.c b/drivers/crypto/qat/qat_common/qat_algs.c index 77

[PATCH 2/4] crypto: qat - validate xts key

2020-06-25 Thread Giovanni Cabiddu
Validate xts key using the function xts_verify_key() to prevent malformed keys. Signed-off-by: Giovanni Cabiddu --- drivers/crypto/qat/qat_common/qat_algs.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/crypto/qat/qat_common/qat_algs.c b/drivers/crypto/qat/qat_common

[PATCH 3/4] crypto: qat - remove unused field in skcipher ctx

2020-06-25 Thread Giovanni Cabiddu
Remove tfm field in qat_alg_skcipher_ctx structure. This is not used. Signed-off-by: Giovanni Cabiddu --- drivers/crypto/qat/qat_common/qat_algs.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/crypto/qat/qat_common/qat_algs.c b/drivers/crypto/qat/qat_common/qat_algs.c index

[PATCH 1/4] crypto: qat - allow xts requests not multiple of block

2020-06-25 Thread Giovanni Cabiddu
en=64"; expected_error=0, actual_error=-22, cfg="random: inplace may_sleep use_finup src_divs=[45.85%@+4077, 54.15%@alignmask+18]" Fixes: 96ee111a659e ("crypto: qat - return error for block...") Signed-off-by: Giovanni Cabiddu --- drivers/crypto/qat/qat_common/qat_algs.c | 22

[PATCH 0/4] crypto: qat - fixes to aes xts

2020-06-25 Thread Giovanni Cabiddu
This series fixes a few issues with the xts(aes) implementation in the QuickAssist driver: - Requests that are not multiple of the block size are rejected - Input key not validated - xts(aes) requests with key size 192 bits are rejected with -EINVAL Giovanni Cabiddu (4): crypto: qat - allow

[PATCH 3/3] crypto: qat - update timeout logic in put admin msg

2020-06-11 Thread Giovanni Cabiddu
From: Wojciech Ziemba Replace timeout logic in adf_put_admin_msg_sync() with existing macro readl_poll_timeout(). Signed-off-by: Wojciech Ziemba Signed-off-by: Giovanni Cabiddu --- drivers/crypto/qat/qat_common/adf_admin.c | 34 +-- 1 file changed, 19 insertions(+), 15

[PATCH 0/3] crypto: qat - update admin interface

2020-06-11 Thread Giovanni Cabiddu
Refactor and update the admin interface in the qat driver. These changes are on top of "crypto: qat - remove packed attribute in etr structs" (https://patchwork.kernel.org/patch/11586063/) Wojciech Ziemba (3): crypto: qat - update fw init admin msg crypto: qat - send admin messages to set of

[PATCH 2/3] crypto: qat - send admin messages to set of AEs

2020-06-11 Thread Giovanni Cabiddu
From: Wojciech Ziemba Update the logic that sends admin messages to be able to target a subset of Acceleration Engines (AEs) in the device. In future not all admin messages need to be sent to all the AEs. Signed-off-by: Wojciech Ziemba Signed-off-by: Giovanni Cabiddu --- drivers/crypto/qat

[PATCH 1/3] crypto: qat - update fw init admin msg

2020-06-11 Thread Giovanni Cabiddu
From: Wojciech Ziemba This patch tidies up the definition of init/admin request and response messages by removing the icp_qat_fw_init_admin_resp_pars structure and embedding it into icp_qat_fw_init_admin_resp. Signed-off-by: Wojciech Ziemba Signed-off-by: Giovanni Cabiddu --- drivers/crypto

[PATCH 2/3] crypto: qat - replace user types with kernel ABI __u types

2020-06-03 Thread Giovanni Cabiddu
From: Wojciech Ziemba Kernel source code should not contain stdint.h types. This patch replaces uintXX_t types with kernel space ABI types. Signed-off-by: Wojciech Ziemba Signed-off-by: Giovanni Cabiddu --- .../crypto/qat/qat_common/adf_cfg_common.h| 24 +-- drivers/crypto/qat

[PATCH 1/3] crypto: qat - replace user types with kernel u types

2020-06-03 Thread Giovanni Cabiddu
From: Wojciech Ziemba Kernel source code should not include stdint.h types. This patch replaces uintXX_t types with respective ones defined in kernel headers. Signed-off-by: Wojciech Ziemba Signed-off-by: Giovanni Cabiddu --- .../crypto/qat/qat_common/adf_accel_devices.h | 54

[PATCH 0/3] Replace user types and remove packed

2020-06-03 Thread Giovanni Cabiddu
Remove user types across qat code base and replace packed attribute in etr ring struct which causes a split lock. These changes are on top of "crypto: qat - fix parameter check in aead encryption" (https://patchwork.kernel.org/patch/11574001/) Giovanni Cabiddu (1): crypto: qat - rem

[PATCH 3/3] crypto: qat - remove packed attribute in etr structs

2020-06-03 Thread Giovanni Cabiddu
Remove packed attribute in adf_etr_bank_data and adf_etr_ring_data. Fields in these structures are reordered in order to avoid holes. Signed-off-by: Giovanni Cabiddu --- .../crypto/qat/qat_common/adf_transport_internal.h | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff

Re: [PATCH 1/4] qat: fix misunderstood -EBUSY return code

2020-06-03 Thread Giovanni Cabiddu
Hi Mikulas, On Wed, Jun 03, 2020 at 04:31:54AM -0400, Mikulas Patocka wrote: > On Tue, 2 Jun 2020, Giovanni Cabiddu wrote: > > Hi Mikulas, > > > > thanks for your patch. See below. > > > > > + qat_req->backed_off = backed_off = > > > adf_

Re: [PATCH 1/4] qat: fix misunderstood -EBUSY return code

2020-06-02 Thread Giovanni Cabiddu
Hi Mikulas, thanks for your patch. See below. On Mon, Jun 01, 2020 at 06:03:33PM +0200, Mikulas Patocka wrote: > Using dm-crypt with QAT result in deadlocks. > > If a crypto routine returns -EBUSY, it is expected that the crypto driver > have already queued the request and the crypto API user sh

[PATCH] crypto: qat - fix parameter check in aead encryption

2020-05-27 Thread Giovanni Cabiddu
Return -EINVAL if the input digest size and/or cipher length is zero or the cipher length is not multiple of a block. These additional parameter checks prevent an undefined device behaviour. Signed-off-by: Giovanni Cabiddu --- drivers/crypto/qat/qat_common/qat_algs.c | 15 ++- 1

Re: [PATCH] crypto: qat - Silence smp_processor_id() warning

2019-07-25 Thread Giovanni Cabiddu
Hi Alexander, Thanks for you patch. On Tue, Jul 23, 2019 at 07:24:01AM +, Sverdlin, Alexander (Nokia - DE/Ulm) wrote: > It seems that smp_processor_id() is only used for a best-effort > load-balancing, refer to qat_crypto_get_instance_node(). It's not feasible > to disable preemption for the

[PATCH 6/7] crypto: qat - return error for block ciphers for invalid requests

2019-04-29 Thread Giovanni Cabiddu
Return -EINVAL if a request for a block cipher is not multiple of the size of the block. This problem was found with by the new extra run-time crypto self test. Reviewed-by: Conor Mcloughlin Tested-by: Sergey Portnoy Signed-off-by: Giovanni Cabiddu --- drivers/crypto/qat/qat_common

[PATCH 5/7] crypto: qat - return proper error code in setkey

2019-04-29 Thread Giovanni Cabiddu
by returning the correct error code in case of error and freeing all the resources allocated in this function in case of failure. This problem was found with by the new extra run-time crypto self test. Reviewed-by: Conor Mcloughlin Tested-by: Sergey Portnoy Signed-off-by: Giovanni Cabiddu

[PATCH 4/7] crypto: qat - fix block size for aes ctr mode

2019-04-29 Thread Giovanni Cabiddu
The block size for aes counter mode was improperly set to AES_BLOCK_SIZE. This sets it to 1 as it is a stream cipher. This problem was found with by the new extra run-time crypto self test. Reviewed-by: Conor Mcloughlin Tested-by: Sergey Portnoy Signed-off-by: Giovanni Cabiddu --- drivers

[PATCH 1/7] crypto: qat - remove spin_lock in qat_ablkcipher_setkey

2019-04-29 Thread Giovanni Cabiddu
From: Xin Zeng Remove unnecessary spin lock in qat_ablkcipher_setkey. Reviewed-by: Conor Mcloughlin Tested-by: Sergey Portnoy Signed-off-by: Xin Zeng Signed-off-by: Giovanni Cabiddu --- drivers/crypto/qat/qat_common/qat_algs.c | 16 +++- 1 file changed, 3 insertions(+), 13

[PATCH 2/7] crypto: qat - add check for negative offset in alg precompute function

2019-04-29 Thread Giovanni Cabiddu
Sonnad Signed-off-by: Giovanni Cabiddu --- drivers/crypto/qat/qat_common/qat_algs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/crypto/qat/qat_common/qat_algs.c b/drivers/crypto/qat/qat_common/qat_algs.c index 413e05e8891e..b60156d987eb 100644 --- a/drivers/crypto/qat/qat_common

[PATCH 7/7] crypto: qat - do not offload zero length requests

2019-04-29 Thread Giovanni Cabiddu
If a zero length request is submitted through the skcipher api, do not offload it and return success. Reviewed-by: Conor Mcloughlin Tested-by: Sergey Portnoy Signed-off-by: Giovanni Cabiddu --- drivers/crypto/qat/qat_common/qat_algs.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a

[PATCH 3/7] crypto: qat - update iv after encryption or decryption operations

2019-04-29 Thread Giovanni Cabiddu
-by: Sergey Portnoy Signed-off-by: Giovanni Cabiddu --- drivers/crypto/qat/qat_common/qat_algs.c | 71 ++ drivers/crypto/qat/qat_common/qat_crypto.h | 2 + 2 files changed, 61 insertions(+), 12 deletions(-) diff --git a/drivers/crypto/qat/qat_common/qat_algs.c b/drivers

Re: [PATCH v2 3/3] crypto: scompress - defer allocation of scratch buffer to first use

2017-07-28 Thread Giovanni Cabiddu
On Wed, Jul 26, 2017 at 01:07:34AM +0100, Ard Biesheuvel wrote: > > > On 26 Jul 2017, at 00:36, Giovanni Cabiddu > > wrote: > > > > Hi Ard, > > > >> On Fri, Jul 21, 2017 at 04:42:38PM +0100, Ard Biesheuvel wrote: > >> +stat

Re: [PATCH v2 3/3] crypto: scompress - defer allocation of scratch buffer to first use

2017-07-25 Thread Giovanni Cabiddu
Hi Ard, On Fri, Jul 21, 2017 at 04:42:38PM +0100, Ard Biesheuvel wrote: > +static int crypto_scomp_init_tfm(struct crypto_tfm *tfm) > +{ > + int ret; > + > + mutex_lock(&scomp_lock); > + ret = crypto_scomp_alloc_all_scratches(); > + mutex_unlock(&scomp_lock); > + > + return ret

Re: [PATCH v3 3/4] btrfs: Add zstd support

2017-07-25 Thread Giovanni Cabiddu
Hi Nick, On Thu, Jul 20, 2017 at 10:27:42PM +0100, Nick Terrell wrote: > Add zstd compression and decompression support to BtrFS. zstd at its > fastest level compresses almost as well as zlib, while offering much > faster compression and decompression, approaching lzo speeds. Can we look at integr

[PATCH v2 2/2] crypto: scomp - add support for deflate rfc1950 (zlib)

2017-04-21 Thread Giovanni Cabiddu
Add scomp backend for zlib-deflate compression algorithm. This backend outputs data using the format defined in rfc1950 (raw deflate surrounded by zlib header and footer). Signed-off-by: Giovanni Cabiddu --- crypto/deflate.c | 61 - crypto/testmgr.c

[PATCH v2 1/2] crypto: scomp - allow registration of multiple scomps

2017-04-21 Thread Giovanni Cabiddu
Add crypto_register_scomps and crypto_unregister_scomps to allow the registration of multiple implementations with one call. Signed-off-by: Giovanni Cabiddu --- crypto/scompress.c | 29 + include/crypto/internal/scompress.h | 3 +++ 2 files changed

[PATCH 1/2] crypto: scomp - allow registration of multiple scomps

2017-04-19 Thread Giovanni Cabiddu
Add crypto_register_scomps and crypto_unregister_scomps to allow the registration of multiple implementations with one call. Signed-off-by: Giovanni Cabiddu --- crypto/scompress.c | 29 + include/crypto/internal/scompress.h | 3 +++ 2 files changed

[PATCH 2/2] crypto: acomp - add support for deflate rfc1950 (zlib)

2017-04-19 Thread Giovanni Cabiddu
Add scomp backend for zlib-deflate compression algorithm. This backend outputs data using the format defined in rfc1950 (raw deflate surrounded by zlib header and footer). Signed-off-by: Giovanni Cabiddu --- crypto/deflate.c | 61 - crypto/testmgr.c

[PATCH] crypto: acomp - replace compression known answer test

2017-04-19 Thread Giovanni Cabiddu
test for acomp compression tests rather than a known answer test. Signed-off-by: Giovanni Cabiddu --- crypto/testmgr.c | 29 ++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/crypto/testmgr.c b/crypto/testmgr.c index cd075c7..8373c72 100644 --- a/crypto

[PATCH] crypto: acomp - report scomp implementations

2017-04-19 Thread Giovanni Cabiddu
Fix crypto_has_acomp to report scomp implementations. Signed-off-by: Giovanni Cabiddu --- include/crypto/acompress.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/crypto/acompress.h b/include/crypto/acompress.h index e328b52..39871f9 100644 --- a/include/crypto/acompress.h +++ b

[PATCH] crypto: acomp - allow registration of multiple acomps

2017-04-19 Thread Giovanni Cabiddu
Add crypto_register_acomps and crypto_unregister_acomps to allow the registration of multiple implementations with one call. Signed-off-by: Giovanni Cabiddu --- crypto/acompress.c | 29 + include/crypto/internal/acompress.h | 3 +++ 2 files changed

Re: [RFC PATCH v1 1/1] mm: zswap - Add crypto acomp/scomp framework support

2017-02-15 Thread Giovanni Cabiddu
On Wed, Feb 15, 2017 at 07:27:30PM +0530, Narayana Prasad Athreya wrote: > > I assume all of these crypto_acomp_[compress|decompress] calls are > > actually synchronous, > > not asynchronous as the name suggests. Otherwise, this would blow up > > quite spectacularly > > since all the resources we

Re: [PATCH] crypto: qat - zero esram only for DH85x devices

2017-01-31 Thread Giovanni Cabiddu
Hi Herbert, On Fri, Dec 30, 2016 at 08:20:11PM +0800, Herbert Xu wrote: > On Thu, Dec 22, 2016 at 03:00:24PM +0000, Giovanni Cabiddu wrote: > > Zero embedded ram in DH85x devices. This is not > > needed for newer generations as it is done by HW. > > > > Sign

[PATCH] crypto: qat - increase number of supported devices

2016-12-22 Thread Giovanni Cabiddu
From: Xin Zeng The unsigned long type for init_status and start_status in service_hndl are not long enough to represent more than 64 acceleration devices. Use an array instead. Signed-off-by: Xin Zeng Signed-off-by: Giovanni Cabiddu --- drivers/crypto/qat/qat_common/adf_cfg_common.h | 1

[PATCH] crypto: qat - initialize cra_flags before register into kpp

2016-12-22 Thread Giovanni Cabiddu
Initialize dh.base.cra_flags before registering the dh algorithm. Without this fix, the registration of the dh algorithm might fail if the qat driver is restarted. Signed-off-by: Sushil Kumar Signed-off-by: Giovanni Cabiddu --- drivers/crypto/qat/qat_common/qat_asym_algs.c | 1 + 1 file

[PATCH] crypto: qat - modify format of dev top level debugfs entries

2016-12-22 Thread Giovanni Cabiddu
From: Pablo Marcos Oltra Remove leading zeros in pci function number to be consistent with output from lspci. Signed-off-by: Pablo Marcos Oltra Signed-off-by: Giovanni Cabiddu --- drivers/crypto/qat/qat_c3xxx/adf_drv.c | 2 +- drivers/crypto/qat/qat_c3xxxvf/adf_drv.c| 2 +- drivers

[PATCH] crypto: qat - fix bar discovery for c62x

2016-12-22 Thread Giovanni Cabiddu
Some accelerators of the c62x series have only two bars. This patch skips BAR0 if the accelerator does not have it. Signed-off-by: Giovanni Cabiddu --- drivers/crypto/qat/qat_c62x/adf_drv.c | 2 +- drivers/crypto/qat/qat_common/adf_accel_devices.h | 1 + 2 files changed, 2

[PATCH] crypto: qat - zero esram only for DH85x devices

2016-12-22 Thread Giovanni Cabiddu
Zero embedded ram in DH85x devices. This is not needed for newer generations as it is done by HW. Signed-off-by: Giovanni Cabiddu --- drivers/crypto/qat/qat_common/qat_hal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/qat/qat_common/qat_hal.c b

[PATCH] crypto: qat - replace hardcoded BIT(0) in vf_isr

2016-12-22 Thread Giovanni Cabiddu
Replace BIT(0) macro with proper definition in pf2vf path Signed-off-by: Giovanni Cabiddu --- drivers/crypto/qat/qat_common/adf_vf_isr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/qat/qat_common/adf_vf_isr.c b/drivers/crypto/qat/qat_common

[PATCH] crypto: qat - fix comments describing adf_disable_sriov()

2016-12-22 Thread Giovanni Cabiddu
From: Ahsan Atta Signed-off-by: Ahsan Atta Signed-off-by: Giovanni Cabiddu --- drivers/crypto/qat/qat_common/adf_sriov.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/qat/qat_common/adf_sriov.c b/drivers/crypto/qat/qat_common/adf_sriov.c index 9320ae1

[PATCH] crypto: qat - fix indentation

2016-12-22 Thread Giovanni Cabiddu
From: Ahsan Atta Signed-off-by: Ahsan Atta Signed-off-by: Giovanni Cabiddu --- drivers/crypto/qat/qat_common/adf_dev_mgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/qat/qat_common/adf_dev_mgr.c b/drivers/crypto/qat/qat_common/adf_dev_mgr.c index

Re: [PATCH] crypto: acomp: export all scomp interfaces

2016-10-27 Thread Giovanni Cabiddu
Hi Arnd, On Thu, Oct 27, 2016 at 04:09:49PM +0200, Arnd Bergmann wrote: > The newly added scomp/acomp interface has a couple of functions > that should be exported to allow linking the two drivers > as loadable modules: > > ERROR: "crypto_acomp_scomp_free_ctx" [crypto/acompress.ko] undefined! > ER

Re: linux-next: Tree for Oct 26 (crypto/acompress.ko)

2016-10-26 Thread Giovanni Cabiddu
Hi, On Wed, Oct 26, 2016 at 07:54:00PM -0400, Paul Gortmaker wrote: > So, no EXPORT_SYMBOL, and any .config which has ACOMP2=m will fail. I sent a patch for this: https://patchwork.kernel.org/patch/9396503/ Regards, -- Giovanni -- To unsubscribe from this list: send the line "unsubscribe linux-c

Re: [cryptodev:master 41/47] ERROR: "crypto_acomp_scomp_free_ctx" [crypto/acompress.ko] undefined!

2016-10-26 Thread Giovanni Cabiddu
mp that appears when acomp is built as module Signed-off-by: Giovanni Cabiddu --- crypto/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crypto/Makefile b/crypto/Makefile index 5c83f3d..82ffeee 100644 --- a/crypto/Makefile +++ b/crypto/Makefile @@ -50,8 +50,9 @@ rs

[PATCH v10 3/8] crypto: acomp - add support for lzo via scomp

2016-10-21 Thread Giovanni Cabiddu
Add scomp backend for lzo compression algorithm. Signed-off-by: Giovanni Cabiddu --- crypto/Kconfig | 1 + crypto/lzo.c | 97 +- 2 files changed, 83 insertions(+), 15 deletions(-) diff --git a/crypto/Kconfig b/crypto/Kconfig index

[PATCH v10 5/8] crypto: acomp - add support for lz4hc via scomp

2016-10-21 Thread Giovanni Cabiddu
Add scomp backend for lz4hc compression algorithm. Signed-off-by: Giovanni Cabiddu --- crypto/Kconfig | 1 + crypto/lz4hc.c | 92 +++--- 2 files changed, 83 insertions(+), 10 deletions(-) diff --git a/crypto/Kconfig b/crypto/Kconfig index

[PATCH v10 8/8] crypto: acomp - update testmgr with support for acomp

2016-10-21 Thread Giovanni Cabiddu
Add tests to the test manager for algorithms exposed through acomp. Signed-off-by: Giovanni Cabiddu --- crypto/testmgr.c | 158 ++- 1 file changed, 145 insertions(+), 13 deletions(-) diff --git a/crypto/testmgr.c b/crypto/testmgr.c index

[PATCH v10 4/8] crypto: acomp - add support for lz4 via scomp

2016-10-21 Thread Giovanni Cabiddu
Add scomp backend for lz4 compression algorithm. Signed-off-by: Giovanni Cabiddu --- crypto/Kconfig | 1 + crypto/lz4.c | 91 +++--- 2 files changed, 82 insertions(+), 10 deletions(-) diff --git a/crypto/Kconfig b/crypto/Kconfig index

[PATCH v10 2/8] crypto: add driver-side scomp interface

2016-10-21 Thread Giovanni Cabiddu
Add a synchronous back-end (scomp) to acomp. This allows to easily expose the already present compression algorithms in LKCF via acomp. Signed-off-by: Giovanni Cabiddu --- crypto/Makefile | 1 + crypto/acompress.c | 55 +- crypto/scompress.c

[PATCH v10 0/8] crypto: asynchronous compression api

2016-10-21 Thread Giovanni Cabiddu
flate compressors --- Giovanni Cabiddu (8): crypto: add asynchronous compression api crypto: add driver-side scomp interface crypto: acomp - add support for lzo via scomp crypto: acomp - add support for lz4 via scomp crypto: acomp - add support for lz4hc via scomp crypto: acomp - add support fo

[PATCH v10 6/8] crypto: acomp - add support for 842 via scomp

2016-10-21 Thread Giovanni Cabiddu
Add scomp backend for 842 compression algorithm. Signed-off-by: Giovanni Cabiddu --- crypto/842.c | 81 -- crypto/Kconfig | 1 + 2 files changed, 80 insertions(+), 2 deletions(-) diff --git a/crypto/842.c b/crypto/842.c index 98e387e

[PATCH v10 7/8] crypto: acomp - add support for deflate via scomp

2016-10-21 Thread Giovanni Cabiddu
Add scomp backend for deflate compression algorithm. Signed-off-by: Giovanni Cabiddu --- crypto/Kconfig | 1 + crypto/deflate.c | 111 ++- 2 files changed, 102 insertions(+), 10 deletions(-) diff --git a/crypto/Kconfig b/crypto/Kconfig

[PATCH v10 1/8] crypto: add asynchronous compression api

2016-10-21 Thread Giovanni Cabiddu
Add acomp, an asynchronous compression api that uses scatterlist buffers. Signed-off-by: Giovanni Cabiddu --- crypto/Kconfig | 10 ++ crypto/Makefile | 2 + crypto/acompress.c | 118 +++ crypto/crypto_user.c

[PATCH v9 8/8] crypto: acomp - update testmgr with support for acomp

2016-09-29 Thread Giovanni Cabiddu
Add tests to the test manager for algorithms exposed through acomp. Signed-off-by: Giovanni Cabiddu --- crypto/testmgr.c | 158 ++- 1 file changed, 145 insertions(+), 13 deletions(-) diff --git a/crypto/testmgr.c b/crypto/testmgr.c index

[PATCH v9 6/8] crypto: acomp - add support for 842 via scomp

2016-09-29 Thread Giovanni Cabiddu
Add scomp backend for 842 compression algorithm. Signed-off-by: Giovanni Cabiddu --- crypto/842.c | 81 -- crypto/Kconfig | 1 + 2 files changed, 80 insertions(+), 2 deletions(-) diff --git a/crypto/842.c b/crypto/842.c index 98e387e

[PATCH v9 5/8] crypto: acomp - add support for lz4hc via scomp

2016-09-29 Thread Giovanni Cabiddu
Add scomp backend for lz4hc compression algorithm. Signed-off-by: Giovanni Cabiddu --- crypto/Kconfig | 1 + crypto/lz4hc.c | 92 +++--- 2 files changed, 83 insertions(+), 10 deletions(-) diff --git a/crypto/Kconfig b/crypto/Kconfig index

[PATCH v9 1/8] crypto: add asynchronous compression api

2016-09-29 Thread Giovanni Cabiddu
Add acomp, an asynchronous compression api that uses scatterlist buffers. Signed-off-by: Giovanni Cabiddu --- crypto/Kconfig | 10 ++ crypto/Makefile | 2 + crypto/acompress.c | 118 +++ crypto/crypto_user.c

[PATCH v9 3/8] crypto: acomp - add support for lzo via scomp

2016-09-29 Thread Giovanni Cabiddu
Add scomp backend for lzo compression algorithm. Signed-off-by: Giovanni Cabiddu --- crypto/Kconfig | 1 + crypto/lzo.c | 97 +- 2 files changed, 83 insertions(+), 15 deletions(-) diff --git a/crypto/Kconfig b/crypto/Kconfig index

[PATCH v9 2/8] crypto: add driver-side scomp interface

2016-09-29 Thread Giovanni Cabiddu
Add a synchronous back-end (scomp) to acomp. This allows to easily expose the already present compression algorithms in LKCF via acomp. Signed-off-by: Giovanni Cabiddu --- crypto/Makefile | 1 + crypto/acompress.c | 55 +- crypto/scompress.c

[PATCH v9 4/8] crypto: acomp - add support for lz4 via scomp

2016-09-29 Thread Giovanni Cabiddu
Add scomp backend for lz4 compression algorithm. Signed-off-by: Giovanni Cabiddu --- crypto/Kconfig | 1 + crypto/lz4.c | 91 +++--- 2 files changed, 82 insertions(+), 10 deletions(-) diff --git a/crypto/Kconfig b/crypto/Kconfig index

[PATCH v9 7/8] crypto: acomp - add support for deflate via scomp

2016-09-29 Thread Giovanni Cabiddu
Add scomp backend for deflate compression algorithm. Signed-off-by: Giovanni Cabiddu --- crypto/Kconfig | 1 + crypto/deflate.c | 111 ++- 2 files changed, 102 insertions(+), 10 deletions(-) diff --git a/crypto/Kconfig b/crypto/Kconfig

[PATCH v9 0/8] crypto: asynchronous compression api

2016-09-29 Thread Giovanni Cabiddu
lpers to allocate compression and decompression requests Changes from initial submit: - added consumed and produced fields to acomp_req - extended api to support configuration of deflate compressors --- Giovanni Cabiddu (8): crypto: add asynchronous compression api crypto: add d

Re: [PATCH v7 4/9] crypto: acomp - add support for lzo via scomp

2016-09-26 Thread Giovanni Cabiddu
On Fri, Sep 23, 2016 at 11:05:18PM +0800, Herbert Xu wrote: > When I said acomp layer I'm referring specifically to the algorithm > or driver. As to your last question it would be the caller's > responsibility to free that memory. > > The use-case is our oldest user, IPcomp. Most packets are 1500

Re: [PATCH v7 4/9] crypto: acomp - add support for lzo via scomp

2016-09-22 Thread Giovanni Cabiddu
On Thu, Sep 22, 2016 at 05:22:44PM +0800, Herbert Xu wrote: > I'm suggesting that we have just one set of buffers for all scomp > algorithms. After all, a CPU can only process one request at a > time. Makes sense. Implemented in v8. > Yes scomp should just be flat. A sync algorithm capable of pr

[PATCH v8 7/8] crypto: acomp - add support for deflate via scomp

2016-09-22 Thread Giovanni Cabiddu
Add scomp backend for deflate compression algorithm Signed-off-by: Giovanni Cabiddu --- crypto/Kconfig | 1 + crypto/deflate.c | 111 ++- 2 files changed, 102 insertions(+), 10 deletions(-) diff --git a/crypto/Kconfig b/crypto/Kconfig

[PATCH v8 4/8] crypto: acomp - add support for lz4 via scomp

2016-09-22 Thread Giovanni Cabiddu
Add scomp backend for lz4 compression algorithm Signed-off-by: Giovanni Cabiddu --- crypto/Kconfig | 1 + crypto/lz4.c | 91 +++--- 2 files changed, 82 insertions(+), 10 deletions(-) diff --git a/crypto/Kconfig b/crypto/Kconfig index

[PATCH v8 8/8] crypto: acomp - update testmgr with support for acomp

2016-09-22 Thread Giovanni Cabiddu
Add tests to the test manager for algorithms exposed through acomp Signed-off-by: Giovanni Cabiddu --- crypto/testmgr.c | 158 ++- 1 file changed, 145 insertions(+), 13 deletions(-) diff --git a/crypto/testmgr.c b/crypto/testmgr.c index

[PATCH v8 6/8] crypto: acomp - add support for 842 via scomp

2016-09-22 Thread Giovanni Cabiddu
Add scomp backend for 842 compression algorithm Signed-off-by: Giovanni Cabiddu --- crypto/842.c | 81 -- crypto/Kconfig | 1 + 2 files changed, 80 insertions(+), 2 deletions(-) diff --git a/crypto/842.c b/crypto/842.c index 98e387e

[PATCH v8 5/8] crypto: acomp - add support for lz4hc via scomp

2016-09-22 Thread Giovanni Cabiddu
Add scomp backend for lz4hc compression algorithm Signed-off-by: Giovanni Cabiddu --- crypto/Kconfig | 1 + crypto/lz4hc.c | 92 +++--- 2 files changed, 83 insertions(+), 10 deletions(-) diff --git a/crypto/Kconfig b/crypto/Kconfig index

[PATCH v8 2/8] crypto: add driver-side scomp interface

2016-09-22 Thread Giovanni Cabiddu
Add a synchronous back-end (scomp) to acomp. This allows to easily expose the already present compression algorithms in LKCF via acomp Signed-off-by: Giovanni Cabiddu --- crypto/Makefile | 1 + crypto/acompress.c | 49 +- crypto/scompress.c

[PATCH v8 3/8] crypto: acomp - add support for lzo via scomp

2016-09-22 Thread Giovanni Cabiddu
Add scomp backend for lzo compression algorithm Signed-off-by: Giovanni Cabiddu --- crypto/Kconfig | 1 + crypto/lzo.c | 97 +- 2 files changed, 83 insertions(+), 15 deletions(-) diff --git a/crypto/Kconfig b/crypto/Kconfig index

[PATCH v8 1/8] crypto: add asynchronous compression api

2016-09-22 Thread Giovanni Cabiddu
Add acomp, an asynchronous compression api that uses scatterlist buffers Signed-off-by: Giovanni Cabiddu --- crypto/Kconfig | 10 ++ crypto/Makefile | 2 + crypto/acompress.c | 118 crypto/crypto_user.c

<    1   2   3   >