crypto: Remove orphan tools/crypto directory

2019-07-09 Thread Herbert Xu
The directory tools/crypto and the only file under it never gets built anywhere. This program should instead be incorporated into one of the existing user-space projects, crconf or libkcapi. Signed-off-by: Herbert Xu diff --git a/tools/crypto/getstat.c b/tools/crypto/getstat.c deleted file mode

Re: [PATCH v2] crypto: ccp - memset structure fields to zero before reuse

2019-07-09 Thread Eric Biggers
On Wed, Jul 10, 2019 at 12:09:22AM +, Hook, Gary wrote: > The AES GCM function reuses an 'op' data structure, which members > contain values that must be cleared for each (re)use. > > This fix resolves a crypto self-test failure: > alg: aead: gcm-aes-ccp encryption test failed (wrong result) o

Re: [PATCH] crypto: ccp - memset structure fields to zero before reuse

2019-07-09 Thread Eric Biggers
On Tue, Jul 09, 2019 at 11:34:08PM +, Gary R Hook wrote: > On 7/9/19 5:56 PM, Eric Biggers wrote: > > On Tue, Jul 09, 2019 at 10:09:16PM +, Gary R Hook wrote: > >> On 7/9/19 3:10 PM, Eric Biggers wrote: > >>> On Mon, Jul 08, 2019 at 05:08:09PM +, Gary R Hook wrote: > On 7/5/19 2:40

[PATCH v2] crypto: ccp - memset structure fields to zero before reuse

