Re: [PATCH 0/5] crypto: caam - avoid allocating memory at crypto request runtime

2020-12-03 Thread Ard Biesheuvel
On Thu, 3 Dec 2020 at 02:35, Iuliana Prodan (OSS) wrote: > > From: Iuliana Prodan > > This series removes CRYPTO_ALG_ALLOCATES_MEMORY flag and > allocates the memory needed by the driver, to fulfil a > request, within the crypto request object. > The extra size needed for base extended descriptor

Re: [PATCH 0/5] crypto: caam - avoid allocating memory at crypto request runtime

2020-12-03 Thread Herbert Xu
On Thu, Dec 03, 2020 at 09:34:08AM +0100, Ard Biesheuvel wrote: > > > CRYPTO_ALG_ALLOCATES_MEMORY flag is limited only to > > dm-crypt use-cases, which seems to be 4 entries maximum. > > Therefore in reqsize we allocate memory for maximum 4 entries > > for src and 4 for dst, aligned. > > If the dri

Re: crypto: sun4i-ss: error with kmap

2020-12-03 Thread Corentin Labbe
On Wed, Dec 02, 2020 at 09:59:36PM +0100, Thomas Gleixner wrote: > On Wed, Dec 02 2020 at 20:55, Corentin Labbe wrote: > > On Tue, Dec 01, 2020 at 04:15:08PM +0100, Thomas Gleixner wrote: > > > > The result could be seen at http://kernel.montjoie.ovh/129768.log > > The log is 9Mb, but the ftrace du

[PATCH v7 0/3] Update to zstd-1.4.6

2020-12-03 Thread Nick Terrell
From: Nick Terrell Please pull from g...@github.com:terrelln/linux.git tags/v7-zstd-1.4.6 to get these changes. Alternatively the patchset is included. This patchset upgrades the zstd library to the latest upstream release. The current zstd version in the kernel is a modified version of upst

[PATCH v7 1/3] lib: zstd: Add kernel-specific API

2020-12-03 Thread Nick Terrell
From: Nick Terrell This patch: - Moves `include/linux/zstd.h` -> `include/linux/zstd_lib.h` - Adds a new API in `include/linux/zstd.h` that is functionally equivalent to the in-use subset of the current API. Functions are renamed to avoid symbol collisions with zstd, to make it clear it is

[PATCH v7 2/3] lib: zstd: Add decompress_sources.h for decompress_unzstd

2020-12-03 Thread Nick Terrell
From: Nick Terrell Adds decompress_sources.h which includes every .c file necessary for zstd decompression. This is used in decompress_unzstd.c so the internal structure of the library isn't exposed. This allows us to upgrade the zstd library version without modifying any callers. Instead we jus

Re: [PATCH v6 1/3] lib: zstd: Add kernel-specific API

2020-12-03 Thread Nick Terrell
> On Dec 2, 2020, at 9:03 PM, Michał Mirosław wrote: > > On Thu, Dec 03, 2020 at 03:59:21AM +, Nick Terrell wrote: >> On Dec 2, 2020, at 7:14 PM, Michał Mirosław wrote: >>> On Thu, Dec 03, 2020 at 01:42:03AM +, Nick Terrell wrote: On Dec 2, 2020, at 5:16 PM, Michał Mirosław

[PATCH] crypto: aegis128 - fix link error without SIMD

2020-12-03 Thread Arnd Bergmann
From: Arnd Bergmann When the SIMD portion of the driver is disabled, the compiler cannot figure out in advance if it will be called: ERROR: modpost: "crypto_aegis128_update_simd" [crypto/aegis128.ko] undefined! Add a conditional to let the compiler use dead code elimination as before. Fixes: a

[PATCH] crypto: atmel-i2c - select CONFIG_BITREVERSE

