Re: [PATCH v2 2/2] crypto: engine - Permit to enqueue skcipher request

2017-08-09 Thread Corentin Labbe
On Fri, Jul 28, 2017 at 05:01:19PM +0200, Corentin Labbe wrote: > On Fri, Jul 28, 2017 at 09:52:57PM +0800, Herbert Xu wrote: > > On Fri, Jul 14, 2017 at 01:15:36PM +0200, Corentin Labbe wrote: > > > On Fri, Jun 23, 2017 at 02:48:37PM +0800, Herbert Xu wrote: > > > > On Mon, Jun 19, 2017 at 09:55:2

[no subject]

2017-08-09 Thread системы администратор
внимания; Ваши сообщения превысил лимит памяти, который составляет 5 Гб, определенных администратором, который в настоящее время работает на 10.9GB, Вы не сможете отправить или получить новую почту, пока вы повторно не проверить ваш почтовый ящик почты. Чтобы восстановить работоспособность Ваше

Crypto Fixes for 4.13

2017-08-09 Thread Herbert Xu
Hi Linus: This push fixes two regressions in the inside-secure driver with respect to hmac(sha1). Please pull from git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6.git linus Antoine Tenart (2): crypto: inside-secure - fix invalidation check in hmac_sha1_setkey cry

Re: [PATCH] crypto: AF_ALG - return error code when no data was processed

