[PATCH v1 4/4] crypto: crypto4xx - kill MODULE_NAME

2017-12-22 Thread Christian Lamparter
KBUILD_MODNAME provides the same value. Signed-off-by: Christian Lamparter --- drivers/crypto/amcc/crypto4xx_core.c | 2 +- drivers/crypto/amcc/crypto4xx_core.h | 2 -- drivers/crypto/amcc/crypto4xx_trng.c | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git

[PATCH v1 3/4] crypto: crypto4xx - fix missing irq devname

2017-12-22 Thread Christian Lamparter
crypto4xx_device's name variable is not set to anything. The common devname for request_irq seems to be the module name. This will fix the seemingly anonymous interrupt entry in /proc/interrupts for crypto4xx. Signed-off-by: Christian Lamparter ---

[PATCH v1 1/4] crypto: crypto4xx - shuffle iomap in front of request_irq

2017-12-22 Thread Christian Lamparter
It is possible to avoid the ce_base null pointer check in the drivers' interrupt handler routine "crypto4xx_ce_interrupt_handler()" by simply doing the iomap in front of the IRQ registration. This way, the ce_base will always be valid in the handler and a branch in an critical path can be

[PATCH v1 2/4] crypto: crypto4xx - support Revision B parts

2017-12-22 Thread Christian Lamparter
This patch adds support for the crypto4xx RevB cores found in the 460EX, 460SX and later cores (like the APM821xx). Without this patch, the crypto4xx driver will not be able to process any offloaded requests and simply hang indefinitely. Signed-off-by: Christian Lamparter

Re: [PATCH v5] hwrng: exynos - add Samsung Exynos True RNG driver

2017-12-22 Thread Philippe Ombredanne
Łukasz, On Fri, Dec 22, 2017 at 5:48 PM, Łukasz Stelmach wrote: > Add support for True Random Number Generator found in Samsung Exynos > 5250+ SoCs. > > Signed-off-by: Łukasz Stelmach > Reviewed-by: Krzysztof Kozlowski > --- >

Re: [PATCH v4] hwrng: exynos - add Samsung Exynos True RNG driver

2017-12-22 Thread Philippe Ombredanne
On Fri, Dec 22, 2017 at 5:38 PM, Łukasz Stelmach wrote: > It was <2017-12-22 pią 14:34>, when Philippe Ombredanne wrote: >> Łukasz, >> >> On Fri, Dec 22, 2017 at 2:23 PM, Łukasz Stelmach >> wrote: >>> Add support for True Random Number Generator

Re: KASAN: use-after-free Read in __list_del_entry_valid (2)

2017-12-22 Thread Eric Biggers
On Sun, Dec 17, 2017 at 09:50:01PM -0800, syzbot wrote: > > syzbot will keep track of this bug report. > Once a fix for this bug is merged into any tree, reply to this email with: > #syz fix: exact-commit-title > If you want to test a patch for this bug, please reply with: > #syz test:

Re: KASAN: slab-out-of-bounds Write in sha3_update (2)

2017-12-22 Thread Eric Biggers
[+Cc keyri...@vger.kernel.org] On Fri, Dec 22, 2017 at 07:55:01AM -0800, syzbot wrote: > Hello, > > syzkaller hit the following crash on > 9035a8961b504d0997369509ab8c6b1f0a4ee33d > git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/master > compiler: gcc (GCC) 7.1.1 20170620 >

Re: [PATCH v4] hwrng: exynos - add Samsung Exynos True RNG driver

2017-12-22 Thread Łukasz Stelmach
It was <2017-12-22 pią 14:34>, when Philippe Ombredanne wrote: > Łukasz, > > On Fri, Dec 22, 2017 at 2:23 PM, Łukasz Stelmach > wrote: >> Add support for True Random Number Generator found in Samsung Exynos >> 5250+ SoCs. >> >> Signed-off-by: Łukasz Stelmach

Re: [PATCH] [RFT] crypto: aes-generic - turn off -ftree-pre and -ftree-sra

2017-12-22 Thread Ard Biesheuvel
On 21 December 2017 at 13:47, PrasannaKumar Muralidharan wrote: > Hi Ard, > > On 21 December 2017 at 17:52, Ard Biesheuvel > wrote: >> On 21 December 2017 at 10:20, Arnd Bergmann wrote: >>> On Wed, Dec 20, 2017 at 10:46 PM,

Re: [PATCH 00/17] crypto: inside-secure - various improvements

2017-12-22 Thread Antoine Tenart
Hi Herbert, On Fri, Dec 22, 2017 at 08:11:54PM +1100, Herbert Xu wrote: > On Thu, Dec 14, 2017 at 03:26:42PM +0100, Antoine Tenart wrote: > > > > This series depends on the previous one, "crypto: inside-secure - set of > > fixes"[1]. The series contains various improvements to the Inside Secure