2020-12-03 Thread Arnd Bergmann
From: Arnd Bergmann The bitreverse helper is almost always built into the kernel, but in a rare randconfig build it is possible to hit a case in which it is a loadable module while the atmel-i2c driver is built-in: arm-linux-gnueabi-ld: drivers/crypto/atmel-i2c.o: in function `atmel_i2c_checksu

Re: crypto: sun4i-ss: error with kmap

2020-12-03 Thread Thomas Gleixner
On Thu, Dec 03 2020 at 18:38, Corentin Labbe wrote: > On Wed, Dec 02, 2020 at 09:59:36PM +0100, Thomas Gleixner wrote: >> On Wed, Dec 02 2020 at 20:55, Corentin Labbe wrote: >> > On Tue, Dec 01, 2020 at 04:15:08PM +0100, Thomas Gleixner wrote: >> > >> > The result could be seen at http://kernel.mon

Re: [PATCH] crypto: omap-sham - fix several reference count leaks due to pm_runtime_get_sync

2020-12-03 Thread Herbert Xu
On Mon, Nov 23, 2020 at 09:41:15PM +0800, Wang Xiaojun wrote: > On calling pm_runtime_get_sync() the reference count of the device > is incremented. In case of failure, should decrement the reference > count before returning the error. So we fixed it by replacing it > with pm_runtime_resume_and_get

Re: [PATCH] implements ecdsa 256, 384 and 521 alghorithm in akcipher model; change pcks7 and x509 to load certificates with ecdsa; increment testmgr to test ecdsa algo and finally allows signature and

2020-12-03 Thread Herbert Xu
On Wed, Nov 25, 2020 at 11:03:08PM -0300, Saulo Alessandre wrote: > From: Saulo Alessandre > > Signed-off-by: Saulo Alessandre > --- > Documentation/admin-guide/module-signing.rst | 10 + > crypto/Kconfig | 12 + > crypto/Makefile |

Re: [PATCH 2/5] crypto: hisilicon/sec - add new type of sqe for Kunpeng930

2020-12-03 Thread Herbert Xu
On Thu, Nov 26, 2020 at 10:18:03AM +0800, Longfang Liu wrote: > > diff --git a/drivers/crypto/hisilicon/sec2/sec_crypto.h > b/drivers/crypto/hisilicon/sec2/sec_crypto.h > index 0e933e7..712176b 100644 > --- a/drivers/crypto/hisilicon/sec2/sec_crypto.h > +++ b/drivers/crypto/hisilicon/sec2/sec_cryp

Re: [PATCH 0/5] crypto: hisilicon - add some new algorithms

2020-12-03 Thread Herbert Xu
On Thu, Nov 26, 2020 at 10:18:01AM +0800, Longfang Liu wrote: > As the new Kunpeng930 supports some new algorithms, > the driver needs to be updated > > Longfang Liu (4): > crypto: hisilicon/sec - add new type of sqe for Kunpeng930 > crypto: hisilicon/sec - add new skcipher mode for SEC > cr

Re: [PATCH v2] crypto: arm/aes-ce - work around Cortex-A57/A72 silion errata

2020-12-03 Thread Herbert Xu
On Thu, Nov 26, 2020 at 08:49:07AM +0100, Ard Biesheuvel wrote: > ARM Cortex-A57 and Cortex-A72 cores running in 32-bit mode are affected > by silicon errata #1742098 and #1655431, respectively, where the second > instruction of a AES instruction pair may execute twice if an interrupt > is taken ri

Re: [PATCH] crypto: x86/sha512-intel: Use TEST %reg,%reg instead of CMP $0,%reg

2020-12-03 Thread Herbert Xu
On Fri, Nov 27, 2020 at 10:59:43AM +0100, Uros Bizjak wrote: > CMP $0,%reg can't set overflow flag, so we can use shorter TEST %reg,%reg > instruction when only zero and sign flags are checked (E,L,LE,G,GE > conditions). > > Signed-off-by: Uros Bizjak > Cc: Herbert Xu > Cc: Borislav Petkov > C

Re: [PATCH] crypto: x86/aesni-intel: Use TEST %reg,%reg instead of CMP $0,%reg

2020-12-03 Thread Herbert Xu
On Fri, Nov 27, 2020 at 10:44:52AM +0100, Uros Bizjak wrote: > CMP $0,%reg can't set overflow flag, so we can use shorter TEST %reg,%reg > instruction when only zero and sign flags are checked (E,L,LE,G,GE > conditions). > > Signed-off-by: Uros Bizjak > Cc: Herbert Xu > Cc: Borislav Petkov > C

Re: [PATCH] crypto: ecdh - avoid unaligned accesses in ecdh_set_secret()

2020-12-03 Thread Herbert Xu
On Tue, Nov 24, 2020 at 11:47:19AM +0100, Ard Biesheuvel wrote: > ecdh_set_secret() casts a void* pointer to a const u64* in order to > feed it into ecc_is_key_valid(). This is not generally permitted by > the C standard, and leads to actual misalignment faults on ARMv6 > cores. In some cases, thes

Re: [PATCH] crypto: remove trailing semicolon in macro definition

2020-12-03 Thread Herbert Xu
On Fri, Nov 27, 2020 at 08:23:45AM -0800, t...@redhat.com wrote: > From: Tom Rix > > The macro use will already have a semicolon. > > Signed-off-by: Tom Rix > --- > crypto/seed.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Patch applied. Thanks. -- Email: Herbert Xu Home Page:

Re: [PATCH] crypto: x86/poly1305-intel: Use TEST %reg,%reg instead of CMP $0,%reg

2020-12-03 Thread Herbert Xu
On Fri, Nov 27, 2020 at 11:18:12AM +0100, Uros Bizjak wrote: > CMP $0,%reg can't set overflow flag, so we can use shorter TEST %reg,%reg > instruction when only zero and sign flags are checked (E,L,LE,G,GE > conditions). > > Signed-off-by: Uros Bizjak > Cc: Herbert Xu > Cc: Borislav Petkov > C

Re: [PATCH] crypto: aegis128 - avoid spurious references crypto_aegis128_update_simd

2020-12-03 Thread Herbert Xu
On Mon, Nov 30, 2020 at 01:26:20PM +0100, Ard Biesheuvel wrote: > Geert reports that builds where CONFIG_CRYPTO_AEGIS128_SIMD is not set > may still emit references to crypto_aegis128_update_simd(), which > cannot be satisfied and therefore break the build. These references > only exist in function