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

2017-12-22 Thread Herbert Xu
ame as their non-2 > equivalents. So switch callers of the "2" versions over to the original > versions and remove the "2" versions. > > Signed-off-by: Eric Biggers <ebigg...@google.com> Patch applied. Thanks. -- Email: Herbert Xu <herb...@gond

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

2017-12-22 Thread Herbert Xu
ndefined reference to `__multi3' > > Therefore add an efficient MIPS64r6 implementation of umul_ppmm() using > inline assembly and the DMULU/DMUHU instructions, to prevent __multi3 > calls being emitted. > > Fixes: 7fd08ca58ae6 ("MIPS: Add build support for the MIPS R6 ISA&quo

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

2017-12-22 Thread Herbert Xu
gt; software implementations, but allow them to be selected in FIPS-mode > (fips=1 in the kernel command line). > > Signed-off-by: Łukasz Stelmach <l.stelm...@samsung.com> Patch applied. Thanks. -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gondor.apa

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

2017-12-22 Thread Herbert Xu
h applied. Thanks. -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

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

2017-12-22 Thread Herbert Xu
Atul Gupta <atul.gu...@chelsio.com> wrote: > fix a type cast error for queue descriptor > > Reported-by: Dan Carpenter <dan.carpen...@oracle.com> > Signed-off-by: Atul Gupta <atul.gu...@chelsio.com> Patch applied. Thanks. -- Email: Herbert Xu <herb...@gon

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

2017-12-22 Thread Herbert Xu
rnel.org> # v4.2+ > Signed-off-by: Eric Biggers <ebigg...@google.com> Patch applied. Thanks. -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

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

2017-12-22 Thread Herbert Xu
(inlined) handle_exec_unit > [10c61eb4] spu_mdesc_scan+0x1f4/0x460 [n2_crypto] > [10c62b80] n2_mau_probe+0x100/0x220 [n2_crypto] > [0084b174] platform_drv_probe+0x34/0xc0 > > Signed-off-by: Jan Engelhardt <jeng...@inai.de>

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 > >&g

Re: [PATCH] crypto: chcr: select CRYPTO_GF128MUL

2017-12-22 Thread Herbert Xu
> > This adds a Kconfig select statement for it, next to the ones we > already have. > > Fixes: b8fd1f4170e7 ("crypto: chcr - Add ctr mode and process large sg > entries for cipher") > Signed-off-by: Arnd Bergmann <a...@arndb.de> Patch applied. Thanks. -- Email

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 <r...@linux-

Re: [PATCH v2] crypto: AF_ALG - limit mask and type

2017-12-21 Thread Herbert Xu
I understand that, but does user space need to utilize this logic? I'm open to a white list as well. But we should certainly fix the underlying bugs rather than just papering over them as they could come back via other channels. Cheers, -- Email: Herbert Xu <herb...@gondor.apana.org.au> H

Re: [PATCH] crypto: Fix race around ctx->rcvused by making it atomic_t

2017-12-21 Thread Herbert Xu
On Fri, Dec 22, 2017 at 08:50:01AM +0100, Stephan Mueller wrote: > Am Freitag, 22. Dezember 2017, 08:48:03 CET schrieb Herbert Xu: > > Hi Herbert, > > > On Tue, Dec 19, 2017 at 10:31:22AM +, Jonathan Cameron wrote: > > > This variable was increased and decre

Re: [PATCH] crypto: Fix race around ctx->rcvused by making it atomic_t

2017-12-21 Thread Herbert Xu
et lock from the callback. commit 7d2c3f54e6f646887d019faa45f35d6fe9fe82ce Author: Stephan Mueller <smuel...@chronox.de> Date: Fri Nov 10 13:20:55 2017 +0100 crypto: af_alg - remove locking in async callback Thanks, -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert

Re: [PATCH v2] crypto: AF_ALG - limit mask and type

2017-12-21 Thread Herbert Xu
de paths that can create instances. Thanks, -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

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

2017-12-21 Thread Herbert Xu
ndefined reference to `__multi3' > > Therefore add an efficient MIPS64r6 implementation of umul_ppmm() using > inline assembly and the DMULU/DMUHU instructions, to prevent __multi3 > calls being emitted. > > Fixes: 7fd08ca58ae6 ("MIPS: Add build support for the MIPS R6 ISA&quo

