Re: [PATCH 2/6] crypto: engine - Permit to enqueue all async requests

2018-01-11 Thread Herbert Xu
On Wed, Jan 03, 2018 at 09:11:05PM +0100, Corentin Labbe wrote: > The crypto engine could actually only enqueue hash and ablkcipher request. > This patch permit it to enqueue any type of crypto_async_request. > > Signed-off-by: Corentin Labbe > --- >

Re: [PATCH 1/2] crypto: Implement a generic crypto statistics

2018-01-11 Thread Stephan Mueller
Am Donnerstag, 11. Januar 2018, 20:56:56 CET schrieb Corentin Labbe: Hi Corentin, > This patch implement a generic way to get statistics about all crypto > usages. > > Signed-off-by: Corentin Labbe > --- > crypto/Kconfig | 11 >

Crypto Fixes for 4.15

2018-01-11 Thread Herbert Xu
Hi Linus: This push fixes a NULL pointer dereference in crypto_remove_spawns that can be triggered through af_alg. Please pull from git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6.git linus Eric Biggers (1): crypto: algapi - fix NULL dereference in

Re: kernel failure while loading X.509 certificate

2018-01-11 Thread Paolo Valente
> Il giorno 11 gen 2018, alle ore 23:37, Arnd Bergmann ha > scritto: > > On Thu, Jan 11, 2018 at 7:29 PM, Paolo Valente > wrote: >> Hi guys, >> this is a help request, for a problem that has been driving me crazy >> all day long, without any success

Re: kernel failure while loading X.509 certificate

2018-01-11 Thread Arnd Bergmann
On Thu, Jan 11, 2018 at 7:29 PM, Paolo Valente wrote: > Hi guys, > this is a help request, for a problem that has been driving me crazy > all day long, without any success :( > > I've compiled a 4.15-rc7 custom kernel on a freshly-installed Fedora > 27, using the usual

Re: [PATCH V4 2/2] ARM: dts: imx7s: add snvs rtc clock

2018-01-11 Thread Rob Herring
On Tue, Jan 09, 2018 at 05:52:06PM +0800, Anson Huang wrote: > Add i.MX7 SNVS RTC clock. > > Signed-off-by: Anson Huang > --- > change since v3: > add optional for clocks in binding doc statement. > Documentation/devicetree/bindings/crypto/fsl-sec4.txt | 17

Re: [PATCH V4 1/2] clk: imx: imx7d: add the snvs clock

2018-01-11 Thread Rob Herring
On Tue, Jan 09, 2018 at 05:52:05PM +0800, Anson Huang wrote: > According to the i.MX7D Reference Manual, > SNVS block has a clock gate, accessing SNVS block > would need this clock gate to be enabled, add it > into clock tree so that SNVS module driver can > operate this clock gate. > >

[PATCH] hwrng: imx-rngc: simplify the power management definitions

2018-01-11 Thread Martin Kaiser
Use the SIMPLE_DEV_PM_OPS() macro instead of populating a struct dev_pm_ops directly. The suspend and resume functions will now be used for both hibernation and suspend to ram. If power management is disabled, SIMPLE_DEV_PM_OPS() evaluates to nothing, The two functions won't be used and won't be

[PATCH 1/2] crypto: Implement a generic crypto statistics

2018-01-11 Thread Corentin Labbe
This patch implement a generic way to get statistics about all crypto usages. Signed-off-by: Corentin Labbe --- crypto/Kconfig | 11 crypto/ablkcipher.c | 9 +++ crypto/acompress.c | 9 +++ crypto/aead.c

[PATCH 2/2] crypto: tools: Add cryptostat userspace

2018-01-11 Thread Corentin Labbe
Signed-off-by: Corentin Labbe --- tools/crypto/getstat.c | 283 + 1 file changed, 283 insertions(+) create mode 100644 tools/crypto/getstat.c diff --git a/tools/crypto/getstat.c b/tools/crypto/getstat.c new file mode 100644

[PATCH 0/2] crypto: Implement generic crypto statistics

2018-01-11 Thread Corentin Labbe
Hello This patch is a try to implement a generic crypto driver statistics. The goal is to have an "ifconfig" for crypto device. Some driver tried to implement this via a debugfs interface. This serie do it directly in the crypto API and give access to stats via the crypto_user(netlink) API. Then

Patch "hwrng: core - sleep interruptible in read" has been added to the 4.4-stable tree

2018-01-11 Thread gregkh
This is a note to let you know that I've just added the patch titled hwrng: core - sleep interruptible in read to the 4.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is:

Re: [Part2 PATCH v9 00/38] x86: Secure Encrypted Virtualization (AMD)

2018-01-11 Thread Paolo Bonzini
On 05/12/2017 02:04, Brijesh Singh wrote: > This part of Secure Encrypted Virtualization (SEV) patch series focuses on KVM > changes required to create and manage SEV guests. > > SEV is an extension to the AMD-V architecture which supports running encrypted > virtual machine (VMs) under the

Re: [PATCH] hwrng: exynos - Signedness bug in exynos_trng_do_read()

2018-01-11 Thread Łukasz Stelmach
It was <2018-01-10 śro 10:36>, when Dan Carpenter wrote: > "val" needs to be signed for the error handling to work. > > Fixes: 6cd225cc5d8a ("hwrng: exynos - add Samsung Exynos True RNG driver") > Signed-off-by: Dan Carpenter > Acked-by: Łukasz Stelmach

[PATCH 0/5] crypto: chelsio - Cleanup and bug fixes

2018-01-11 Thread Harsh Jain
This series include cleanup, bug fixes and authenc algo supporting ctr(aes)-sha operation. Harsh Jain (5): crypto: chelsio - Fix Indentation crypto: chelsio - check for sg null crypto: chelsio - Fix IV updated in XTS operation crypto: chelsio - Add authenc versions of ctr and sha

[PATCH 1/5] crypto: chelsio - Fix Indentation

2018-01-11 Thread Harsh Jain
Fix inconsistent Indenting. Reported-by: Dan Carpenter Signed-off-by: Harsh Jain --- drivers/crypto/chelsio/chcr_algo.c | 28 +--- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git

[PATCH 3/5] crypto: chelsio - Fix IV updated in XTS operation

2018-01-11 Thread Harsh Jain
Skip decrypt operation on IV received from HW for last request. Signed-off-by: Harsh Jain --- drivers/crypto/chelsio/chcr_algo.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) mode change 100644 => 100755 drivers/crypto/chelsio/chcr_algo.c diff --git

