Re: [RFC/RFT v2 1/2] KEYS: trusted: create trusted keys subsystem

2019-08-01 Thread Sumit Garg
On Thu, 1 Aug 2019 at 22:54, Jarkko Sakkinen wrote: > > On Thu, Jul 18, 2019 at 04:54:45PM +0530, Sumit Garg wrote: > > Move existing code to trusted keys subsystem. Also, rename files with > > "tpm" as suffix which provides the underlying implementation. > > > > Suggested-by: Jarkko Sakkinen > >

Re: Need help with failling gcm_base(ctr,ghash-generic) selftest

2019-08-01 Thread Corentin Labbe
On Fri, Aug 02, 2019 at 12:24:04AM +, Pascal Van Leeuwen wrote: > > -Original Message- > > From: linux-crypto-ow...@vger.kernel.org > > On Behalf Of > > Corentin Labbe > > Sent: Thursday, August 1, 2019 9:43 PM > > To: herb...@gondor.apana.org.au; linux-crypto@vger.kernel.org > > Cc:

Re: [PATCH 0/3] AES GCM fixes for the CCP crypto driver

2019-08-01 Thread Herbert Xu
On Tue, Jul 30, 2019 at 04:05:07PM +, Hook, Gary wrote: > Additional testing features added to the crypto framework (including fuzzy > probing and variations of the lengths of input parameters such as AAD and > authsize) expose some gaps in robustness and function in the CCP driver. > Address t

Re: [PATCH] crypto: caam - defer probing until QMan is available

2019-08-01 Thread Herbert Xu
On Sun, Jul 28, 2019 at 10:26:38PM +0300, Horia Geantă wrote: > When QI (Queue Interface) support is enabled on DPAA 1.x platforms, > defer probing if dependencies (QMan drivers) are not available yet. > > Signed-off-by: Horia Geantă > --- > This patch was previously submitted as part of IOMMU su

Re: [PATCH] hwrng: Use device-managed registration API

2019-08-01 Thread Herbert Xu
On Thu, Jul 25, 2019 at 04:01:55PM +0800, Chuhong Yuan wrote: > Use devm_hwrng_register to simplify the implementation. > Manual unregistration and some remove functions can be > removed now. > > Signed-off-by: Chuhong Yuan > --- > drivers/char/hw_random/atmel-rng.c | 3 +-- > drivers/char/

Re: [PATCH] crypto: jitterentropy: build without sanitizer

2019-08-01 Thread Herbert Xu
On Wed, Jul 24, 2019 at 08:51:55PM +0200, Arnd Bergmann wrote: > Recent clang-9 snapshots double the kernel stack usage when building > this file with -O0 -fsanitize=kernel-hwaddress, compared to clang-8 > and older snapshots, this changed between commits svn364966 and > svn366056: > > crypto/jitt

Re: [PATCH] hwrng: timeriomem - add include guard to timeriomem-rng.h

2019-08-01 Thread Herbert Xu
On Mon, Jul 29, 2019 at 12:32:36AM +0900, Masahiro Yamada wrote: > Add a header include guard just in case. > > Signed-off-by: Masahiro Yamada > --- > > include/linux/timeriomem-rng.h | 5 + > 1 file changed, 5 insertions(+) Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://

Re: [PATCH] crypto: Remove redundant #ifdef in crypto_yield()

2019-08-01 Thread Herbert Xu
On Fri, Jul 26, 2019 at 10:19:07PM +0200, Thomas Gleixner wrote: > While looking at CONFIG_PREEMPT dependencies treewide the #ifdef in > crypto_yield() matched. > > CONFIG_PREEMPT and CONFIG_PREEMPT_VOLUNTARY are mutually exclusive so the > extra !CONFIG_PREEMPT conditional is redundant. > > cond

Re: [PATCH v2] crypto: nx: nx-842-powernv: Add of_node_put() before return

2019-08-01 Thread Herbert Xu
On Wed, Jul 24, 2019 at 01:24:33PM +0530, Nishka Dasgupta wrote: > Each iteration of for_each_compatible_node puts the previous node, but > in the case of a return from the middle of the loop, there is no put, > thus causing a memory leak. Add an of_node_put before the return. > Issue found with Co

Re: [PATCH v5] crypto: caam/qi2 - Add printing dpseci fq stats using debugfs

2019-08-01 Thread Herbert Xu
On Tue, Jul 23, 2019 at 09:14:24AM +, Vakul Garg wrote: > Add support of printing the dpseci frame queue statistics using debugfs. > > Signed-off-by: Vakul Garg > --- > > Changes since v4: > - Corrected license header commenting style > > drivers/crypto/caam/Makefile | 1 + >

Re: [PATCH v2 1/2] crypto: add header include guards

2019-08-01 Thread Herbert Xu
On Tue, Jul 23, 2019 at 08:43:43PM +0900, Masahiro Yamada wrote: > Add header include guards in case they are included multiple times. > > Signed-off-by: Masahiro Yamada > --- > > Changes in v2: None > > include/crypto/sha1_base.h | 5 + > include/crypto/sha256_base.h| 5 + >

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