Crypto Fixes for 4.15

2017-12-21 Thread Herbert Xu
++- crypto/skcipher.c| 10 -- include/crypto/mcryptd.h |1 + 6 files changed, 37 insertions(+), 35 deletions(-) Thanks, -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH RFC 2/3] crypto: Implement a generic crypto statistics

2017-12-21 Thread Herbert Xu
be exposed through that. Thanks, -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH RFC 1/3] crypto: Prevent to register duplicate cra_driver_name

2017-12-20 Thread Herbert Xu
> Signed-off-by: Corentin Labbe <cla...@baylibre.com> No this is intentional. The idea is that you can hot-replace an implementation by registering a new version of it while the old one is still in use. The new one will be used for all new allocations. Cheers, -- Email: Herbert Xu <h

Re: [PATCH 6/6] crypto: tcrypt: add multibuf aead speed test

2017-12-13 Thread Herbert Xu
/G table for test_aead_speed() Yet your patch still fails to apply. Cheers, -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH] crypto: AF_ALG - fix race accessing cipher request

2017-12-11 Thread Herbert Xu
: algif_skcipher - overhaul memory management") > Fixes: d887c52d6ae4 ("crypto: algif_aead - overhaul memory management") > Reported-by: syzbot <syzkal...@googlegroups.com> > Cc: <sta...@vger.kernel.org> # v4.14+ > Signed-off-by: Stephan Mueller <smuel...@chronox.

Re: [PATCH v2] crypto: Add myself as co-maintainer for s5p-sss.c

2017-12-11 Thread Herbert Xu
e some of my paid time for reviewing and verifying changes > to the driver. > > Signed-off-by: Kamil Konieczny <k.koniec...@partner.samsung.com> Patch applied. Thanks. -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PG

Re: [PATCH] crypto: stm32: fix module device table name

2017-12-11 Thread Herbert Xu
' undeclared > here (not in a function) > MODULE_DEVICE_TABLE(of, sti_dt_ids); > > Let's replace sti_dt_ids with stm32_dt_ids which is just declared > before. > > Signed-off-by: Corentin Labbe <clabbe.montj...@gmail.com> Patch applied. Thanks. -- Email: Herbert Xu

Re: [PATCH] chcr: remove unused variables net_device, pi, adap and cntrl

2017-12-11 Thread Herbert Xu
> Signed-off-by: Colin Ian King <colin.k...@canonical.com> Patch applied. Thanks. -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH] chcr: ensure cntrl is initialized to fix bit-wise or'ing of garabage data

2017-12-11 Thread Herbert Xu
uot;chcr: Add support for Inline IPSec") > Signed-off-by: Colin Ian King <colin.k...@canonical.com> Patch applied. Thanks. -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH] crypto: cryptd: make cryptd_max_cpu_qlen module parameter static

2017-12-11 Thread Herbert Xu
> crypto/cryptd.c:35:14: warning: symbol 'cryptd_max_cpu_qlen' was not > declared. Should it be static? > > Signed-off-by: Colin Ian King <colin.k...@canonical.com> Patch applied. Thanks. -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gondor.apana.org.

Re: [PATCH] crypto: chelsio: make arrays sgl_ent_len and dsgl_ent_len static

2017-12-11 Thread Herbert Xu
sgl_ent_len' > was not declared. Should it be static? > > Signed-off-by: Colin Ian King <colin.k...@canonical.com> Patch applied. Thanks. -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH] crypto: mcryptd: protect the per-CPU queue with a lock

2017-12-11 Thread Herbert Xu
help. > In order to keep work-item on the local CPU (and avoid RR) I changed it > to queue_work_on(). > > Cc: sta...@vger.kernel.org > Signed-off-by: Sebastian Andrzej Siewior <bige...@linutronix.de> Patch applied. Thanks. -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH v2] crypto: AF_ALG - wait for data at beginning of recvmsg

