[PATCH v4 1/2] crypto: talitos - reorder code in talitos_edesc_alloc()

2019-01-07 Thread Christophe Leroy
This patch moves the mapping of IV after the kmalloc(). This avoids having to unmap in case kmalloc() fails. Signed-off-by: Christophe Leroy --- new in v4 drivers/crypto/talitos.c | 25 +++-- 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/drivers/crypto/tali

[PATCH v4 2/2] crypto: talitos - fix ablkcipher for CONFIG_VMAP_STACK

2019-01-07 Thread Christophe Leroy
[2.364486] WARNING: CPU: 0 PID: 60 at ./arch/powerpc/include/asm/io.h:837 dma_nommu_map_page+0x44/0xd4 [2.373579] CPU: 0 PID: 60 Comm: cryptomgr_test Tainted: GW 4.20.0-rc5-00560-g6bfb52e23a00-dirty #531 [2.384740] NIP: c000c540 LR: c000c584 CTR: [2.38974

Re: [PATCH v3] crypto: talitos - fix ablkcipher for CONFIG_VMAP_STACK

2019-01-07 Thread Herbert Xu
On Fri, Dec 21, 2018 at 08:07:52AM +, Christophe Leroy wrote: > [2.364486] WARNING: CPU: 0 PID: 60 at ./arch/powerpc/include/asm/io.h:837 > dma_nommu_map_page+0x44/0xd4 > [2.373579] CPU: 0 PID: 60 Comm: cryptomgr_test Tainted: GW > 4.20.0-rc5-00560-g6bfb52e23a00-dirty

[PATCH] virtio-rng: Avoid repeated init of completion

2019-01-07 Thread David Tolnay
From: David Tolnay Date: Mon, 7 Jan 2019 14:36:11 -0800 Subject: [PATCH] virtio-rng: Avoid repeated init of completion The virtio-rng driver uses a completion called have_data to wait for a virtio read to be fulfilled by the hypervisor. The completion is reset before placing a buffer on the virti

[PATCH 4.9,4.4] crypto: x86/chacha20 - avoid sleeping with preemption disabled

2019-01-07 Thread Eric Biggers
From: Eric Biggers Hi Greg, please consider applying this to 4.9-stable and 4.4-stable. It's a minimal fix for a bug that was fixed incidentally by a large refactoring in v4.11. >8--8< In chacha20-simd, clear the MAY_SLEEP flag in the blkciphe

[PATCH] crypto: testmgr - split akcipher tests by a key type

