Re: DMA error when sg->offset value is greater than PAGE_SIZE in Intel IOMMU

2017-09-25 Thread Casey Leedom
| From: Raj, Ashok | Sent: Monday, September 25, 2017 12:03 PM | | On Mon, Sep 25, 2017 at 01:11:04PM -0700, Dan Williams wrote: | > On Mon, Sep 25, 2017 at 1:05 PM, Casey Leedom wrote: | > > | From: Dan Williams | > > |

Re: [PATCH v5 REPOST 1/6] hw_random: place mutex around read functions and buffers.

2017-09-25 Thread Dmitry Torokhov
A bit late to a party, but: On Mon, Dec 8, 2014 at 12:50 AM, Amos Kong wrote: > From: Rusty Russell > > There's currently a big lock around everything, and it means that we > can't query sysfs (eg /sys/devices/virtual/misc/hw_random/rng_current) > while

Re: DMA error when sg->offset value is greater than PAGE_SIZE in Intel IOMMU

2017-09-25 Thread Harsh Jain
On 26-09-2017 00:16, Casey Leedom wrote: > | From: Raj, Ashok > | Sent: Monday, September 25, 2017 8:54 AM > | > | Not sure how the page->offset would end up being greater than page-size? Refer below > | > | If you have additional traces, please send them by. > | > | Is this

[PATCH] crypto: talitos - fix setkey to check key weakness

2017-09-25 Thread Christophe Leroy
Crypto manager test report the following failures: [3.061081] alg: skcipher: setkey failed on test 5 for ecb-des-talitos: flags=100 [3.069342] alg: skcipher-ddst: setkey failed on test 5 for ecb-des-talitos: flags=100 [3.077754] alg: skcipher-ddst: setkey failed on test 5 for

[PATCH] crypto: talitos - fix AEAD for sha224 on non sha224 capable chips

2017-09-25 Thread Christophe Leroy
sha224 AEAD test fails with: [2.803125] talitos ff02.crypto: DEUISR 0x_ [2.808743] talitos ff02.crypto: MDEUISR 0x8010_ [2.814678] talitos ff02.crypto: DESCBUF 0x20731f21_0018 [2.820616] talitos ff02.crypto: DESCBUF

Re: [RESEND RFC PATCH 1/2] Bluetooth: move ecdh allocation outside of ecdh_helper

2017-09-25 Thread Marcel Holtmann
Hi Tudor, > This change is a prerequisite for letting the crypto subsystem generate > the ecc private key for ecdh. Before this change, a new crypto tfm was > allocated, each time, for both key generation and shared secret > computation. With this change, we allocate a single tfm for both cases.

Re: [RESEND RFC PATCH 2/2] Bluetooth: let the crypto subsystem generate the ecc privkey

2017-09-25 Thread Marcel Holtmann
Hi Tudor, > That Bluetooth SMP knows about the private key is pointless, since the > detection of debug key usage is actually via the public key portion. > With this patch, the Bluetooth SMP will stop keeping a copy of the > ecdh private key, except when using debug keys. This way we let the >

[RESEND RFC PATCH 2/2] Bluetooth: let the crypto subsystem generate the ecc privkey

2017-09-25 Thread Tudor Ambarus
That Bluetooth SMP knows about the private key is pointless, since the detection of debug key usage is actually via the public key portion. With this patch, the Bluetooth SMP will stop keeping a copy of the ecdh private key, except when using debug keys. This way we let the crypto subsystem to

[RESEND RFC PATCH 0/2] Bluetooth: let the crypto subsystem generate the ecc privkey

2017-09-25 Thread Tudor Ambarus
That Bluetooth SMP knows about the private key is pointless, since the detection of debug key usage is actually via the public key portion. With this patch set, the Bluetooth SMP will stop keeping a copy of the ecdh private key, except when using debug keys. This way we let the crypto subsystem to

[PATCH 0/5] crypto pr_err() strings should end with newlines

2017-09-25 Thread Arvind Yadav
pr_err() messages should terminated with a new-line to avoid other messages being concatenated onto the end. Arvind Yadav (5): [PATCH 1/5] crypto: omap-aes: pr_err() strings should end with newlines [PATCH 2/5] crypto: virtio: pr_err() strings should end with newlines [PATCH 3/5] crypto:

[PATCH 5/5] crypto: bcm: pr_err() strings should end with newlines

2017-09-25 Thread Arvind Yadav
pr_err() messages should terminated with a new-line to avoid other messages being concatenated onto the end. Signed-off-by: Arvind Yadav --- drivers/crypto/bcm/util.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git

[PATCH 3/5] crypto: chelsio: pr_err() strings should end with newlines

2017-09-25 Thread Arvind Yadav
pr_err() messages should terminated with a new-line to avoid other messages being concatenated onto the end. Signed-off-by: Arvind Yadav --- drivers/crypto/chelsio/chcr_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 1/5] crypto: omap-aes: pr_err() strings should end with newlines

2017-09-25 Thread Arvind Yadav
pr_err() messages should terminated with a new-line to avoid other messages being concatenated onto the end. Signed-off-by: Arvind Yadav --- drivers/crypto/omap-aes-gcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/omap-aes-gcm.c

[PATCH 2/5] crypto: virtio: pr_err() strings should end with newlines

2017-09-25 Thread Arvind Yadav
pr_err() messages should terminated with a new-line to avoid other messages being concatenated onto the end. Signed-off-by: Arvind Yadav --- drivers/crypto/virtio/virtio_crypto_algs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [RESEND RFC PATCH 2/2] Bluetooth: let the crypto subsystem generate the ecc privkey

2017-09-25 Thread Tudor Ambarus
Hi, Marcel, Agreed on all suggestions, I will send a v2 patch set. Thanks, ta

Re: [RESEND RFC PATCH 1/2] Bluetooth: move ecdh allocation outside of ecdh_helper