Re: [PATCH v4] hwrng: exynos - add Samsung Exynos True RNG driver

2017-12-22 Thread Philippe Ombredanne
Łukasz, On Fri, Dec 22, 2017 at 2:23 PM, Łukasz Stelmach wrote: > Add support for True Random Number Generator found in Samsung Exynos > 5250+ SoCs. > > Signed-off-by: Łukasz Stelmach > Reviewed-by: Krzysztof Kozlowski > ---

[PATCH v4] hwrng: exynos - add Samsung Exynos True RNG driver

2017-12-22 Thread Łukasz Stelmach
Add support for True Random Number Generator found in Samsung Exynos 5250+ SoCs. Signed-off-by: Łukasz Stelmach Reviewed-by: Krzysztof Kozlowski --- Changes since v3: - Fixed typo in the secongd argument of MODULE_DEVICE_TABLE (Thanks, Herbert Xu)

Re: [PATCH v3 2/3] hwrng: exynos - add Samsung Exynos True RNG driver

2017-12-22 Thread Łukasz Stelmach
It was <2017-12-22 pią 09:35>, when Herbert Xu wrote: > On Fri, Dec 22, 2017 at 09:29:38AM +0100, Marek Szyprowski wrote: >> Hi, >> >> On 2017-12-22 09:24, Herbert Xu wrote: >> >On Mon, Dec 04, 2017 at 01:53:50PM +0100, Łukasz Stelmach wrote: >> >>Add support for True Random Number Generator

Re: BUG: unable to handle kernel paging request in hmac_init_tfm

2017-12-22 Thread Dmitry Vyukov
On Fri, Dec 22, 2017 at 3:27 AM, Eric Biggers wrote: > On Thu, Dec 21, 2017 at 08:44:03AM +0100, 'Dmitry Vyukov' via syzkaller-bugs > wrote: >> On Thu, Dec 21, 2017 at 12:09 AM, Eric Biggers wrote: >> > On Mon, Dec 18, 2017 at 11:36:01AM -0800, syzbot

Re: [PATCH RFC 1/4] crypto: engine - Permit to enqueue all async requests

2017-12-22 Thread Corentin Labbe
On Fri, Dec 22, 2017 at 08:06:03PM +1100, Herbert Xu wrote: > On Fri, Dec 22, 2017 at 09:41:48AM +0100, Corentin Labbe wrote: > > > > It's you that was suggesting using crypto_async_request: > > https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1474434.html > > "The only wart with this

Re: [PATCH v4 0/4] crypto: inside-secure - set of fixes

2017-12-22 Thread Herbert Xu
On Mon, Dec 11, 2017 at 12:10:54PM +0100, Antoine Tenart wrote: > Hi Herbert, > > This series is a set of 4 fixes on the Inside Secure SafeXcel crypto > engine driver. The series will be followed by another non-fix one. > > This is based on v4.15-rc3. All applied. Thanks. -- Email: Herbert Xu

Re: [PATCH crypto] crypto: aesni - add wrapper for generic gcm(aes)

2017-12-22 Thread Herbert Xu
On Wed, Dec 13, 2017 at 02:54:36PM +0100, Sabrina Dubroca wrote: > When I added generic-gcm-aes I didn't add a wrapper like the one > provided for rfc4106(gcm(aes)). We need to add a cryptd wrapper to fall > back on in case the FPU is not available, otherwise we might corrupt the > FPU state. > >

Re: [PATCH crypto] crypto: aesni - fix typo in generic_gcmaes_decrypt

2017-12-22 Thread Herbert Xu
On Wed, Dec 13, 2017 at 02:53:43PM +0100, Sabrina Dubroca wrote: > generic_gcmaes_decrypt needs to use generic_gcmaes_ctx, not > aesni_rfc4106_gcm_ctx. This is actually harmless because the fields in > struct generic_gcmaes_ctx share the layout of the same fields in > aesni_rfc4106_gcm_ctx. > >

Re: [PATCH 00/17] crypto: inside-secure - various improvements

2017-12-22 Thread Herbert Xu
On Thu, Dec 14, 2017 at 03:26:42PM +0100, Antoine Tenart wrote: > Hi Herbert, > > This series depends on the previous one, "crypto: inside-secure - set of > fixes"[1]. The series contains various improvements to the Inside Secure > SafeXcel driver, which are bundled in a single series to avoid

Re: [PATCH v2] hwrng: Clean up RNG list when last hwrng is unregistered

2017-12-22 Thread Herbert Xu
On Fri, Dec 15, 2017 at 01:55:59PM -0600, Gary R Hook wrote: > Commit 142a27f0a731 added support for a "best" RNG, and in doing so > introduced a hang from rmmod/modprobe -r when the last RNG on the list > was unloaded. > > When the hwrng list is depleted, return the global variables to their >