2017-12-11 Thread Herbert Xu
7c ("crypto: algif_skcipher - overhaul memory management") > Fixes: d887c52d6ae4 ("crypto: algif_aead - overhaul memory management") > Reported-by: syzbot <syzkal...@googlegroups.com> > Cc: <sta...@vger.kernel.org> # v4.14+ > Signed-off-by: Stephan Mueller <

Re: [PATCH] crypto: skcipher - set walk.iv for zero-length inputs

2017-12-11 Thread Herbert Xu
vere than an uninitialized pointer bug. > > This change also matches the behavior of the older blkcipher_walk API. > > Fixes: 0cabf2af6f5a ("crypto: skcipher - Fix crash on zero-length input") > Reported-by: syzbot <syzkal...@googlegroups.com> > Cc: <sta...@vger.kernel.org

Re: [PATCH] crypto: caam/qi - use correct print specifier for size_t

2017-12-11 Thread Herbert Xu
R_SG > qm_sg_ents, CAAM_QI_MAX_ABLKCIPHER_SG); > ^ > > Fixes: eb9ba37dc15a ("crypto: caam/qi - handle large number of S/Gs case") > Signed-off-by: Horia Geantă <horia.gea...@nxp.com> Patch applied. Thanks. -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH] crypto: arm/aes-neonbs Use PTR_ERR_OR_ZERO()

2017-12-11 Thread Herbert Xu
TR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR > > Generated by: scripts/coccinelle/api/ptr_ret.cocci > > Signed-off-by: Vasyl Gomonovych <gomonov...@gmail.com> Patch applied. Thanks. -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http:

Re: [PATCH] crypto: fix typo in KPP dependency of CRYPTO_ECDH

2017-12-11 Thread Herbert Xu
rtens <ha...@hauke-m.de> Patch applied. Thanks. -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH 6/6] crypto: tcrypt: add multibuf aead speed test

2017-12-11 Thread Herbert Xu
est performance of such > tfm providers. > > Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> Sorry, this no longer applies to the current cryptodev tree. Please respin. Thanks, -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gondor.

Re: [PATCH 3/4] crypto: inside-secure - only update the result buffer when provided

2017-12-11 Thread Herbert Xu
l). That's one way to do it. Ideally you'd only use the local buffer for the non-final case so that the final case just does the DMA to the final destination. Cheers, -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.

Re: [PATCH 00/18] crypto: talitos - fixes and performance improvement

2017-12-11 Thread Herbert Xu
On Fri, Dec 08, 2017 at 03:20:40PM +, Horia Geantă wrote: > On 10/12/2017 6:20 PM, Herbert Xu wrote: > > On Fri, Oct 06, 2017 at 03:04:31PM +0200, Christophe Leroy wrote: > >> This serie fixes and improves the talitos crypto driver. > >> > >> First 6 p

Re: [PATCH 3/4] crypto: inside-secure - only update the result buffer when provided

2017-12-10 Thread Herbert Xu
rmine whether to copy data into it. For example, I could be making an update call with a non-NULL areq->result and it would be completely wrong if you overwrote that with the above memcpy. IOW areq->result should not be touched at all unless you are doing a finalisation. Thanks, -- Email: Her

Crypto Fixes for 4.15

2017-12-10 Thread Herbert Xu
+- crypto/rsa_helper.c|2 +- crypto/salsa20_generic.c |7 --- crypto/shash.c |5 +++-- include/crypto/internal/hash.h |8 8 files changed, 25 insertions(+), 25 deletions(-) Thanks, -- Email: Herbert Xu <herb...@gondor.apana.org

Re: [RFC PATCH] crypto: chacha20 - add implementation using 96-bit nonce

2017-12-10 Thread Herbert Xu
ect use in user-space we could think about restricting access to these base implementations. For chacha20 we did not add a restrictive template because the primary user IPsec uses it only through AEAD where the IV restriction is in place. Cheers, -- Email: Herbert Xu <herb...@gon

Re: [PATCH v2 3/4] crypto: inside-secure - only update the result buffer when provided

2017-12-01 Thread Herbert Xu
yes, > then test fails ? Yes we should modify testmgr to check that. Thanks, -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH v2 3/4] crypto: inside-secure - only update the result buffer when provided

