Re: [PATCH] crypto: Fix next IV issue for CTS template

2017-02-17 Thread Dennis Chen
Hello Ard, Morning! On Fri, Feb 17, 2017 at 07:12:46AM +, Ard Biesheuvel wrote: > Hello Libo, > > On 17 February 2017 at 03:47, wrote: > > From: Libo Wang > > > > CTS template assumes underlying CBC algorithm will carry out next IV for > > further process.But some implementations of CBC alg

Re: [PATCH] crypto: Fix next IV issue for CTS template

2017-02-17 Thread Ard Biesheuvel
> On 17 Feb 2017, at 09:17, Dennis Chen wrote: > > Hello Ard, > Morning! >> On Fri, Feb 17, 2017 at 07:12:46AM +, Ard Biesheuvel wrote: >> Hello Libo, >> >>> On 17 February 2017 at 03:47, wrote: >>> From: Libo Wang >>> >>> CTS template assumes underlying CBC algorithm will carry out nex

Re: [PATCH] crypto: Fix next IV issue for CTS template

2017-02-17 Thread Dennis Chen
On Fri, Feb 17, 2017 at 09:23:00AM +, Ard Biesheuvel wrote: > > > On 17 Feb 2017, at 09:17, Dennis Chen wrote: > > > > Hello Ard, > > Morning! > >> On Fri, Feb 17, 2017 at 07:12:46AM +, Ard Biesheuvel wrote: > >> Hello Libo, > >> > >>> On 17 February 2017 at 03:47, wrote: > >>> From:

Re: [PATCH] crypto: Fix next IV issue for CTS template

2017-02-17 Thread Ard Biesheuvel
> On 17 Feb 2017, at 10:06, Dennis Chen wrote: > >> On Fri, Feb 17, 2017 at 09:23:00AM +, Ard Biesheuvel wrote: >> >>> On 17 Feb 2017, at 09:17, Dennis Chen wrote: >>> >>> Hello Ard, >>> Morning! On Fri, Feb 17, 2017 at 07:12:46AM +, Ard Biesheuvel wrote: Hello Libo, >

[PATCH 06/10] x86: crypto, annotate local functions

2017-02-17 Thread Jiri Slaby
Use the newly added ENTRY_LOCAL to annotate starts of all functions which do not have ".globl" annotation, but their ends are annotated by ENDPROC. This is needed to balance ENDPROC for tools that are about to generate debuginfo. Signed-off-by: Jiri Slaby Cc: Herbert Xu Cc: "David S. Miller" Cc

[PATCH 08/10] x86: assembly, annotate aliases

2017-02-17 Thread Jiri Slaby
_key_expansion_128 is an alias to _key_expansion_256a, __memcpy to memcpy, xen_syscall32_target to xen_sysenter_target, and so on. Annotate them all using the new ENTRY_ALIAS and ENTRY_LOCAL_ALIAS. This will make the tools generating the debuginfo happy. Signed-off-by: Jiri Slaby Cc: Herbert Xu

Re: [PATCH 08/10] x86: assembly, annotate aliases

2017-02-17 Thread Juergen Gross
On 17/02/17 11:47, Jiri Slaby wrote: > _key_expansion_128 is an alias to _key_expansion_256a, __memcpy to > memcpy, xen_syscall32_target to xen_sysenter_target, and so on. Annotate > them all using the new ENTRY_ALIAS and ENTRY_LOCAL_ALIAS. This will make > the tools generating the debuginfo happy.

Re: [PATCH 00/35] treewide trivial patches converting pr_warning to pr_warn

2017-02-17 Thread Rafael J. Wysocki
On Fri, Feb 17, 2017 at 8:11 AM, Joe Perches wrote: > There are ~4300 uses of pr_warn and ~250 uses of the older > pr_warning in the kernel source tree. > > Make the use of pr_warn consistent across all kernel files. > > This excludes all files in tools/ as there is a separate > define pr_warning

Re: [PATCH v2] dm: switch dm-verity to async hash crypto API

2017-02-17 Thread Milan Broz
On 02/06/2017 02:58 PM, Gilad Ben-Yossef wrote: > Use of the synchronous digest API limits dm-verity to using pure > CPU based algorithm providers and rules out the use of off CPU > algorithm providers which are normally asynchronous by nature, > potentially freeing CPU cycles. > > This can reduce

Re: [PATCH v2] dm: switch dm-verity to async hash crypto API

2017-02-17 Thread Gilad Ben-Yossef
Hi Milan, Thank you for the review and testing. On Fri, Feb 17, 2017 at 3:00 PM, Milan Broz wrote: > On 02/06/2017 02:58 PM, Gilad Ben-Yossef wrote: >> Use of the synchronous digest API limits dm-verity to using pure >> CPU based algorithm providers and rules out the use of off CPU >> algorithm

[PATCH] crypto: cavium: fix leak on curr if curr->head fails to be allocated

2017-02-17 Thread Colin King
From: Colin Ian King The exit path when curr->head cannot be allocated fails to kfree the earlier allocated curr. Fix this by kfree'ing it. Signed-off-by: Colin Ian King --- drivers/crypto/cavium/cpt/cptvf_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/crypto/cavium/cpt/cp

Re: [PATCH v4 1/2] crypto: skcipher AF_ALG - overhaul memory management

2017-02-17 Thread Stephan Müller
Am Donnerstag, 16. Februar 2017, 22:21:44 CET schrieb Stephan Müller: Hi, > +static unsigned int skcipher_count_tsgl(struct sock *sk, size_t bytes) > { > struct alg_sock *ask = alg_sk(sk); > struct skcipher_ctx *ctx = ask->private; > - struct skcipher_sg_list *sgl; > + struct

crypto: hang in crypto_larval_lookup

2017-02-17 Thread Harald Freudenberger
Hello all I am currently following a hang at modprobe aes_s390 where crypto_register_alg() does not come back for the xts(aes) algorithm. The registration is waiting forever in algapi.c crypto_wait_for_test() but the completion never occurs. The cryptomgr is triggering a test via kthread_run to

Re: BUG: af_alg bind fails for 50 % request from userspace for hash algo

2017-02-17 Thread Stephan Müller
Am Mittwoch, 15. Februar 2017, 22:12:16 CET schrieb Harsh Jain: Hi Harsh, > Hi Herbert/Stephen, > > When I try to run 100 application which calculates sha384 digest from > userspace, nearly 50 applications fail in bind system call with error > ENOENT. > > "crypto_alg_mod_lookup" in api.c call f

[PATCH v5 0/2] crypto: AF_ALG memory management fix

2017-02-17 Thread Stephan Müller
Hi Herbert, Changes v5: * use list_for_each_entry_safe in aead_count_tsgl Changes v4: * replace ctx->processed with a maintenance of a private recvmsg TX SGL * algif_skcipher: rename skcipher_sg_list into skcipher_tsgl to make it consistent with algif_aead to prepare for a code consolidation

[PATCH v5 2/2] crypto: aead AF_ALG - overhaul memory management

2017-02-17 Thread Stephan Müller
The updated memory management is described in the top part of the code. As one benefit of the changed memory management, the AIO and synchronous operation is now implemented in one common function. The AF_ALG operation uses the async kernel crypto API interface for each cipher operation. Thus, the

[PATCH v5 1/2] crypto: skcipher AF_ALG - overhaul memory management

2017-02-17 Thread Stephan Müller
The updated memory management is described in the top part of the code. As one benefit of the changed memory management, the AIO and synchronous operation is now implemented in one common function. The AF_ALG operation uses the async kernel crypto API interface for each cipher operation. Thus, the