Re: [PATCH v3 0/4] Assorted changes for Exynos PRNG driver

2017-12-22 Thread Herbert Xu
On Tue, Dec 12, 2017 at 05:36:03PM +0100, Łukasz Stelmach wrote: > Hello, > > This is a series of patches for exynos-rng driver I've decided to > create after adding support for Exynos5250+ chips. They do not > strictly depend on each other, but I think it is better to send them > as a single

Re: [PATCH 2/2] crypto: seqiv - Remove unused alg/spawn variable

2017-12-22 Thread Herbert Xu
On Tue, Dec 12, 2017 at 07:30:14PM +, Corentin Labbe wrote: > This patch remove two unused variable and some dead "code" using it. > > Fixes: 92932d03c2b3 ("crypto: seqiv - Remove AEAD compatibility code") > > Signed-off-by: Corentin Labbe Patch applied. Thanks. --

Re: [PATCH 1/2] crypto: echainiv - Remove unused alg/spawn variable

2017-12-22 Thread Herbert Xu
On Tue, Dec 12, 2017 at 07:30:13PM +, Corentin Labbe wrote: > This patch remove two unused variable and some dead "code" using it. > > Fixes: 66008d4230f6 ("crypto: echainiv - Remove AEAD compatibility code") > Signed-off-by: Corentin Labbe Patch applied. Thanks. --

Re: [PATCH v2] crypto: artpec6: set correct iv size for gcm(aes)

2017-12-22 Thread Herbert Xu
Lars Persson wrote: > The IV size should not include the 32 bit counter. Because we had the > IV size set as 16 the transform only worked when the IV input was zero > padded. > > Fixes: a21eb94fc4d3 ("crypto: axis - add ARTPEC-6/7 crypto accelerator > driver") >

Re: [PATCH] crypto: gf128mul - remove incorrect comment

2017-12-22 Thread Herbert Xu
On Mon, Dec 11, 2017 at 01:58:26PM -0800, Eric Biggers wrote: > From: Eric Biggers > > The comment in gf128mul_x8_ble() was copy-and-pasted from gf128mul.h and > makes no sense in the new context. Remove it. > > Cc: Harsh Jain > Signed-off-by: Eric

Re: [PATCH RFC 1/4] crypto: engine - Permit to enqueue all async requests

2017-12-22 Thread Herbert Xu
On Fri, Dec 22, 2017 at 09:41:48AM +0100, Corentin Labbe wrote: > > It's you that was suggesting using crypto_async_request: > https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1474434.html > "The only wart with this scheme is that the drivers end up seeing > struct crypto_async_request

Re: [PATCH] crypto: qat - reduce stack size with KASAN

2017-12-22 Thread Herbert Xu
On Mon, Dec 11, 2017 at 01:07:00PM +0100, Arnd Bergmann wrote: > Passing the register value by reference here leads a large amount of stack > being > used when CONFIG_KASAN is enabled: > > drivers/crypto/qat/qat_common/qat_hal.c: In function > 'qat_hal_exec_micro_inst.constprop': >

Re: [PATCH] crypto: api - Unexport crypto_larval_lookup()

2017-12-22 Thread Herbert Xu
Eric Biggers wrote: > From: Eric Biggers > > crypto_larval_lookup() is not used outside of crypto/api.c, so unexport > it and mark it 'static'. > > Signed-off-by: Eric Biggers Patch applied. Thanks. -- Email: Herbert Xu

Re: [PATCH] crypto: null - Get rid of crypto_{get,put}_default_null_skcipher2()

2017-12-22 Thread Herbert Xu
Eric Biggers wrote: > From: Eric Biggers > > Since commit 499a66e6b689 ("crypto: null - Remove default null > blkcipher"), crypto_get_default_null_skcipher2() and > crypto_put_default_null_skcipher2() are the same as their non-2 > equivalents. So

Re: [PATCH RFC 1/4] crypto: engine - Permit to enqueue all async requests

2017-12-22 Thread Corentin Labbe
On Fri, Dec 22, 2017 at 05:57:24PM +1100, Herbert Xu wrote: > On Wed, Nov 29, 2017 at 09:41:18AM +0100, Corentin Labbe wrote: > > The crypto engine could actually only enqueue hash and ablkcipher request. > > This patch permit it to enqueue any type of crypto_async_request. > > > > Signed-off-by:

Re: [PATCH] lib/mpi: Fix umul_ppmm() for MIPS64r6

2017-12-22 Thread Herbert Xu
On Tue, Dec 05, 2017 at 11:31:35PM +, James Hogan wrote: > From: James Hogan > > Current MIPS64r6 toolchains aren't able to generate efficient > DMULU/DMUHU based code for the C implementation of umul_ppmm(), which > performs an unsigned 64 x 64 bit multiply and returns