2017-12-01 Thread Herbert Xu
copy is made regardless of whether the operation is final or update. That's why a check is required. If the operation is finup/final/digest then req->result must be set and you don't need to check it. Cheers, -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH v2 3/4] crypto: inside-secure - only update the result buffer when provided

2017-11-30 Thread Herbert Xu
ugh any user-space facing API. If a kernel API user did this then they're just shooting themselves in the foot. So unless there is a valida call path that leads to this then I would say that there is nothing to fix. Thanks, -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: ht

Re: [v2,01/12] hwrng: bcm2835 - Obtain base register via resource

2017-11-29 Thread Herbert Xu
On Wed, Nov 29, 2017 at 09:38:52AM -0800, Florian Fainelli wrote: > > Hu, okay, I actually had a v3 prepared that I was going to post > addressing some of the comments. Should I send an incremental set of > changes now? Please send it as an incremental set. Thanks, -- Email: Herb

Re: general protection fault in af_alg_free_areq_sgls

2017-11-29 Thread Herbert Xu
On Wed, Nov 29, 2017 at 11:51:09AM -0800, Eric Biggers wrote: > > Herbert, if it's not too late can you fix the subject? It got split into two > lines: Sorry, it's already pushed out with other patches sitting on top of it. Cheers, -- Email: Herbert Xu <herb...@gondor.apana.org.a

Re: [PATCH v2] crypto: AF_ALG - race-free access of encryption flag

2017-11-29 Thread Herbert Xu
g will block indefinitely. It can still be interrupted from user-space. As the behaviour is currently undefined anyway, I don't think we need to backport this fix. At least not until we maintain a list of ctx->enc like we discussed. Cheers, -- Email: Herbert Xu <herb...@gondor.apana.org.a

Re: [PATCH] crypto: AF_ALG - wait for data at beginning of recvmsg

2017-11-29 Thread Herbert Xu
On Wed, Nov 29, 2017 at 11:28:43AM +0100, Stephan Mueller wrote: > Am Mittwoch, 29. November 2017, 11:22:34 CET schrieb Herbert Xu: > > Hi Herbert, > > > On Wed, Nov 29, 2017 at 11:17:26AM +0100, Stephan Müller wrote: > > > @@ -111,6 +111,12 @@ static int _aead_

Re: [PATCH] crypto: AF_ALG - wait for data at beginning of recvmsg

2017-11-29 Thread Herbert Xu
zero, and we would skip the wait right? Cheers, -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [1/2] crypto: tcrypt - fix S/G table for test_aead_speed()

2017-11-29 Thread Herbert Xu
Since tcrypt is merely a debugging interface I don't think it's that critical. Cheers, -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH v2] crypto: AF_ALG - race-free access of encryption flag

2017-11-28 Thread Herbert Xu
On Wed, Nov 29, 2017 at 07:48:53AM +0100, Stephan Mueller wrote: > Am Mittwoch, 29. November 2017, 00:02:40 CET schrieb Herbert Xu: > > > This is wrong. You can't fetch ctx->enc before you wait. It has > > to be done after the wait as otherwise ctx->enc may not even h

Re: [PATCH][V2] crypto/nx: fix spelling mistake: "availavle" -> "available"

2017-11-28 Thread Herbert Xu
.k...@canonical.com> Patch applied. Thanks. -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH v2] ARM64: crypto: do not call crypto_unregister_skcipher twice on error

2017-11-28 Thread Herbert Xu
w; use-after-free. > > Signed-off-by: Corentin Labbe <cla...@baylibre.com> Patch applied. Thanks. -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH 0/5] crypto: chacha20 - Alignment fixes

2017-11-28 Thread Herbert Xu
g key and IV > crypto: chacha20 - Remove cra_alignmask > crypto: x86/chacha20 - Remove cra_alignmask > crypto: chacha20 - Fix keystream alignment for chacha20_block() All applied. Thanks. -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCHi v2] dt-bindings: add device tree binding for Arm TrustZone CryptoCell crypto engine

