Re: [RFC PATCH] crypto: caam - convert from ablkcipher -> skcipher

2017-07-27 Thread Horia Geantă
On 9/1/2016 1:13 PM, Herbert Xu wrote: > On Mon, Aug 29, 2016 at 05:11:24PM +0300, Horia Geantă wrote: >> (a)blkcipher is being deprecated in favcur of skcipher. >> The main difference is that IV generation is moved out >> of crypto algorithms. >> >> Signed-off-by: Horia Geantă > > Thanks! Please

Re: KPP API and Temporary Keys

2017-07-27 Thread Stephan Müller
Am Freitag, 28. Juli 2017, 02:16:24 CEST schrieb Matt Corallo: Hi Matt, > Hi linux-crypto, > > Working on hacking together a tcpcrypt implementation which needs to use > KPP/ECDH based on new temporary keys for each new connections which uses > encryption. Sadly, the KPP API seems to be very muc

Re: [PATCH 1/3] staging: ccree: Replace kzalloc with devm_kzalloc

2017-07-27 Thread Greg Kroah-Hartman
On Thu, Jul 27, 2017 at 05:27:32PM +0300, Gilad Ben-Yossef wrote: > From: Suniel Mahesh > > It is recommended to use managed function devm_kzalloc, which > simplifies driver cleanup paths and driver code. > This patch does the following: > (a) replace kzalloc with devm_kzalloc. > (b) drop kfree()

Re: [PATCH 0/4] staging: ccree: coding style clean ups

2017-07-27 Thread Greg Kroah-Hartman
On Thu, Jul 27, 2017 at 01:43:14PM +0300, Gilad Ben-Yossef wrote: > Misc. coding style fixes for ccree driver. > > These are the missing patches that failed to apply two weeks ago, > rebased onto latest staging-next. > > By the way, I still do not understand why they failed to apply, > as they ap

Re: [PATCH 2/3] staging: ccree: Convert to devm_ioremap_resource for map, unmap

2017-07-27 Thread Suniel Mahesh
On Friday 28 July 2017 01:18 AM, Dan Carpenter wrote: > On Thu, Jul 27, 2017 at 05:27:33PM +0300, Gilad Ben-Yossef wrote: >> +new_drvdata->cc_base = devm_ioremap_resource(&plat_dev->dev, >> + req_mem_cc_regs); >> +if (IS_ERR(new_drvdata->cc_ba

KPP API and Temporary Keys

2017-07-27 Thread Matt Corallo
Hi linux-crypto, Working on hacking together a tcpcrypt implementation which needs to use KPP/ECDH based on new temporary keys for each new connections which uses encryption. Sadly, the KPP API seems to be very much targeted at long-term keys (likely cause most of the crypto API is used that way -

Re: [PATCH 2/3] staging: ccree: Convert to devm_ioremap_resource for map, unmap

2017-07-27 Thread Dan Carpenter
On Thu, Jul 27, 2017 at 05:27:33PM +0300, Gilad Ben-Yossef wrote: > + new_drvdata->cc_base = devm_ioremap_resource(&plat_dev->dev, > + req_mem_cc_regs); > + if (IS_ERR(new_drvdata->cc_base)) { > + rc = PTR_ERR(new_drvdata->cc_base

Re: [PATCH] staging: ccree: Fix unnecessary NULL check before kfree'ing it

2017-07-27 Thread Gilad Ben-Yossef
Hi, On Thu, Jul 20, 2017 at 4:37 PM, wrote: > From: Suniel Mahesh > > kfree(NULL) is safe and their is no need for a NULL check. Pointed out > by checkpatch. > > Signed-off-by: Suniel Mahesh > --- > Note: > - Patch was compile tested and built(ARCH=arm) on next-20170719. > No build issues re

[PATCH 3/3] staging: ccree: Use platform_get_irq and devm_request_irq

2017-07-27 Thread Gilad Ben-Yossef
From: Suniel Mahesh It is recommended to use managed function devm_request_irq(), which simplifies driver cleanup paths and driver code. This patch does the following: (a) replace platform_get_resource(), request_irq() and corresponding error handling with platform_get_irq() and devm_request_irq(

[PATCH 1/3] staging: ccree: Replace kzalloc with devm_kzalloc

2017-07-27 Thread Gilad Ben-Yossef
From: Suniel Mahesh It is recommended to use managed function devm_kzalloc, which simplifies driver cleanup paths and driver code. This patch does the following: (a) replace kzalloc with devm_kzalloc. (b) drop kfree(), because memory allocated with devm_kzalloc() is automatically freed on driver

[PATCH 2/3] staging: ccree: Convert to devm_ioremap_resource for map, unmap

2017-07-27 Thread Gilad Ben-Yossef
From: Suniel Mahesh It is recommended to use managed function devm_ioremap_resource(), which simplifies driver cleanup paths and driver code. This patch does the following: (a) replace request_mem_region(), ioremap() and corresponding error handling with devm_ioremap_resource(). (b) remove struct

Re: [PATCH v2 1/3] staging: ccree: Replace kzalloc with devm_kzalloc

2017-07-27 Thread Gilad Ben-Yossef
On Tue, Jul 18, 2017 at 1:58 PM, wrote: > From: Suniel Mahesh > > It is recommended to use managed function devm_kzalloc, which > simplifies driver cleanup paths and driver code. > This patch does the following: > (a) replace kzalloc with devm_kzalloc. > (b) drop kfree(), because memory allocate

[PATCH 1/4] staging: ccree: fix parenthesis alignment

2017-07-27 Thread Gilad Ben-Yossef
Fix various remaining parenthesis alignment issues. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_aead.c| 46 + drivers/staging/ccree/ssi_buffer_mgr.c | 30 ++- drivers/staging/ccree/ssi_cipher.c | 2 +- drivers/staging/ccree/ssi_hash.c

[PATCH 2/4] staging: ccree: fix split strings

2017-07-27 Thread Gilad Ben-Yossef
Fix strings in log messages being split across lines and the resulting alignment issues when being fixed. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_aead.c| 9 ++-- drivers/staging/ccree/ssi_buffer_mgr.c | 86 ++--- drivers/staging/ccree/s

[PATCH 3/4] staging: ccree: remove func name from log messages

2017-07-27 Thread Gilad Ben-Yossef
The SSI_LOG macros already add __func__ to log messages, so remove log message that add them a second time in the log message itself. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_aead.c | 4 ++-- drivers/staging/ccree/ssi_cipher.c | 14 +++--- drivers/staging/ccree/ss

[PATCH 4/4] staging: ccree: kmalloc by sizeof var not type

2017-07-27 Thread Gilad Ben-Yossef
Change places where we alloc memory by sizeof type to sizeof var. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_aead.c| 4 ++-- drivers/staging/ccree/ssi_cipher.c | 4 ++-- drivers/staging/ccree/ssi_driver.c | 2 +- drivers/staging/ccree/ssi_hash.c| 4 ++

[PATCH 0/4] staging: ccree: coding style clean ups

2017-07-27 Thread Gilad Ben-Yossef
Misc. coding style fixes for ccree driver. These are the missing patches that failed to apply two weeks ago, rebased onto latest staging-next. By the way, I still do not understand why they failed to apply, as they applied just fine being cherry picked on top of latest staging-next apart for fixe