2019-08-01 Thread Herbert Xu
On Tue, Jul 23, 2019 at 07:24:01AM +, Sverdlin, Alexander (Nokia - DE/Ulm) wrote: > From: Alexander Sverdlin > > 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 durati

Re: [PATCH] crypto: atmel-sha204a: Use device-managed registration API

2019-08-01 Thread Herbert Xu
On Tue, Jul 23, 2019 at 03:19:36PM +0800, Chuhong Yuan wrote: > Use devm_hwrng_register to get rid of manual > unregistration. > > Signed-off-by: Chuhong Yuan > --- > drivers/crypto/atmel-sha204a.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) Patch applied. Thanks. -- Email: Herb

Re: [PATCH 0/2] Add support for the AES-XTS algorithm

2019-08-01 Thread Herbert Xu
On Fri, Jul 26, 2019 at 05:00:31PM +0200, Pascal van Leeuwen wrote: > This patch set adds support for the AES-XTS skcipher algorithm. > > Pascal van Leeuwen (3): > crypto: inside-secure - Move static cipher alg & mode settings to init > crypto: inside-secure - Add support for the AES-XTS algor

Re: [PATCH v7 07/16] fscrypt: add FS_IOC_REMOVE_ENCRYPTION_KEY ioctl

2019-08-01 Thread Eric Biggers
On Thu, Aug 01, 2019 at 03:04:34PM -0700, Eric Biggers wrote: > On Thu, Aug 01, 2019 at 01:31:08AM -0400, Theodore Y. Ts'o wrote: > > On Wed, Jul 31, 2019 at 06:11:40PM -0700, Eric Biggers wrote: > > > > > > Well, it's either > > > > > > 1a. Remove the user's handle. > > > OR > > > 1b. Remove

Re: [PATCH v4] crypto: gcm - restrict assoclen for rfc4543

2019-08-01 Thread Herbert Xu
On Tue, Jul 30, 2019 at 07:30:33PM +0300, Iuliana Prodan wrote: > > diff --git a/crypto/gcm.c b/crypto/gcm.c > index 2f3b50f..8adf64f 100644 > --- a/crypto/gcm.c > +++ b/crypto/gcm.c > @@ -1034,12 +1034,14 @@ static int crypto_rfc4543_copy_src_to_dst(struct > aead_request *req, bool enc) > > st

Re: [PATCH v4 0/3] MediaTek Security random number generator support

2019-08-01 Thread Neal Liu
Dear Matthias, Rob, Mark, Just gentle ping. Thanks > On Mon, 2019-06-24 at 15:24 +0800, Neal Liu wrote: > > These patch series introduce a generic rng driver for Trustzone > > based kernel driver which would like to communicate with ATF > > SIP services. > > > > Patch #1 initials

RE: Need help with failling gcm_base(ctr,ghash-generic) selftest