2017-09-25 Thread Tudor Ambarus
Hi, Marcel, On 09/25/2017 04:02 PM, Marcel Holtmann wrote: diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c index a0ef897..6532689 100644 --- a/net/bluetooth/smp.c +++ b/net/bluetooth/smp.c [cut] @@ -2677,7 +2695,16 @@ static int smp_cmd_public_key(struct l2cap_conn *conn, struct

Re: DMA error when sg->offset value is greater than PAGE_SIZE in Intel IOMMU

2017-09-25 Thread Casey Leedom
| From: Robin Murphy | Sent: Wednesday, September 20, 2017 3:12 AM | | On 20/09/17 09:01, Herbert Xu wrote: | > | > Harsh Jain wrote: | >> | >> While debugging DMA mapping error in chelsio crypto driver we | >> observed that when scatter/gather list

[PATCH] block: cryptoloop - Fix build warning

2017-09-25 Thread Corentin Labbe
This patch fix the following build warning: drivers/block/cryptoloop.c:46:8: warning: variable 'cipher' set but not used [-Wunused-but-set-variable] Signed-off-by: Corentin Labbe --- drivers/block/cryptoloop.c | 2 -- 1 file changed, 2 deletions(-) diff --git

Re: [PATCH v2] crypto: s5p-sss: Add HASH support for Exynos

2017-09-25 Thread Krzysztof Kozlowski
On Fri, Sep 22, 2017 at 08:00:17PM +0200, Kamil Konieczny wrote: > On 19.09.2017 21:03, Krzysztof Kozlowski wrote: > > On Fri, Sep 15, 2017 at 07:50:06PM +0200, Kamil Konieczny wrote: (...) > >> + > >> +/* HASH flags */ > > > > All defines below have "HASH_FLAGS" prefix... so actually useful

Re: DMA error when sg->offset value is greater than PAGE_SIZE in Intel IOMMU

2017-09-25 Thread Raj, Ashok
Hi Casey Sorry, somehow didn't see this one come by. On Mon, Sep 25, 2017 at 05:46:40PM +, Casey Leedom wrote: > | From: Robin Murphy > | Sent: Wednesday, September 20, 2017 3:12 AM > | > | On 20/09/17 09:01, Herbert Xu wrote: > | > > | > Harsh Jain

Re: DMA error when sg->offset value is greater than PAGE_SIZE in Intel IOMMU

2017-09-25 Thread David Woodhouse
On Wed, 2017-09-20 at 16:01 +0800, Herbert Xu wrote: > Harsh Jain wrote: > >  > > While debugging DMA mapping error in chelsio crypto driver we > observed that when scatter/gather list received by driver has some > entry with page->offset > 4096 (PAGE_SIZE). It starts giving

Re: [PATCH] block: cryptoloop - Fix build warning

2017-09-25 Thread Jens Axboe
On 09/25/2017 11:10 AM, Corentin Labbe wrote: > This patch fix the following build warning: > drivers/block/cryptoloop.c:46:8: warning: variable 'cipher' set but not used > [-Wunused-but-set-variable] Thanks, added for 4.15. -- Jens Axboe

Re: DMA error when sg->offset value is greater than PAGE_SIZE in Intel IOMMU

2017-09-25 Thread Dan Williams
On Mon, Sep 25, 2017 at 10:46 AM, Casey Leedom wrote: > | From: Robin Murphy > | Sent: Wednesday, September 20, 2017 3:12 AM > | > | On 20/09/17 09:01, Herbert Xu wrote: > | > > | > Harsh Jain wrote: > | >> > | >> While debugging DMA

Re: DMA error when sg->offset value is greater than PAGE_SIZE in Intel IOMMU

2017-09-25 Thread Casey Leedom
| From: Dan Williams | Sent: Monday, September 25, 2017 12:31 PM | ... | IIUC it looks like this has been broken ever since commit e1605495c716 | "intel-iommu: Introduce domain_sg_mapping() to speed up | intel_map_sg()". I.e. it looks like the calculation for pte_val

Re: DMA error when sg->offset value is greater than PAGE_SIZE in Intel IOMMU

2017-09-25 Thread Dan Williams
On Mon, Sep 25, 2017 at 1:05 PM, Casey Leedom wrote: > | From: Dan Williams > | Sent: Monday, September 25, 2017 12:31 PM > | ... > | IIUC it looks like this has been broken ever since commit e1605495c716 > | "intel-iommu: Introduce

Re: [PATCH v2] crypto: s5p-sss: Add HASH support for Exynos

2017-09-25 Thread Kamil Konieczny
On 19.09.2017 21:03, Krzysztof Kozlowski wrote: > On Fri, Sep 15, 2017 at 07:50:06PM +0200, Kamil Konieczny wrote: >> Add support for MD5, SHA1, SHA256 hash algorithms for Exynos HW. >> It uses the crypto framework asynchronous hash api. >> It is based on omap-sham.c driver. >> S5P has some HW

[PATCH 1/2] crypto/nx: Use percpu send window for NX requests

2017-09-25 Thread Haren Myneni
[PATCH 1/2] crypto/nx: Use percpu send window for NX requests For P9 NX, the send window is opened for each crypto session and closed upon free. But VAS supports 64K windows per chip for all coprocessors including in user space support. So there is a possibility of not getting the window for

Re: [PATCH] mac80211: aead api to reduce redundancy

2017-09-25 Thread Herbert Xu
On Mon, Sep 25, 2017 at 07:22:26AM +0200, Johannes Berg wrote: > > The code moves to crypto/ though, and I'm not even sure I can vouch for > the Makefile choice there. Thanks, I missed that. I don't think this belongs in crypto. This proposed helper is only useful for wireless so it should stay

[PATCH 2/2] crypto/nx: Do not initialize workmem allocation

2017-09-25 Thread Haren Myneni
[PATCH 2/2] crypto/nx: Do not initialize workmem allocation We are using percpu send window on P9 NX (powerNV) instead of opening / closing per each crypto session. Means txwin is removed from workmem. So we do not need to initialize workmem for each request. Signed-off-by: Haren Myneni

[PATCH] hwrng: pr_err() strings should end with newlines

2017-09-25 Thread Arvind Yadav
pr_err() messages should terminated with a new-line to avoid other messages being concatenated onto the end. Signed-off-by: Arvind Yadav --- drivers/char/hw_random/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/char/hw_random/core.c