2019-01-07 Thread Vitaly Chikunov
Before this, if akcipher_testvec have `public_key_vec' set to true (i.e. having a public key) only sign/encrypt test is performed, but verify/decrypt test is skipped. With a public key we could do encrypt and verify, but to sign and decrypt a private key is required. This logic is correct for enc

Re: [PATCH v3] crypto: talitos - fix ablkcipher for CONFIG_VMAP_STACK

2019-01-07 Thread Christophe Leroy
Le 04/01/2019 à 16:24, Horia Geanta a écrit : On 1/4/2019 5:17 PM, Horia Geanta wrote: On 12/21/2018 10:07 AM, Christophe Leroy wrote: [snip] IV cannot be on stack when CONFIG_VMAP_STACK is selected because the stack cannot be DMA mapped anymore. This looks better, thanks. This patch copi

Re: [RFC PATCH 2/3] crypto: Add Xilinx SHA3 driver

2019-01-07 Thread Eric Biggers
Hi Kalyani, On Mon, Jan 07, 2019 at 02:32:55PM +0530, Kalyani Akula wrote: > This patch adds SHA3 driver suuport for the Xilinx > ZynqMP SoC. > > Signed-off-by: Kalyani Akula [...] > + > +static struct ahash_alg sha3_alg = { > + .init = zynqmp_sha_init, > + .update = zy

Re: [RFC PATCH 2/3] crypto: Add Xilinx SHA3 driver

2019-01-07 Thread Corentin Labbe
On Mon, Jan 07, 2019 at 02:32:55PM +0530, Kalyani Akula wrote: > This patch adds SHA3 driver suuport for the Xilinx > ZynqMP SoC. > > Signed-off-by: Kalyani Akula Hello I have some comment below > +static int zynqmp_sha_init(struct ahash_request *req) > +{ > + const struct zynqmp_eemi_ops

Re: [RFC PATCH 4/4] crypto: Add EC-RDSA algorithm

2019-01-07 Thread Vitaly Chikunov
Stephan, On Mon, Jan 07, 2019 at 09:31:40AM +0100, Stephan Mueller wrote: > Am Montag, 7. Januar 2019, 09:07:10 CET schrieb Vitaly Chikunov: > > > > Why do you manually parse the ASN.1 structure instead of using the ASN.1 > > > parser? > > > > I am not sure this worth effort and will not be most

[RFC PATCH 3/3] ARM64: zynqmp: Add Xilinix SHA-384 node.

2019-01-07 Thread Kalyani Akula
This patch adds a SHA3 DT node for Xilinx ZynqMP SoC. Signed-off-by: Kalyani Akula --- arch/arm64/boot/dts/xilinx/zynqmp.dtsi |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/arch/arm64/boot/dts/xilinx/zynqmp.dtsi b/arch/arm64/boot/dts/xilinx/zynqmp.dtsi index fa4fd77

[RFC PATCH 0/3] Add Xilinx's ZynqMP SHA3 driver support

2019-01-07 Thread Kalyani Akula
This patch set adds support for - dt-binding docs for Xilinx ZynqMP SHA3 driver - Adds Xilinx ZynqMP driver for SHA3 Algorithm - Adds device tree node for ZynqMP SHA3 driver Kalyani Akula (3): dt-bindings: crypto: Add bindings for ZynqMP SHA3 driver crypto: Add Xilinx SHA3 driver ARM64: zyn

[RFC PATCH 2/3] crypto: Add Xilinx SHA3 driver

2019-01-07 Thread Kalyani Akula
This patch adds SHA3 driver suuport for the Xilinx ZynqMP SoC. Signed-off-by: Kalyani Akula --- drivers/crypto/Kconfig | 10 ++ drivers/crypto/Makefile |1 + drivers/crypto/zynqmp-sha.c | 303 +++ 3 files changed, 314 insertions(+), 0 delet

[RFC PATCH 1/3] dt-bindings: crypto: Add bindings for ZynqMP SHA3 driver

2019-01-07 Thread Kalyani Akula
Add documentation to describe Xilinx ZynqMP SHA3 driver bindings. Signed-off-by: Kalyani Akula --- .../devicetree/bindings/crypto/zynqmp-sha.txt | 12 1 files changed, 12 insertions(+), 0 deletions(-) create mode 100755 Documentation/devicetree/bindings/crypto/zynqmp-sha.txt

Re: [RFC PATCH 4/4] crypto: Add EC-RDSA algorithm

2019-01-07 Thread Stephan Mueller
Am Montag, 7. Januar 2019, 09:07:10 CET schrieb Vitaly Chikunov: Hi Vitaly, > > Why do you manually parse the ASN.1 structure instead of using the ASN.1 > > parser? > > I am not sure this worth effort and will not be most degenerate use of > asn1_ber_decoder, since 1) I only need to parse one ty

Re: [RFC PATCH 4/4] crypto: Add EC-RDSA algorithm

2019-01-07 Thread Vitaly Chikunov
Stephan, On Sun, Jan 06, 2019 at 07:11:50PM +0100, Stephan Müller wrote: > Am Sonntag, 6. Januar 2019, 14:36:08 CET schrieb Vitaly Chikunov: > > > Add Elliptic Curve Russian Digital Signature Algorithm (GOST R > > 34.10-2012, RFC 7091, ISO/IEC 14888-3) is one of the Russian (and since > > 2018 th