2017-11-28 Thread Herbert Xu
> > Signed-off-by: Gilad Ben-Yossef <gi...@benyossef.com> > Acked-by: Rob Herring <r...@kernel.org> Patch applied. Thanks. -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH net-next] cryptd: Add cryptd_max_cpu_qlen module parameter

2017-11-28 Thread Herbert Xu
...@gmail.com> Patch applied. Thanks. -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH] crypto/arm64: aes-ce-cipher - move assembler code to .S file

2017-11-28 Thread Herbert Xu
an this up, and move the asm() blocks into a separate .S > file. > > Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org> Patch applied. Thanks. -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [5/8] crypto: remove unused hardirq.h

2017-11-28 Thread Herbert Xu
alibaba-inc.com> > Cc: Herbert Xu <herb...@gondor.apana.org.au> > Cc: "David S. Miller" <da...@davemloft.net> > Cc: linux-crypto@vger.kernel.org Patch applied. Thanks. -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH] crypto: keywrap - Add missing ULL suffixes for 64-bit constants

2017-11-28 Thread Herbert Xu
rap.c: In function ‘crypto_kw_encrypt’: > crypto/keywrap.c:224: warning: integer constant is too large for ‘long’ > type > > Fixes: 9e49451d7a15365d ("crypto: keywrap - simplify code") > Signed-off-by: Geert Uytterhoeven <ge...@linux-m68k.org> Pa

Re: [crypto v3 2/2] chcr: Add support for Inline IPSec

2017-11-28 Thread Herbert Xu
: Fixed a build warning and added flag for data packet Patch applied. Thanks. -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH] crypto: cavium: fix memory leak on info

2017-11-28 Thread Herbert Xu
e info. > > Detected by CoverityScan, CID#1408439 ("Resource Leak") > > Fixes: c694b233295b ("crypto: cavium - Add the Virtual Function driver for > CPT") > Signed-off-by: Colin Ian King <colin.k...@canonical.com> Patch applied. Thanks. -- Email: Herbert Xu &l

Re: [PATCH] crypto: hifn_795x - Fix a memory leak in the error handling path of 'hifn_probe()'

2017-11-28 Thread Herbert Xu
atch applied. Thanks. -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [crypto v3 1/2] cxgb4: Add support for Inline IPSec Tx

2017-11-28 Thread Herbert Xu
and added flag for data packet Patch applied. Thanks. -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: crypto: tcrypt - set assoc in sg_init_aead()

2017-11-28 Thread Herbert Xu
On Tue, Nov 14, 2017 at 04:59:15PM +0200, Tudor-Dan Ambarus wrote: > Results better code readability. > > Signed-off-by: Tudor Ambarus <tudor.amba...@microchip.com> > Reviewed-by: Horia Geantă <horia.gea...@nxp.com> Patch applied. Thanks. -- Email: Herbert Xu <herb..

Re: [PATCH] crypto: replace FSF address with web source in license notices

2017-11-28 Thread Herbert Xu
> As https://www.gnu.org/licenses/gpl-howto.html suggests, we replace the > postal address with "<http://www.gnu.org/licenses/>". > > Signed-off-by: Martin Kepplinger <mart...@posteo.de> Patch applied. Thanks. -- Email: Herbert Xu <herb...@gondor.apana.org.au&

Re: [PATCH] Fix NULL pointer deref. on no default_rng

2017-11-28 Thread Herbert Xu
ter dereference. > Returning the error directly, as was supposedly > intended when looking at the code, fixes this. > > Signed-off-by: Pierre Ducroquet <pina...@pinaraf.info> Patch applied. Thanks. -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gond

Re: [PATCH] crypto: s5p-sss - Remove a stray tab

2017-11-28 Thread Herbert Xu
On Fri, Nov 10, 2017 at 12:26:04AM +0300, Dan Carpenter wrote: > This code seems correct, but the goto was indented too far. > > Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> Patch applied. Thanks. -- Email: Herbert Xu <herb...@gondor.apana.org.a

Re: [v2,01/12] hwrng: bcm2835 - Obtain base register via resource

2017-11-28 Thread Herbert Xu
> Signed-off-by: Florian Fainelli <f.faine...@gmail.com> All applied. Thanks. -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH] crypto: chelsio - Fix an error code in chcr_hash_dma_map()

