Re: [PATCH 2/2] hwrng: mxc-rnga - add driver support on boards with device tree

2018-02-27 Thread Kim Phillips
On Mon, 26 Feb 2018 20:38:49 +0200 Vladimir Zapolskiy wrote: > +#ifdef CONFIG_OF > +static const struct of_device_id mxc_rnga_of_match[] = { > + { .compatible = "fsl,imx31-rnga", }, > + { /* sentinel */ }, > +}; > +MODULE_DEVICE_TABLE(of, mxc_rnga_of_match); > +#endif > +

Re: [PATCH] crypto/ccp: don't disable interrupts while setting up debugfs

2018-02-27 Thread Gary R Hook
On 02/26/2018 02:35 AM, Sebastian Andrzej Siewior wrote: On 2018-02-25 21:04:27 [-0500], Hook, Gary wrote: On 2/23/2018 5:33 PM, Sebastian Andrzej Siewior wrote: I don't why we need take a single write lock and disable interrupts while setting up debugfs. This is what what happens when we try

Re: Can a driver->probe be called for two devices at the same time (WAS: Re: [PATCH] crypto/ccp: don't disable interrupts while setting up debugfs)

2018-02-27 Thread Gary R Hook
On 02/27/2018 11:33 AM, Sebastian Andrzej Siewior wrote: On 2018-02-27 11:08:56 [-0600], Gary R Hook wrote: That issue remains unclear to me: Are probes of PCI devices guaranteed to be serialized? Observations on my CCPs says that they occur in order, but I don't know for certain that

Can a driver->probe be called for two devices at the same time (WAS: Re: [PATCH] crypto/ccp: don't disable interrupts while setting up debugfs)

2018-02-27 Thread Sebastian Andrzej Siewior
On 2018-02-27 11:08:56 [-0600], Gary R Hook wrote: > That issue remains unclear to me: Are probes of PCI devices guaranteed to be > serialized? Observations on my CCPs says that they occur in order, but I > don't know for certain that serialization is guaranteed. > > Is there a definitive

Re: [PATCH 2/2] hwrng: mxc-rnga - add driver support on boards with device tree

2018-02-27 Thread Vladimir Zapolskiy
On 02/27/2018 05:49 PM, Kim Phillips wrote: > On Mon, 26 Feb 2018 20:38:49 +0200 > Vladimir Zapolskiy wrote: > >> +#ifdef CONFIG_OF >> +static const struct of_device_id mxc_rnga_of_match[] = { >> +{ .compatible = "fsl,imx31-rnga", }, >> +{ /* sentinel */ }, >> +}; >>

Re: Can a driver->probe be called for two devices at the same time (WAS: Re: [PATCH] crypto/ccp: don't disable interrupts while setting up debugfs)

2018-02-27 Thread Gary R Hook
On 02/27/2018 01:36 PM, Sebastian Andrzej Siewior wrote: On 2018-02-27 19:40:34 [+0100], Greg Kroah-Hartman wrote: On Tue, Feb 27, 2018 at 06:33:14PM +0100, Sebastian Andrzej Siewior wrote: On 2018-02-27 11:08:56 [-0600], Gary R Hook wrote: That issue remains unclear to me: Are probes of PCI

Re: [PATCH 2/2] hwrng: mxc-rnga - add driver support on boards with device tree

2018-02-27 Thread Kim Phillips
On Tue, 27 Feb 2018 18:53:08 +0200 Vladimir Zapolskiy wrote: > On 02/27/2018 05:49 PM, Kim Phillips wrote: > > On Mon, 26 Feb 2018 20:38:49 +0200 > > Vladimir Zapolskiy wrote: > > > >> +#ifdef CONFIG_OF > >> +static const struct of_device_id mxc_rnga_of_match[]

Re: Can a driver->probe be called for two devices at the same time (WAS: Re: [PATCH] crypto/ccp: don't disable interrupts while setting up debugfs)

2018-02-27 Thread Sebastian Andrzej Siewior
On 2018-02-27 19:40:34 [+0100], Greg Kroah-Hartman wrote: > On Tue, Feb 27, 2018 at 06:33:14PM +0100, Sebastian Andrzej Siewior wrote: > > On 2018-02-27 11:08:56 [-0600], Gary R Hook wrote: > > > That issue remains unclear to me: Are probes of PCI devices guaranteed to > > > be > > > serialized?

Re: Can a driver->probe be called for two devices at the same time (WAS: Re: [PATCH] crypto/ccp: don't disable interrupts while setting up debugfs)

2018-02-27 Thread Greg Kroah-Hartman
On Tue, Feb 27, 2018 at 06:33:14PM +0100, Sebastian Andrzej Siewior wrote: > On 2018-02-27 11:08:56 [-0600], Gary R Hook wrote: > > That issue remains unclear to me: Are probes of PCI devices guaranteed to be > > serialized? Observations on my CCPs says that they occur in order, but I > > don't

Re: [PATCH 2/2] hwrng: mxc-rnga - add driver support on boards with device tree

2018-02-27 Thread Vladimir Zapolskiy
On 02/27/2018 09:39 PM, Kim Phillips wrote: > On Tue, 27 Feb 2018 18:53:08 +0200 > Vladimir Zapolskiy wrote: > >> On 02/27/2018 05:49 PM, Kim Phillips wrote: >>> On Mon, 26 Feb 2018 20:38:49 +0200 >>> Vladimir Zapolskiy wrote: >>> +#ifdef CONFIG_OF

[PATCH 6/6] crypto: omap-aes: make queue length configurable

2018-02-27 Thread Tero Kristo
Crypto driver queue size can now be configured from userspace. This allows optimizing the queue usage based on use case. Default queue size is still 10 entries. Signed-off-by: Tero Kristo --- drivers/crypto/omap-aes.c | 43 +++ 1 file

[PATCH 0/6] crypto: omap: fixes + tweaks for omap crypto

2018-02-27 Thread Tero Kristo
Hi, This series contains a couple of fixes for LPAE data handling (patch #1/#2), and also a few configuration patches (#3..#6.) Without the fixes, the driver will see crashes in certain data configs, most notably when using cryptodev and passing data buffers from userspace. All these patches can

[PATCH 1/6] crypto: omap-sham: Verify page zone of scatterlists before starting DMA

2018-02-27 Thread Tero Kristo
In certain platforms like DRA7xx having memory > 2GB with LPAE enabled has a constraint that DMA can be done with the initial 2GB and marks it as ZONE_DMA. But openssl when used with cryptodev does not make sure that input buffer is DMA capable. So, adding a check to verify if the input buffer is

[PATCH 4/6] crypto: omap-sham: make queue length configurable

2018-02-27 Thread Tero Kristo
Crypto driver queue size can now be configured from userspace. This allows optimizing the queue usage based on use case. Default queue size is still 10 entries. Signed-off-by: Tero Kristo --- drivers/crypto/omap-sham.c | 38 ++ 1 file

[PATCH 3/6] crypto: omap-sham: make fallback size configurable

2018-02-27 Thread Tero Kristo
Crypto driver fallback size can now be configured from userspace. This allows optimizing the DMA usage based on use case. Default fallback size of 256 is still used. Signed-off-by: Tero Kristo --- drivers/crypto/omap-sham.c | 56 +++--- 1

[PATCH 2/6] crypto: omap-crypto: Verify page zone scatterlists before starting DMA

2018-02-27 Thread Tero Kristo
In certain platforms like DRA7xx having memory > 2GB with LPAE enabled has a constraint that DMA can be done with the initial 2GB and marks it as ZONE_DMA. But openssl when used with cryptodev does not make sure that input buffer is DMA capable. So, adding a check to verify if the input buffer is

[PATCH 5/6] crypto: omap-aes: make fallback size configurable

2018-02-27 Thread Tero Kristo
Crypto driver fallback size can now be configured from userspace. This allows optimizing the DMA usage based on use case. Detault fallback size of 200 is still used. Signed-off-by: Tero Kristo --- drivers/crypto/omap-aes.c | 48 ++- 1

Re: [PATCH v3 0/4] crypto: AF_ALG AIO improvements

2018-02-27 Thread Stephan Müller
Am Freitag, 23. Februar 2018, 13:00:26 CET schrieb Herbert Xu: Hi Herbert, > On Fri, Feb 23, 2018 at 09:33:33AM +0100, Stephan Müller wrote: > > A simple copy operation, however, will imply that in one AIO recvmsg > > request, only *one* IOCB can be set and processed. > > Sure, but the recvmsg

Re: error in libkcapi 1.0.3 for aead aio

2018-02-27 Thread Stephan Müller
Am Sonntag, 25. Februar 2018, 06:25:06 CET schrieb Harsh Jain: Hi Harsh, > Hi Stephan, > > 1 of the test mentioned in test.sh is failing for AEAD AIO operation even > thought driver is returning EBADMSG(as expected) to af_alg with latest > cryptodev tree. > > Debug log and strace attached. >

Re: [PATCH v4 4/4] ARM: dts: imx7s: add CAAM device node

2018-02-27 Thread Shawn Guo
On Thu, Feb 22, 2018 at 02:22:50PM +, Rui Miguel Silva wrote: > Add CAAM device node to the i.MX7s device tree. > > Cc: Shawn Guo > Cc: Sascha Hauer > Cc: devicet...@vger.kernel.org > Cc: "Horia Geantă" > Cc: Aymen Sghaier

[PATCH 4/4] crypto: bcm: Constify variables in spu2.c

2018-02-27 Thread Hernán Gonzalez
Note: This is compile only tested. Variables constified: *spu2_cipher_type_names *spu2_hash_mode_names *spu2_cipher_mode_names *spu2_hash_type_names Constifying and declaring as static saves 160 bytes. add/remove: 0/4 grow/shrink: 0/0 up/down: 0/-160 (-160) Function

[PATCH 3/4] crypto: bcm: Constify *hash_alg_name[]

2018-02-27 Thread Hernán Gonzalez
Note: This is compile only tested. No gain from this except some self-documenting. Signed-off-by: Hernán Gonzalez --- drivers/crypto/bcm/spu.c | 5 +++-- drivers/crypto/bcm/spu.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git

[PATCH 1/4] crypto: bcm: Remove unused variable (char *tag_to_hash_idx[])

2018-02-27 Thread Hernán Gonzalez
Note: this is compile only tested. Variable was not used anywhere in the code, remove it and save 20 bytes. add/remove: 0/1 grow/shrink: 0/0 up/down: 0/-20 (-20) Function old new delta tag_to_hash_idx 20 - -20

[PATCH 2/4] crypto: bcm: Move *aead_alg_name[] from spu.c to util.c. Constify too.

2018-02-27 Thread Hernán Gonzalez
Note: This is compile only tested. Move variable to where it is actually used. No gain from this except for some self-documenting. Signed-off-by: Hernán Gonzalez --- drivers/crypto/bcm/spu.c | 2 -- drivers/crypto/bcm/spu.h | 1 - drivers/crypto/bcm/util.c | 2 ++