Re: [PATCH] scatterlist: Update size type to support greater then 4GB size.

2018-12-11 Thread Ard Biesheuvel
On Wed, 12 Dec 2018 at 07:25, Ashish Mhetre wrote: > > From: Krishna Reddy > > In the cases where greater than 4GB allocations are required, current > definition of scatterlist doesn't support it. For example, Tegra devices > have more than 4GB of system memory available. So they are expected to

Re: [PATCH] scatterlist: Update size type to support greater then 4GB size.

2018-12-11 Thread Ashish Mhetre
On 12/12/18 12:19 PM, Sagi Grimberg wrote:   struct nvme_sgl_desc {   __le64    addr; -    __le32    length; +    __le64    length;   __u8    rsvd[3];   __u8    type;   }; Isn't this a device or protocol defined datastructure?  You can't just change it like this. You're corre

Re: [PATCH] scatterlist: Update size type to support greater then 4GB size.

2018-12-11 Thread Sagi Grimberg
struct nvme_sgl_desc { __le64 addr; - __le32 length; + __le64 length; __u8rsvd[3]; __u8type; }; Isn't this a device or protocol defined datastructure? You can't just change it like this. You're correct, we can't... [Replied before seeing t

Re: [PATCH] scatterlist: Update size type to support greater then 4GB size.

2018-12-11 Thread Sagi Grimberg
struct nvme_sgl_desc { __le64 addr; - __le32 length; + __le64 length; __u8rsvd[3]; __u8type; }; in what world changing a wire protocol for this make sense? please get rid of this hunk, NVMe will never cross the 32 bit sg element size.

Re: [PATCH] scatterlist: Update size type to support greater then 4GB size.

2018-12-11 Thread David Miller
From: Ashish Mhetre Date: Wed, 12 Dec 2018 11:54:13 +0530 > diff --git a/include/linux/nvme.h b/include/linux/nvme.h > index 68e91ef..0a07a29 100644 > --- a/include/linux/nvme.h > +++ b/include/linux/nvme.h > @@ -587,7 +587,7 @@ enum { > > struct nvme_sgl_desc { > __le64 addr; > - _

[PATCH] scatterlist: Update size type to support greater then 4GB size.

2018-12-11 Thread Ashish Mhetre
From: Krishna Reddy In the cases where greater than 4GB allocations are required, current definition of scatterlist doesn't support it. For example, Tegra devices have more than 4GB of system memory available. So they are expected to support larger allocation requests. This patch updates the type

Re: [PATCH] fscrypt: remove CRYPTO_CTR dependency

2018-12-11 Thread Theodore Y. Ts'o
On Tue, Dec 04, 2018 at 03:45:07PM -0800, Eric Biggers wrote: > On Thu, Sep 06, 2018 at 12:43:41PM +0200, Ard Biesheuvel wrote: > > On 5 September 2018 at 21:24, Eric Biggers wrote: > > > From: Eric Biggers > > > > > > fscrypt doesn't use the CTR mode of operation for anything, so there's > > > n

Re: [PATCH] crypto: ux500 - Use proper enum in hash_set_dma_transfer

2018-12-11 Thread Nick Desaulniers
On Mon, Dec 10, 2018 at 3:50 PM Nathan Chancellor wrote: > > Clang warns when one enumerated type is implicitly converted to another: > > drivers/crypto/ux500/hash/hash_core.c:169:4: warning: implicit > conversion from enumeration type 'enum dma_data_direction' to different > enumeration type 'enu

Re: [PATCH] crypto: ux500 - Use proper enum in cryp_set_dma_transfer

2018-12-11 Thread Nick Desaulniers
On Mon, Dec 10, 2018 at 3:49 PM Nathan Chancellor wrote: > > Clang warns when one enumerated type is implicitly converted to another: > > drivers/crypto/ux500/cryp/cryp_core.c:559:5: warning: implicit > conversion from enumeration type 'enum dma_data_direction' to different > enumeration type 'enu

Re: [PATCH v11 00/13] Intel SGX1 support

2018-12-11 Thread Sean Christopherson
On Tue, Dec 11, 2018 at 10:10:38AM -0800, Dave Hansen wrote: > On 12/10/18 3:12 PM, Josh Triplett wrote: > >> Or maybe even python/shell scripts? It looked to me like virtual > >> memory will be "interesting" for enclaves. > > Memory management doesn't seem that hard to deal with. > > The problems

Re: [PATCH v11 00/13] Intel SGX1 support

2018-12-11 Thread Dave Hansen
On 12/10/18 3:12 PM, Josh Triplett wrote: >> Or maybe even python/shell scripts? It looked to me like virtual >> memory will be "interesting" for enclaves. > Memory management doesn't seem that hard to deal with. The problems are: 1. SGX enclave memory (EPC) is statically allocated at boot and ca

[RFC PATCH] akcipher: Introduce verify2 for public key algorithms

2018-12-11 Thread Vitaly Chikunov
Current akcipher .verify() just decrypts signature to uncover message hash, which is then verified in upper level public_key_verify_signature by memcmp with the expected signature value, which is never passed into verify(). This approach is incompatible with ECDSA algorithms, because, to verify a

[PATCH 1/6] crypto:chelsio: Swap location of AAD and IV sent in WR

2018-12-11 Thread Harsh Jain
Send input as IV | AAD | Data. It will allow sending IV as Immediate Data and Creates space in Work request to add more dma mapped entries. Signed-off-by: Harsh Jain --- drivers/crypto/chelsio/chcr_algo.c | 212 +-- drivers/crypto/chelsio/chcr_algo.h | 2 +-

[PATCH 6/6] crypto:chelsio: Fix wrong error counter increments

2018-12-11 Thread Harsh Jain
Fix error counter increment in AEAD decrypt operation when validation of tag is done in Driver instead of H/W. Signed-off-by: Harsh Jain --- drivers/crypto/chelsio/chcr_algo.c | 9 + drivers/crypto/chelsio/chcr_core.c | 11 +-- 2 files changed, 10 insertions(+), 10 deletions(-)

[PATCH 5/6] crypto:chelsio: Reset counters on cxgb4 Detach

2018-12-11 Thread Harsh Jain
Reset the counters on receiving detach from Cxgb4. Signed-off-by: Atul Gupta --- drivers/crypto/chelsio/chcr_core.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/crypto/chelsio/chcr_core.c b/drivers/crypto/chelsio/chcr_core.c index f71a979..e04b3e8 100644 --- a/drivers/crypto/

[PATCH 3/6] crypto:chelsio: cleanup:send addr as value in function argument

2018-12-11 Thread Harsh Jain
Send dma address as value to function arguments instead of pointer. Signed-off-by: Harsh Jain --- drivers/crypto/chelsio/chcr_algo.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/crypto/chelsio/chcr_algo.c b/drivers/crypto/chelsio/chcr_algo.c index

[PATCH 4/6] Crypto:Chelsio:Handle PCI shutdown event

2018-12-11 Thread Harsh Jain
chcr receives "CXGB4_STATE_DETACH" event on PCI Shutdown. Wait for processing of inflight request and Mark the device unavailable. Signed-off-by: Harsh Jain --- drivers/crypto/chelsio/chcr_algo.c | 157 ++-- drivers/crypto/chelsio/chcr_core.c | 180 +++

[PATCH 0/6] crypto:chelsio: Bug Fixes

2018-12-11 Thread Harsh Jain
It includes Bug Fixes Harsh Jain (5): crypto:chcr: Swap location of AAD and IV sent in WR crypto:chcr:Use same value for both channel in single WR crypto:chcr: cleanup:send addr as value in function argument crypto:chelsio: Fix wrong error counter increments Crypto:Chelsio:Handle PCI shu

[PATCH 2/6] crypto:chelsio:Use same value for both channel in single WR

2018-12-11 Thread Harsh Jain
Use tx_channel_id instead of rx_channel_id. Signed-off-by: Harsh Jain --- drivers/crypto/chelsio/chcr_algo.c | 13 ++--- drivers/crypto/chelsio/chcr_core.h | 1 - 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/crypto/chelsio/chcr_algo.c b/drivers/crypto/chelsio/

[tls 4/5] crypto/chelsio/chtls: macro correction in tx path

2018-12-11 Thread Atul Gupta
corrected macro used in tx path. removed redundant hdrlen and check for !page in chtls_sendmsg Signed-off-by: Atul Gupta --- drivers/crypto/chelsio/chtls/chtls_io.c | 20 drivers/net/ethernet/chelsio/cxgb4/t4_msg.h | 3 +++ 2 files changed, 11 insertions(+), 12 deletion

[tls 5/5] crypto/chelsio/chtls: send/recv window update

2018-12-11 Thread Atul Gupta
recalculated send and receive window using linkspeed. Determine correct value of eck_ok from SYN received and option configured on local system. Signed-off-by: Atul Gupta --- drivers/crypto/chelsio/chtls/chtls.h| 2 + drivers/crypto/chelsio/chtls/chtls_cm.c | 78 ++--

[tls 2/5] net/tls: sleeping function from invalid context

2018-12-11 Thread Atul Gupta
HW unhash within mutex for registered tls devices cause sleep when called from tcp_set_state for TCP_CLOSE. Release lock and re-acquire after function call with ref count incr/dec. defined kref and fp release for tls_device to ensure device is not released outside lock. BUG: sleeping function call

[tls 3/5] crypto/chelsio/chtls: listen fails with multiadapt

2018-12-11 Thread Atul Gupta
listen fails when more than one tls capable device is registered. tls_hw_hash is called for each dev which loops again for each cdev_list causing listen failure. Hence call chtls_listen_start/stop for specific device than loop over all devices. Signed-off-by: Atul Gupta --- drivers/crypto/chelsi

[tls 1/5] net/tls: Init routines in create_ctx

2018-12-11 Thread Atul Gupta
create_ctx is called from tls_init and tls_hw_prot hence initialize function pointers in common routine. Signed-off-by: Atul Gupta --- net/tls/tls_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/tls/tls_main.c b/net/tls/tls_main.c index 311cec8..4920803 10064

Re: [PATCH] crypto: talitos - fix ablkcipher for CONFIG_VMAP_STACK

2018-12-11 Thread Herbert Xu
On Tue, Dec 11, 2018 at 07:29:40AM +, Christophe Leroy wrote: > > diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c > index 6988012deca4..385ec970b639 100644 > --- a/drivers/crypto/talitos.c > +++ b/drivers/crypto/talitos.c > @@ -1668,8 +1668,11 @@ static struct talitos_edesc >

[PATCH -next] crypto: chelsio - remove set but not used variable 'kctx_len'

2018-12-11 Thread YueHaibing
Fixes gcc '-Wunused-but-set-variable' warning: drivers/crypto/chelsio/chcr_ipsec.c: In function 'chcr_ipsec_xmit': drivers/crypto/chelsio/chcr_ipsec.c:674:33: warning: variable 'kctx_len' set but not used [-Wunused-but-set-variable] unsigned int flits = 0, ndesc, kctx_len; It not used since co