2017-11-28 Thread Herbert Xu
to chcr from lld > cxgb4 driver") > Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> Patch applied. Thanks. -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH] crypto: chelsio: remove redundant assignments to reqctx and dst_size

2017-11-28 Thread Herbert Xu
algo.c:2020:2: warning: Value stored to > 'dst_size' is never read > > Signed-off-by: Colin Ian King <colin.k...@canonical.com> Patch applied. Thanks. -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH v5 0/2] STM32 CRYP crypto driver

2017-11-28 Thread Herbert Xu
crypt / testmgr. > > Changes since v5: > -add timeout in wait_busy function > -clear key after use > -misc : remove unused functions, use -Exx, use dev_err All applied. Thanks. -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/

Re: [1/2] crypto: tcrypt - fix S/G table for test_aead_speed()

2017-11-28 Thread Herbert Xu
om> Patch applied. Thanks. -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH] crypto: salsa20 - fix blkcipher_walk API usage

2017-11-28 Thread Herbert Xu
reqfd = accept(algfd, 0, 0); > setsockopt(algfd, SOL_ALG, ALG_SET_KEY, key, sizeof(key)); > read(reqfd, key, sizeof(key)); > } > > Reported-by: syzbot <syzkal...@googlegroups.com> > Fixes: eb6f13eb9f81 ("[CRYPTO] salsa20_generic: Fix multi-page processin

Re: [PATCH v2] crypto: hmac - require that the underlying hash algorithm is unkeyed

2017-11-28 Thread Herbert Xu
/af_alg.c:221 [inline] > alg_setsockopt+0x2a1/0x350 crypto/af_alg.c:254 > SYSC_setsockopt net/socket.c:1851 [inline] > SyS_setsockopt+0x189/0x360 net/socket.c:1830 > entry_SYSCALL_64_fastpath+0x1f/0x96 > > Reported-by: syzbot <syzkal...@googlegroups.com> > Cc: <sta...@vger.kernel.org> > Signed-off-by: Eric Biggers <ebigg...@google.com> Patch applied. Thanks. -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: general protection fault in af_alg_free_areq_sgls

2017-11-28 Thread Herbert Xu
ed-by: syzbot <syzkal...@googlegroups.com> > Cc: <sta...@vger.kernel.org> # v4.14+ > Signed-off-by: Eric Biggers <ebigg...@google.com> Patch applied. Thanks. -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH] crypto: rsa - fix buffer overread when stripping leading zeroes

2017-11-28 Thread Herbert Xu
tpath+0x1f/0x96 > > Fixes: 5a7de97309f5 ("crypto: rsa - return raw integers for the ASN.1 parser") > Cc: <sta...@vger.kernel.org> # v4.8+ > Cc: Tudor Ambarus <tudor-dan.amba...@nxp.com> > Signed-off-by: Eric Biggers <ebigg...@google.com> Patch applied. Thanks. -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: KASAN: use-after-free Read in aead_recvmsg

2017-11-28 Thread Herbert Xu
@googlegroups.com> > Cc: <sta...@vger.kernel.org> # v4.14+ > Signed-off-by: Eric Biggers <ebigg...@google.com> Patch applied. Thanks. -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH] crypto: rsa - fix buffer overread when stripping leading zeroes

2017-11-28 Thread Herbert Xu
On Tue, Nov 28, 2017 at 10:54:32AM +, David Howells wrote: > Hi Herbert, > > Are you going to take this? Yes it's in my queue. Thanks, -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Crypto Fixes for 4.15

2017-11-28 Thread Herbert Xu
++- crypto/algif_skcipher.c | 23 +-- crypto/skcipher.c |3 +++ include/crypto/if_alg.h |1 + 5 files changed, 66 insertions(+), 38 deletions(-) Thanks, -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gondor.apana.

Re: [PATCH v2] crypto: AF_ALG - race-free access of encryption flag

2017-11-28 Thread Herbert Xu
e been initialised. In fact the position of the wait call is just wrong. You should only ever do at most one wait at the start of the recvmsg call. Once you have enough data from that wait no further waits should be done for that recvmsg call. The original commit had it right with just one wait

Re: [PATCH v3] crypto: AF_ALG - remove locking in async callback

2017-11-24 Thread Herbert Xu
On Fri, Nov 24, 2017 at 05:04:19PM +0100, Stephan Mueller wrote: > > Would it make sense to feed it to stable? I already added stable Cc's so it should go in automatically once it's pushed to Linus. Cheers, -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gondor.

Re: Question about ahash export and import

2017-11-24 Thread Herbert Xu
formation is const > until .final ? Yes you may. > Is is possible to have okey derived from different key then ikey ? I think > not. We do not need to support that case. If the user changes the key mid-stream it results in undefined behaviour. However, the code should not crash though.

Re: [PATCH] crypto: skcipher - Fix skcipher_walk_aead_common

2017-11-24 Thread Herbert Xu
On Fri, Nov 24, 2017 at 11:53:53AM +0100, Ondrej Mosnáček wrote: > (I accidentally hit "reply" instead of "reply all", so resending) > > 2017-11-24 6:07 GMT+01:00 Herbert Xu <herb...@gondor.apana.org.au>: > > On Thu, Nov 23, 2017 at 01:49:06PM +010

Re: [PATCH v3] crypto: algif_aead - skip SGL entries with NULL page

2017-11-24 Thread Herbert Xu
t using the libkcapi test > suite. > > Fixes: 72548b093ee38 ("crypto: algif_aead - copy AAD from src to dst") > Signed-off-by: Stephan Mueller <smuel...@chronox.de> Patch applied. Thanks. -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH v3] crypto: AF_ALG - remove locking in async callback