Re: [PATCH] crypto: exynos - Icrease the priority of the driver

2017-12-22 Thread Herbert Xu
On Tue, Dec 05, 2017 at 05:20:46PM +0100, Łukasz Stelmach wrote: > exynos-rng is one of many implementations of stdrng. With priority as > low as 100 it isn't selected, if software implementations (DRBG) are > available. The value 300 was selected to give the PRNG priority before > software

Re: [PATCH 02/45] drivers: crypto: remove duplicate includes

2017-12-22 Thread Herbert Xu
On Tue, Dec 05, 2017 at 07:27:22AM +0530, Pravin Shedge wrote: > These duplicate includes have been found with scripts/checkincludes.pl but > they have been removed manually to avoid removing false positives. > > Signed-off-by: Pravin Shedge Patch applied.

Re: [crypto] chcr: fix a type cast error

2017-12-22 Thread Herbert Xu
Atul Gupta wrote: > fix a type cast error for queue descriptor > > Reported-by: Dan Carpenter > Signed-off-by: Atul Gupta Patch applied. Thanks. -- Email: Herbert Xu Home Page:

Re: [PATCH] crypto: pcrypt - fix freeing pcrypt instances

2017-12-22 Thread Herbert Xu
On Wed, Dec 20, 2017 at 02:28:25PM -0800, Eric Biggers wrote: > From: Eric Biggers > > pcrypt is using the old way of freeing instances, where the ->free() > method specified in the 'struct crypto_template' is passed a pointer to > the 'struct crypto_instance'. But the

Re: [PATCH] crypto: n2 - cure use after free

2017-12-22 Thread Herbert Xu
Jan Engelhardt wrote: > queue_cache_init is first called for the Control Word Queue > (n2_crypto_probe). At that time, queue_cache[0] is NULL and a new > kmem_cache will be allocated. If the subsequent n2_register_algs call > fails, the kmem_cache will be released in

Re: [PATCH v3 2/3] hwrng: exynos - add Samsung Exynos True RNG driver

2017-12-22 Thread Herbert Xu
On Fri, Dec 22, 2017 at 09:29:38AM +0100, Marek Szyprowski wrote: > Hi, > > On 2017-12-22 09:24, Herbert Xu wrote: > >On Mon, Dec 04, 2017 at 01:53:50PM +0100, Łukasz Stelmach wrote: > >>Add support for True Random Number Generator found in Samsung Exynos > >>5250+ SoCs. > >> > >>Signed-off-by:

Re: [PATCH] crypto: chcr: select CRYPTO_GF128MUL

2017-12-22 Thread Herbert Xu
On Tue, Dec 05, 2017 at 11:10:26AM +0100, Arnd Bergmann wrote: > Without the gf128mul library support, we can run into a link > error: > > drivers/crypto/chelsio/chcr_algo.o: In function `chcr_update_tweak': > chcr_algo.c:(.text+0x7e0): undefined reference to `gf128mul_x8_ble' > > This adds a

Re: [PATCH v3 2/3] hwrng: exynos - add Samsung Exynos True RNG driver

2017-12-22 Thread Marek Szyprowski
Hi, On 2017-12-22 09:24, Herbert Xu wrote: On Mon, Dec 04, 2017 at 01:53:50PM +0100, Łukasz Stelmach wrote: Add support for True Random Number Generator found in Samsung Exynos 5250+ SoCs. Signed-off-by: Łukasz Stelmach This doesn't build for me: CC [M]

Re: [PATCH] lib/mpi: Fix umul_ppmm() for MIPS64r6

2017-12-22 Thread Herbert Xu
On Fri, Dec 22, 2017 at 08:59:21AM +0100, Ralf Baechle wrote: > On Fri, Dec 22, 2017 at 06:08:08PM +1100, Herbert Xu wrote: > > > I can take this but I'd like to see an ack from someone on the > > MIPS side. > > Sure: > > Acked-by: Ralf Baechle Thanks Ralf! -- Email:

Re: [PATCH] crypto: stm32 - Use standard CONFIG name

2017-12-22 Thread Fabien DESSENNE
Hi Corentin Thank you for the patch. On 20/12/17 19:19, Corentin Labbe wrote: > All hardware crypto devices have their CONFIG names using the following > convention: > CRYPTO_DEV_name_algo > > This patch apply this conventions on STM32 CONFIG names. > > Signed-off-by: Corentin Labbe

Re: [PATCH] lib/mpi: Fix umul_ppmm() for MIPS64r6

2017-12-22 Thread Ralf Baechle
On Fri, Dec 22, 2017 at 06:08:08PM +1100, Herbert Xu wrote: > I can take this but I'd like to see an ack from someone on the > MIPS side. Sure: Acked-by: Ralf Baechle Ralf