[PATCH 2/5] crypto: chelsio - check for sg null

2018-01-11 Thread Harsh Jain
Add warning message if sg is NULL after skipping bytes. Reported-by: Dan Carpenter Signed-off-by: Harsh Jain --- drivers/crypto/chelsio/chcr_algo.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCH 5/5] crypto: chelsio - Remove dst sg size zero check

2018-01-11 Thread Harsh Jain
sg_nents_xlen will take care of zero length sg list. Remove Destination sg list size zero check. Signed-off-by: Harsh Jain --- drivers/crypto/chelsio/chcr_algo.c | 43 -- 1 file changed, 13 insertions(+), 30 deletions(-) diff --git

[PATCH 4/5] crypto: chelsio - Add authenc versions of ctr and sha

2018-01-11 Thread Harsh Jain
Add ctr and sha combination of algo in authenc mode. Signed-off-by: Harsh Jain --- drivers/crypto/chelsio/chcr_algo.c | 215 +++ drivers/crypto/chelsio/chcr_crypto.h | 7 +- 2 files changed, 199 insertions(+), 23 deletions(-) mode change

Re: [PATCH -next] hwrng: exynos - remove redundant dev_err call in exynos_trng_probe()

2018-01-11 Thread Łukasz Stelmach
It was <2018-01-10 śro 14:30>, when Wei Yongjun wrote: > There is a error message within devm_ioremap_resource > already, so remove the dev_err call to avoid redundant > error message. > > Signed-off-by: Wei Yongjun Acked-by: Łukasz Stelmach >

[PATCH -next] staging: ccree: remove redundant dev_err call in init_cc_resources()

2018-01-11 Thread Wei Yongjun
There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Signed-off-by: Wei Yongjun --- drivers/staging/ccree/cc_driver.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git

[PATCH] staging: ccree: don't break lines unnecessarily

2018-01-11 Thread Dan Carpenter
These lines are less than 80 characters so we don't need to break them up into chunks. Signed-off-by: Dan Carpenter diff --git a/drivers/staging/ccree/cc_aead.c b/drivers/staging/ccree/cc_aead.c index 265adffdab41..b58413172231 100644 ---

Re: [PATCH 3/7] crypto: ccree: add ablkcipher support