2019-08-01 Thread Pascal Van Leeuwen
> -Original Message- > From: linux-crypto-ow...@vger.kernel.org > On Behalf Of > Corentin Labbe > Sent: Thursday, August 1, 2019 9:43 PM > To: herb...@gondor.apana.org.au; linux-crypto@vger.kernel.org > Cc: linux-ker...@vger.kernel.org > Subject: Need help with failling gcm_base(ctr,ghash

Re: [PATCH v7 07/16] fscrypt: add FS_IOC_REMOVE_ENCRYPTION_KEY ioctl

2019-08-01 Thread Eric Biggers
On Thu, Aug 01, 2019 at 01:31:08AM -0400, Theodore Y. Ts'o wrote: > On Wed, Jul 31, 2019 at 06:11:40PM -0700, Eric Biggers wrote: > > > > Well, it's either > > > > 1a. Remove the user's handle. > > OR > > 1b. Remove all users' handles. (FSCRYPT_REMOVE_KEY_FLAG_ALL_USERS) > > > > Then > >

Re: [PATCH] linux-next 20190731 - aegis128-core.c fails to build

2019-08-01 Thread Ard Biesheuvel
On Thu, 1 Aug 2019 at 09:08, Valdis Klētnieks wrote: > > On Thu, 01 Aug 2019 09:04:11 +0300, Ard Biesheuvel said: > > > The fact that crypto_aegis128_have_simd() does get optimized away, but > > crypto_aegis128_update_simd() doesn't (which is only called directly > > and not via a function pointer

Need help with failling gcm_base(ctr,ghash-generic) selftest

2019-08-01 Thread Corentin Labbe
Hello I am writing the Allwinner sun8i-ce driver and when running tcrypt I got [ 30.201739] alg: aead: gcm_base(ctr-aes-sun8i-ce,ghash-generic) decryption failed on test vector 3; expected_error=0, actual_error=-74, cfg=\"random: may_sleep use_digest src_divs=[100.0%@+2614] dst_divs=[5.90%@ali

Re: [PATCH v7 07/16] fscrypt: add FS_IOC_REMOVE_ENCRYPTION_KEY ioctl

2019-08-01 Thread Eric Biggers
On Thu, Aug 01, 2019 at 11:35:56AM -0700, Eric Biggers wrote: > > "fscrypt lock" actually doesn't exist yet; it's a missing feature. My patch > to > the fscrypt tool adds it. So we get to decide on the semantics. We don't > want > to require root, though; so for v2 policy keys, the real seman

Re: [PATCH v7 07/16] fscrypt: add FS_IOC_REMOVE_ENCRYPTION_KEY ioctl

2019-08-01 Thread Eric Biggers
On Thu, Aug 01, 2019 at 01:31:08AM -0400, Theodore Y. Ts'o wrote: > On Wed, Jul 31, 2019 at 06:11:40PM -0700, Eric Biggers wrote: > > > > Well, it's either > > > > 1a. Remove the user's handle. > > OR > > 1b. Remove all users' handles. (FSCRYPT_REMOVE_KEY_FLAG_ALL_USERS) > > > > Then > >

Re: [RFC/RFT v2 1/2] KEYS: trusted: create trusted keys subsystem

2019-08-01 Thread Jarkko Sakkinen
On Thu, Jul 18, 2019 at 04:54:45PM +0530, Sumit Garg wrote: > Move existing code to trusted keys subsystem. Also, rename files with > "tpm" as suffix which provides the underlying implementation. > > Suggested-by: Jarkko Sakkinen > Signed-off-by: Sumit Garg What about TPM2 trusted keys code? /

Re: [RFC 0/9] dt-bindings: first tentative of conversion to yaml format

2019-08-01 Thread Rob Herring
On Thu, Aug 1, 2019 at 7:56 AM Neil Armstrong wrote: > > This is a first tentative to convert some of the simplest Amlogic > dt-bindings to the yaml format. Great to see this. I've gone thru all of the patches. Some of the same minor comments I made also apply to the patches I didn't comment on.

[RFC 2/9] dt-bindings: rng: amlogic,meson-rng: convert to yaml

2019-08-01 Thread Neil Armstrong
Signed-off-by: Neil Armstrong --- .../bindings/rng/amlogic,meson-rng.txt| 21 --- .../bindings/rng/amlogic,meson-rng.yaml | 37 +++ 2 files changed, 37 insertions(+), 21 deletions(-) delete mode 100644 Documentation/devicetree/bindings/rng/amlogic,meson-rng.

[RFC 0/9] dt-bindings: first tentative of conversion to yaml format

2019-08-01 Thread Neil Armstrong
This is a first tentative to convert some of the simplest Amlogic dt-bindings to the yaml format. All have been tested using : $ make ARCH=arm64 dtbs_check Issues with the amlogic arm64 DTs has already been identified thanks to the validation scripts. The DT fixes will be pushed once these yaml b

Re: [PATCH 2/4] crypto: amlogic: Add crypto accelerator for amlogic GXL

2019-08-01 Thread LABBE Corentin
On Sat, Jul 27, 2019 at 02:17:38PM +0200, Martin Blumenstingl wrote: > Hi Corentin, > > it's great to see you working on this :) > > On Thu, Jul 25, 2019 at 9:45 PM Corentin Labbe wrote: > > > > This patch adds support for the amlogic GXL cryptographic offloader present > > on GXL SoCs. > > > >

[PATCH 3/5] crypto: Reduce default RT priority

2019-08-01 Thread Peter Zijlstra
The crypto engine initializes its kworker thread to FIFO-99 (when requesting RT priority), reduce this to FIFO-50. FIFO-99 is the very highest priority available to SCHED_FIFO and it not a suitable default; it would indicate the crypto work is the most important work on the machine. Cc: Herbert X

Re: [PATCH] asm-generic: Remove redundant arch-specific rules for simd.h

2019-08-01 Thread Arnd Bergmann
On Thu, Aug 1, 2019 at 4:11 AM Herbert Xu wrote: > Now that simd.h is in include/asm-generic/Kbuild we don't need > the arch-specific Kbuild rules for them. > > Reported-by: Stephen Rothwell > Fixes: 82cb54856874 ("asm-generic: make simd.h a mandatory...") > Signed-off-by: Herbert Xu Acked-by:

Re: [PATCH] asm-generic: Remove redundant arch-specific rules for simd.h

2019-08-01 Thread Ard Biesheuvel
On Thu, 1 Aug 2019 at 05:11, Herbert Xu wrote: > > On Thu, Aug 01, 2019 at 11:53:46AM +1000, Stephen Rothwell wrote: > > Hi all, > > > > After merging the crypto tree, today's linux-next build (arm > > multi_v7_defconfig) produced this warning: > > > > scripts/Makefile.asm-generic:25: redundant ge

Re: [PATCH v3 0/2] crypto: validate inputs for gcm and aes

2019-08-01 Thread Ard Biesheuvel
On Wed, 31 Jul 2019 at 16:35, Horia Geanta wrote: > > On 7/31/2019 4:06 PM, Iuliana Prodan wrote: > > Added inline helper functions to check authsize and assoclen for > > gcm, rfc4106 and rfc4543. > > Added, also, inline helper function to check key length for AES algorithms. > > These are used in