2019-07-09 Thread Hook, Gary
The AES GCM function reuses an 'op' data structure, which members contain values that must be cleared for each (re)use. This fix resolves a crypto self-test failure: alg: aead: gcm-aes-ccp encryption test failed (wrong result) on test vector 2, cfg="two even aligned splits" Fixes: 36cf515b9bbe (

Re: [PATCH] crypto: ccp - memset structure fields to zero before reuse

2019-07-09 Thread Gary R Hook
On 7/9/19 5:56 PM, Eric Biggers wrote: > On Tue, Jul 09, 2019 at 10:09:16PM +, Gary R Hook wrote: >> On 7/9/19 3:10 PM, Eric Biggers wrote: >>> On Mon, Jul 08, 2019 at 05:08:09PM +, Gary R Hook wrote: On 7/5/19 2:40 PM, Eric Biggers wrote: > Hi Gary, > > On Wed, Jul 03, 201

Re: [PATCH] crypto: ccp - memset structure fields to zero before reuse

2019-07-09 Thread Eric Biggers
On Tue, Jul 09, 2019 at 10:09:16PM +, Gary R Hook wrote: > On 7/9/19 3:10 PM, Eric Biggers wrote: > > On Mon, Jul 08, 2019 at 05:08:09PM +, Gary R Hook wrote: > >> On 7/5/19 2:40 PM, Eric Biggers wrote: > >>> Hi Gary, > >>> > >>> On Wed, Jul 03, 2019 at 07:21:26PM +, Hook, Gary wrote: >

Re: [PATCH] crypto: ccp - memset structure fields to zero before reuse

2019-07-09 Thread Gary R Hook
On 7/9/19 3:10 PM, Eric Biggers wrote: > On Mon, Jul 08, 2019 at 05:08:09PM +, Gary R Hook wrote: >> On 7/5/19 2:40 PM, Eric Biggers wrote: >>> Hi Gary, >>> >>> On Wed, Jul 03, 2019 at 07:21:26PM +, Hook, Gary wrote: The AES GCM function reuses an 'op' data structure, which members >>>

Re: [PATCH] crypto: ccp - memset structure fields to zero before reuse

2019-07-09 Thread Eric Biggers
On Mon, Jul 08, 2019 at 05:08:09PM +, Gary R Hook wrote: > On 7/5/19 2:40 PM, Eric Biggers wrote: > > Hi Gary, > > > > On Wed, Jul 03, 2019 at 07:21:26PM +, Hook, Gary wrote: > >> The AES GCM function reuses an 'op' data structure, which members > >> contain values that must be cleared for

[PATCH] crypto/crypto_user02.c: new test that tries to delete larval algorithm

2019-07-09 Thread Eric Biggers
From: Eric Biggers Test for a bug in the crypto user configuration API (NETLINK_CRYPTO) where it incorrectly allowed operating on "larval" algorithms. Signed-off-by: Eric Biggers --- runtest/crypto | 1 + testcases/kernel/crypto/.gitignore | 1 + testcases/ker

Re: [PATCH] crypto: user - make NETLINK_CRYPTO work inside netns

2019-07-09 Thread Herbert Xu
On Tue, Jul 09, 2019 at 05:28:35PM +0200, Ondrej Mosnacek wrote: > > I admit I'm not an expert on Linux namespaces, but aren't you > confusing network and user namespaces? Unless I'm mistaken, these > changes only affect _network_ namespaces (which only isolate the > network stuff itself) and the s

RE: CAVS test harness

2019-07-09 Thread Bhat, Jayalakshmi Manjunath
Hi Gilad, Thank you very much for the response. I am an entry level engineer when it comes to Linux Kernel. I have gone through the testmgr. I am not very clear on how to use it for KAT (Known answer tests), MMT and MCT tests. Also I am not clear on how to use it with various test vectors for

Re: [PATCH] crypto: user - make NETLINK_CRYPTO work inside netns

2019-07-09 Thread Ondrej Mosnacek
On Tue, Jul 9, 2019 at 4:38 PM Herbert Xu wrote: > On Tue, Jul 09, 2019 at 01:11:24PM +0200, Ondrej Mosnacek wrote: > > Currently, NETLINK_CRYPTO works only in the init network namespace. It > > doesn't make much sense to cut it out of the other network namespaces, > > so do the minor plumbing wor

[PATCH] crypto: cavium/nitrox - Add support for loading asymmetric crypto firmware

2019-07-09 Thread Phani Kiran Hemadri
This patch adds support to load Asymmetric crypto firmware on AE cores of CNN55XX device. Firmware is stored on UCD block 2 and all available AE cores are tagged to group 0. Signed-off-by: Phani Kiran Hemadri Reviewed-by: Srikanth Jampala --- drivers/crypto/cavium/nitrox/nitrox_csr.h | 124

[PATCH v2 2/4] crypto: ccp - Add a module parameter to specify a queue count

2019-07-09 Thread Hook, Gary
Add a module parameter to limit the number of queues per CCP. The default value (nqueues=0) is to set up every available queue on each device. The count of queues starts from the first one found on the device (which varies based on the device ID). Signed-off-by: Gary R Hook --- drivers/crypto/c

[PATCH v2 4/4] crypto: ccp - Add a module parameter to control registration for DMA

2019-07-09 Thread Hook, Gary
The CCP driver is able to act as a DMA engine. Add a module parameter that allows this feature to be enabled/disabled. Signed-off-by: Gary R Hook --- drivers/crypto/ccp/ccp-dmaengine.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/crypto/ccp/ccp-dmaen

[PATCH v2 3/4] crypto: ccp - module parameter to limit the number of enabled CCPs

2019-07-09 Thread Hook, Gary
Provide the ability to constrain the total number of enabled devices in the system. Once max_devs devices have been configured, subsequently probed devices are ignored. The max_devs parameter may be zero, in which case all CCPs are disabled. PSPs are always enabled and active. Disabling the CCPs

[PATCH v2 1/4] crypto: ccp - Make CCP debugfs support optional

2019-07-09 Thread Hook, Gary
Add a config option to exclude DebugFS support in the CCP driver. Signed-off-by: Gary R Hook --- drivers/crypto/ccp/Kconfig |8 drivers/crypto/ccp/Makefile |4 ++-- drivers/crypto/ccp/ccp-dev-v5.c |4 3 files changed, 14 insertions(+), 2 deletions(-) diff --gi

[PATCH v2 0/4] Add module parameters to control CCP activation

2019-07-09 Thread Hook, Gary
Firstly, add a switch to allow/disallow debugfs code to be built into the CCP driver. This rest of the patch series implements a set of module parameters that allows control over which CCPs on a system are enabled by the driver, and how many queues on each device are activated. A switch to enable

Re: [PATCH] crypto: user - make NETLINK_CRYPTO work inside netns

2019-07-09 Thread Herbert Xu
On Tue, Jul 09, 2019 at 01:11:24PM +0200, Ondrej Mosnacek wrote: > Currently, NETLINK_CRYPTO works only in the init network namespace. It > doesn't make much sense to cut it out of the other network namespaces, > so do the minor plumbing work necessary to make it work in any network > namespace. Co

Re: CAVS test harness

2019-07-09 Thread Gilad Ben-Yossef
On Tue, Jul 9, 2019 at 9:44 AM Bhat, Jayalakshmi Manjunath wrote: > > Hi All, > > We are working on a product that requires NIAP certification and use IPSec > environment for certification. IPSec functionality is achieved by third party > IPsec library and native XFRM. > Third party IPsec libra

[PATCH] crypto: user - make NETLINK_CRYPTO work inside netns

2019-07-09 Thread Ondrej Mosnacek
Currently, NETLINK_CRYPTO works only in the init network namespace. It doesn't make much sense to cut it out of the other network namespaces, so do the minor plumbing work necessary to make it work in any network namespace. Code inspired by net/core/sock_diag.c. Tested using kcapi-dgst from libkca