2017-11-24 Thread Herbert Xu
haul memory management") > Fixes: d887c52d6ae43 ("crypto: algif_aead - overhaul memory management") > Reported-by: Romain Izard <romain.izard@gmail.com> > Signed-off-by: Stephan Mueller <smuel...@chronox.de> Patch applied. Thanks. -- Email: Herbert Xu

Re: [PATCH] crypto: skcipher - Fix skcipher_walk_aead_common

2017-11-23 Thread Herbert Xu
alk_copychunks(NULL, >out, req->assoclen, 2); > > + scatterwalk_done(>in, 0, walk->total); > + scatterwalk_done(>out, 0, walk->total); That should be 1 instead of 0 for walk->out. Could you please fix and resubmit? Thanks, -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH] crypto: arm64/aes - do not call crypto_unregister_skcipher twice on error

2017-11-23 Thread Herbert Xu
On Wed, Nov 22, 2017 at 08:55:14AM +, Ard Biesheuvel wrote: > > Would this also fix it? Looks good. Could you resubmit with a sign-off? Thanks, -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org

Re: [PATCH v2 2/2] chcr: Add support for Inline IPSec

2017-11-15 Thread Herbert Xu
o/chcr_core.c:169: undefined reference to > >> `chcr_add_xfrmops' Atul, can you fix this and resubmit your patches please? Thanks! -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH 1/2] crypto: tcrypt - fix S/G table for test_aead_speed()

2017-11-14 Thread Herbert Xu
or associated data, filled outside > sg_init_aead() > -sg[1]..sg[npo] (npo entries) - input data, entries pointing to > xbuf[0]..xbuf[npo-1] You are right. I will apply the patch. Thanks! -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gondor.apa

Crypto Update for 4.15

2017-11-12 Thread Herbert Xu
limit of dsgl header crypto: chelsio - Move DMA un/mapping to chcr from lld cxgb4 driver crypto: chelsio - Fix memory leak Herbert Xu (1): Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux Himanshu Jha (3): crypto: n2 - remove null check before kfree

Re: [PATCH 0/2] hwrng: iproc-rng200: Add support for BCM7278

2017-11-10 Thread Herbert Xu
ake that driver selectable with > ARCH_BRCMSTB gating the enabling of such SoCs. > > Thank you > > Florian Fainelli (2): > dt-bindings: rng: Document BCM7278 RNG200 compatible > hwrng: iproc-rng200: Add support for BCM7278 All applied. Thanks. -- Email: Herbert Xu <herb.

Re: [PATCH] lib/mpi: call cond_resched() from mpi_powm() loop

2017-11-10 Thread Herbert Xu
bit > from the exponent is processed. It's still noninterruptible, but at > least it's preemptible now. > > Cc: sta...@vger.kernel.org # v4.12+ > Signed-off-by: Eric Biggers <ebigg...@google.com> Patch applied. Thanks. -- Email: Herbert Xu <herb...@gondor.apana.org.au>

Re: [PATCH v2 0/5] crypto: dh - input validation fixes

2017-11-10 Thread Herbert Xu
qat - Clean up error handling in qat_dh_set_secret() > crypto: dh - Remove pointless checks for NULL 'p' and 'g' All applied. Thanks. -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH v2 1/1] crypto: stm32/hash - Fix return issue on update

2017-11-10 Thread Herbert Xu
> Signed-off-by: Lionel Debieve <lionel.debi...@st.com> Patch applied. Thanks. -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH 1/2] crypto: tcrypt - fix S/G table for test_aead_speed()

2017-11-10 Thread Herbert Xu
, the code with your patch will create an SG list that's one page longer than buflen. AFAICS it should be harmless but it would still be better if we can generate an SG list that's exactly buflen long rather than one page longer. Cheers, -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH v2] crypto: AF_ALG - remove locking in async callback

2017-11-10 Thread Herbert Xu
return -EIOCBQUEUED; > + } Since we're allowing backlogs, what about EBUSY? Cheers, -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH 1/2] crypto: tcrypt - fix S/G table for test_aead_speed()

2017-11-09 Thread Herbert Xu
On Fri, Nov 10, 2017 at 06:37:22AM +, Horia Geantă wrote: > On 11/10/2017 12:21 AM, Herbert Xu wrote: > > On Thu, Nov 09, 2017 at 02:37:29PM +, Horia Geantă wrote: > >> > >>>> sg_init_table(sg, np + 1); > >> sg_mark_e

Re: [PATCH 1/2] crypto: tcrypt - fix S/G table for test_aead_speed()

2017-11-09 Thread Herbert Xu
sg_set_buf([k + 1], xbuf[k], PAGE_SIZE); > In case rem == 0, last k value is np-1, thus sg[np-1+1] will be filled > here with xbuf[np-1]. No, if rem == 0, then the last k value is np-2. The whole point of the patch is to shrink the SG table by one entry when rem == 0. How can you shrink i

Re: [PATCH v2 1/3] staging: ccree: copy IV to DMAable memory

2017-11-08 Thread Herbert Xu
that the pointer can be DMAed you can opt in to the new interface. The crypto API can then provide a helper to do the copying where necessary. Cheers, -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: [PATCH] crypto: AF_ALG - remove locking in async callback

2017-11-06 Thread Herbert Xu
ame with any other callback in the crypto API. The completion function is called if the return value is EINPROGRESS or EBUSY. In fact the algif_aead/algif_skcipher code already frees the SG lists and areq on a sync return. So perhaps you can merge this with the completion function. Cheers, -- Em

Re: [PATCH] crypto: AF_ALG - remove locking in async callback

2017-11-06 Thread Herbert Xu
On Mon, Nov 06, 2017 at 05:06:09PM +0100, Stephan Mueller wrote: > Am Freitag, 3. November 2017, 14:20:16 CET schrieb Herbert Xu: > > > Are you sure about that? In particular is the callback function still > > sane without the socket lock if a concurrent recvmsg/sendmsg call i

Re: [PATCH] crypto: chcr - Replace _manual_ swap with swap macro

2017-11-05 Thread Herbert Xu
A. R. Silva <garsi...@embeddedor.com> Patch applied. Thanks. -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Re: virtio:rng: Virtio RNG devices need to be re-registered after suspend/resume

2017-11-05 Thread Herbert Xu
o virtio_restore(). > > Reviewed-by: Liam Merwick <liam.merw...@oracle.com> > Signed-off-by: Jim Quigley <jim.quig...@oracle.com> Patch applied. Thanks. -- Email: Herbert Xu <herb...@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

<    1   2   3   4   5   6   7   8   9   10   >