2018-01-11 Thread Stephan Mueller
Am Donnerstag, 11. Januar 2018, 10:17:10 CET schrieb Gilad Ben-Yossef: Hi Gilad, > + // verify weak keys > + if (ctx_p->flow_mode == S_DIN_to_DES) { > + if (!des_ekey(tmp, key) && > + (crypto_tfm_get_flags(tfm) & CRYPTO_TFM_REQ_WEAK_KEY)) { > +

Re: [PATCH 3/7] crypto: ccree: add ablkcipher support

2018-01-11 Thread Corentin Labbe
On Thu, Jan 11, 2018 at 09:17:10AM +, Gilad Ben-Yossef wrote: > Add CryptoCell ablkcipher support > Hello I have some minor comments: ablkcipher is deprecated, so you need to use skcipher instead. > Signed-off-by: Gilad Ben-Yossef > --- >

[PATCH 1/7] staging: ccree: remove ccree from staging tree

2018-01-11 Thread Gilad Ben-Yossef
Remove the ccree driver from the staging tree in preparation to introducing it in the crypto tree. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/Kconfig|2 - drivers/staging/Makefile |1 -

[PATCH 3/7] crypto: ccree: add ablkcipher support

2018-01-11 Thread Gilad Ben-Yossef
Add CryptoCell ablkcipher support Signed-off-by: Gilad Ben-Yossef --- drivers/crypto/ccree/Makefile|2 +- drivers/crypto/ccree/cc_buffer_mgr.c | 125 drivers/crypto/ccree/cc_buffer_mgr.h | 10 + drivers/crypto/ccree/cc_cipher.c | 1167

[PATCH 2/7] crypto: ccree: introduce CryptoCell driver

2018-01-11 Thread Gilad Ben-Yossef
Introduce basic low level Arm TrustZone CryptoCell HW support. This first patch doesn't actually register any Crypto API transformations, these will follow up in the next patch. This first revision supports the CC 712 REE component. Signed-off-by: Gilad Ben-Yossef ---

[PATCH 6/7] crypto: ccree: add FIPS support

2018-01-11 Thread Gilad Ben-Yossef
Add FIPS mode support to CryptoCell driver Signed-off-by: Gilad Ben-Yossef --- drivers/crypto/ccree/Makefile| 1 + drivers/crypto/ccree/cc_driver.c | 29 +- drivers/crypto/ccree/cc_driver.h | 1 + drivers/crypto/ccree/cc_fips.c | 112

[PATCH 5/7] crypto: ccree: add AEAD support

2018-01-11 Thread Gilad Ben-Yossef
Add CryptoCell AEAD support Signed-off-by: Gilad Ben-Yossef --- drivers/crypto/ccree/Makefile|2 +- drivers/crypto/ccree/cc_aead.c | 2702 ++ drivers/crypto/ccree/cc_aead.h | 109 ++

[PATCH 4/7] crypto: ccree: add ahash support

2018-01-11 Thread Gilad Ben-Yossef
Add CryptoCell async. hash and HMAC support. Signed-off-by: Gilad Ben-Yossef --- drivers/crypto/ccree/Makefile|2 +- drivers/crypto/ccree/cc_buffer_mgr.c | 257 drivers/crypto/ccree/cc_driver.c | 13 + drivers/crypto/ccree/cc_driver.h |1 +

[PATCH 7/7] MAINTAINERS: update ccree entry

2018-01-11 Thread Gilad Ben-Yossef
Update Arm TrustZone CryptoCell driver entry move into drivers/crypto/ Signed-off-by: Gilad Ben-Yossef --- MAINTAINERS | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 1082846..560e068 100644 --- a/MAINTAINERS +++

[PATCH 0/7] Introduce Arm TrustZone CryptoCell

2018-01-11 Thread Gilad Ben-Yossef
Arm TrustZone CryptoCell is a security hardware IP that includes support for hardware based hash, digest, cipher and AEAD operations. This driver provides support for these as part of the Linux Crypto sub-system. The driver spent some time now in the staging tree being cleaned up and is now

Re: Getting the ccree driver out of staging

2018-01-11 Thread Dan Carpenter
Here are my remaining Smatch warnings: drivers/staging/ccree/cc_driver.c:219 init_cc_resources() error: '%pa' can only be followed by one of [dp] drivers/staging/ccree/cc_driver.c 217 218 if (rc) { 219 dev_err(dev, "Failed in dma_set_mask,