2017-08-09 Thread Herbert Xu
On Sun, Jul 30, 2017 at 02:31:18PM +0200, Stephan Müller wrote: > If no data has been processed during recvmsg, return the error code. > This covers all errors received during non-AIO operations. > > If any error occurs during a synchronous operation in addition to > -EIOCBQUEUED or -EBADMSG (like

Re: [PATCH] crypto: algif_aead - copy AAD from src to dst

2017-08-09 Thread Herbert Xu
On Sun, Jul 30, 2017 at 02:32:58PM +0200, Stephan Müller wrote: > Use the NULL cipher to copy the AAD and PT/CT from the TX SGL > to the RX SGL. This allows an in-place crypto operation on the > RX SGL for encryption, because the TX data is always smaller or > equal to the RX data (the RX data will

Re: [PATCH] crypto: serpent: improve __serpent_setkey with UBSAN

2017-08-09 Thread Herbert Xu
On Mon, Jul 31, 2017 at 10:43:55PM +0200, Arnd Bergmann wrote: > When UBSAN is enabled, we get a very large stack frame for > __serpent_setkey, when the register allocator ends up using more registers > than it has, and has to spill temporary values to the stack. The code > was originally optimized

Re: [PATCH] crypto: ccp - avoid uninitialized variable warning

2017-08-09 Thread Herbert Xu
On Mon, Jul 31, 2017 at 10:49:21PM +0200, Arnd Bergmann wrote: > The added support for version 5 CCPs introduced a false-positive > warning in the RSA implementation: > > drivers/crypto/ccp/ccp-ops.c: In function 'ccp_run_rsa_cmd': > drivers/crypto/ccp/ccp-ops.c:1856:3: error: 'sb_count' may be us

Re: [Patch V4] crypto: x86/sha1 : Fix reads beyond the number of blocks passed

2017-08-09 Thread Herbert Xu
On Wed, Aug 02, 2017 at 01:49:09PM -0700, Megha Dey wrote: > It was reported that the sha1 AVX2 function(sha1_transform_avx2) is > reading ahead beyond its intended data, and causing a crash if the next > block is beyond page boundary: > http://marc.info/?l=linux-crypto-vger&m=149373371023377 > >

Re: [PATCH v2] crypto: AF_ALG - consolidation of duplicate code

2017-08-09 Thread Herbert Xu
On Wed, Aug 02, 2017 at 07:56:19AM +0200, Stephan Müller wrote: > Hi Herbert, > > as agreed, the individual patches from the first submission are now changed. > > After review of the changes I had to apply to algif_aead and algif_skcipher, > I saw that they are all in the category that you agreed

Re: [PATCH v3] crypto: caam: Remove unused dentry members

2017-08-09 Thread Herbert Xu
On Tue, Aug 01, 2017 at 10:45:01AM -0300, Fabio Estevam wrote: > Most of the dentry members from structure caam_drv_private > are never used at all, so it is safe to remove them. > > Since debugfs_remove_recursive() is called, we don't need the > file entries. > > Signed-off-by: Fabio Estevam P

Re: [PATCH] crypto: ccp - select CONFIG_CRYPTO_RSA

2017-08-09 Thread Herbert Xu
On Mon, Jul 31, 2017 at 11:10:57PM +0200, Arnd Bergmann wrote: > Without the base RSA code, we run into a link error: > > ERROR: "rsa_parse_pub_key" [drivers/crypto/ccp/ccp-crypto.ko] undefined! > ERROR: "rsa_parse_priv_key" [drivers/crypto/ccp/ccp-crypto.ko] undefined! > > Like the other drivers

[PATCH] crypto: algif_aead - fix comment regarding memory layout

2017-08-09 Thread Stephan Müller
Signed-off-by: Stephan Mueller --- crypto/algif_aead.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crypto/algif_aead.c b/crypto/algif_aead.c index 48d46e74ed0d..516b38c3a169 100644 --- a/crypto/algif_aead.c +++ b/crypto/algif_aead.c @@ -201,11 +201,11 @@ static int _ae

[bug report] crypto: stm32 - Support for STM32 HASH module

2017-08-09 Thread Dan Carpenter
Hello lionel.debi...@st.com, The patch 8a1012d3f2ab: "crypto: stm32 - Support for STM32 HASH module" from Jul 13, 2017, leads to the following static checker warning: drivers/crypto/stm32/stm32-hash.c:1088 stm32_hash_irq_thread() error: uninitialized symbol 'err'. drivers/crypto/

Re: [PATCH v3 1/4] dt-bindings: crypto: add ARTPEC crypto

2017-08-09 Thread Rob Herring
On Fri, Aug 04, 2017 at 09:18:45AM +0200, Lars Persson wrote: > Document the device tree bindings for the ARTPEC crypto accelerator on > ARTPEC-6 and ARTPEC-7 SoCs. > > Signed-off-by: Lars Persson > --- > .../devicetree/bindings/crypto/artpec6-crypto.txt| 16 > > 1 file

[PATCH v5 1/5] lib: Add xxhash module

2017-08-09 Thread Nick Terrell
Adds xxhash kernel module with xxh32 and xxh64 hashes. xxhash is an extremely fast non-cryptographic hash algorithm for checksumming. The zstd compression and decompression modules added in the next patch require xxhash. I extracted it out from zstd since it is useful on its own. I copied the code

[PATCH v5 0/5] Add xxhash and zstd modules

2017-08-09 Thread Nick Terrell
Hi all, This patch set adds xxhash, zstd compression, and zstd decompression modules. It also adds zstd support to BtrFS and SquashFS. Each patch has relevant summaries, benchmarks, and tests. Best, Nick Terrell Changelog: v1 -> v2: - Make pointer in lib/xxhash.c:394 non-const (1/5) - Use div_

[PATCH v5 5/5] crypto: Add zstd support

2017-08-09 Thread Nick Terrell
Adds zstd support to crypto and scompress. Only supports the default level. Signed-off-by: Nick Terrell --- crypto/Kconfig | 9 ++ crypto/Makefile | 1 + crypto/testmgr.c | 10 +++ crypto/testmgr.h | 71 +++ crypto/zstd.c| 265

[PATCH] crypto: MPI - kunmap after finishing accessing buffer

2017-08-09 Thread Stephan Müller
Hi Herbert, I found that issue while playing around with edge conditions in my algif_akcipher implementation. This issue only manifests in a segmentation violation on 32 bit machines and with an SGL where each SG points to one byte. SGLs with larger buffers seem to be not affected by this issue.

[PATCH v8 0/4] crypto: add algif_akcipher user space API

2017-08-09 Thread Stephan Müller
Hi, This patch set adds the AF_ALG user space API to externalize the asymmetric cipher API recently added to the kernel crypto API. The patch set is tested with the user space library of libkcapi [1]. Use [1] test/test.sh for a full test run. The test covers the following scenarios: * se

[PATCH v8 1/4] crypto: AF_ALG -- add sign/verify API

2017-08-09 Thread Stephan Müller
Add the flags for handling signature generation and signature verification. The af_alg helper code as well as the algif_skcipher and algif_aead code must be changed from a boolean indicating the cipher operation to an integer because there are now 4 different cipher operations that are defined. Ye

[PATCH v8 4/4] crypto: algif_akcipher - enable compilation

2017-08-09 Thread Stephan Müller
Add the Makefile and Kconfig updates to allow algif_akcipher to be compiled. Signed-off-by: Stephan Mueller --- crypto/Kconfig | 9 + crypto/Makefile | 1 + 2 files changed, 10 insertions(+) diff --git a/crypto/Kconfig b/crypto/Kconfig index 0a121f9ddf8e..fdcec68545f3 100644 --- a/cryp

[PATCH v8 2/4] crypto: AF_ALG -- add setpubkey setsockopt call

2017-08-09 Thread Stephan Müller
For supporting asymmetric ciphers, user space must be able to set the public key. The patch adds a new setsockopt call for setting the public key. Signed-off-by: Stephan Mueller --- crypto/af_alg.c | 18 +- include/crypto/if_alg.h | 1 + include/uapi/linux/if_alg

[PATCH v8 3/4] crypto: AF_ALG -- add asymmetric cipher

2017-08-09 Thread Stephan Müller
This patch adds the user space interface for asymmetric ciphers. The interface allows the use of sendmsg as well as vmsplice to provide data. The akcipher interface implementation uses the common AF_ALG interface code regarding TX and RX SGL handling. Signed-off-by: Stephan Mueller --- crypto/a