[PATCH v2] crypto: inside-secure - make function safexcel_try_push_requests static

2018-01-15 Thread Antoine Tenart
From: Colin Ian King The function safexcel_try_push_requests is local to the source and does not need to be in global scope, so make it static. Cleans up sparse warning: symbol 'safexcel_try_push_requests' was not declared. Should it be static? Signed-off-by: Colin Ian King [Antoine: fixed al

Re: [RFC] AF_ALG AIO and IV

2018-01-15 Thread Stephan Mueller
Am Montag, 15. Januar 2018, 15:42:58 CET schrieb Jonathan Cameron: Hi Jonathan, > > What about: > > > > sendmsg(IV, data) > > sendmsg(data) > > .. > > AIO recvmsg with multiple IOCBs > > AIO recvmsg with multiple IOCBs > > .. > > sendmsg(IV, data) > > .. > > > > This implies, however, that befo

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

2018-01-15 Thread Herbert Xu
On Fri, Jan 12, 2018 at 02:02:51PM +0100, Antoine Tenart wrote: > Hi Herbert, > > On Fri, Dec 22, 2017 at 03:28:38PM +0100, Antoine Tenart wrote: > > On Fri, Dec 22, 2017 at 08:11:54PM +1100, Herbert Xu wrote: > > > > > > Patches 1-16 applied. If patch 17 needs to go through the crypto > > > tre

[PATCH] crypto: wp512: fixed a brace coding style issue

2018-01-15 Thread Robert Donald Rickett
Fixed a coding style issue. Signed-off-by: Robert Donald Rickett --- crypto/wp512.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crypto/wp512.c b/crypto/wp512.c index 7ee5a043a988..58983e23900d 100644 --- a/crypto/wp512.c +++ b/crypto/wp512.c @@ -993,9 +993,8 @@ static i

[PATCH v2] [v2] crypto: aes-generic - fix aes-generic regression on powerpc

2018-01-15 Thread Arnd Bergmann
My last bugfix added -Os on the command line, which unfortunately caused a build regression on powerpc in some configurations. I've done some more analysis of the original problem and found slightly different workaround that avoids this regression and also results in better performance on gcc-7.0:

Re: [PATCH] crypto: aes-generic - fix aes-generic regression on powerpc

2018-01-15 Thread Arnd Bergmann
On Mon, Jan 15, 2018 at 4:55 PM, Arnd Bergmann wrote: > --- a/crypto/Makefile > +++ b/crypto/Makefile > @@ -99,7 +99,7 @@ obj-$(CONFIG_CRYPTO_TWOFISH_COMMON) += twofish_common.o > obj-$(CONFIG_CRYPTO_SERPENT) += serpent_generic.o > CFLAGS_serpent_generic.o := $(call cc-option,-fsched-pressure)

[PATCH] crypto: aes-generic - fix aes-generic regression on powerpc

2018-01-15 Thread Arnd Bergmann
My last bugfix added -Os on the command line, which unfortunately caused a build regression on powerpc in some configurations. I've done some more analysis of the original problem and found slightly different workaround that avoids this regression and also results in better performance on gcc-7.0:

Re: [RFC] AF_ALG AIO and IV

2018-01-15 Thread Jonathan Cameron
On Mon, 15 Jan 2018 15:31:42 +0100 Stephan Mueller wrote: > Am Montag, 15. Januar 2018, 15:25:38 CET schrieb Jonathan Cameron: > > Hi Jonathan, > > > On Mon, 15 Jan 2018 14:15:42 +0100 > > > > Stephan Mueller wrote: > > > Am Montag, 15. Januar 2018, 13:59:27 CET schrieb Jonathan Cameron: >

Re: [RFC] AF_ALG AIO and IV

2018-01-15 Thread Jonathan Cameron
On Mon, 15 Jan 2018 14:25:38 + Jonathan Cameron wrote: > On Mon, 15 Jan 2018 14:15:42 +0100 > Stephan Mueller wrote: > > > Am Montag, 15. Januar 2018, 13:59:27 CET schrieb Jonathan Cameron: > > > > Hi Jonathan, > > > > > > > > But there may be hardware that cannot/will not track such de

Re: [RFC] AF_ALG AIO and IV

2018-01-15 Thread Stephan Mueller
Am Montag, 15. Januar 2018, 15:25:38 CET schrieb Jonathan Cameron: Hi Jonathan, > On Mon, 15 Jan 2018 14:15:42 +0100 > > Stephan Mueller wrote: > > Am Montag, 15. Januar 2018, 13:59:27 CET schrieb Jonathan Cameron: > > > > Hi Jonathan, > > > > > > But there may be hardware that cannot/will no

Re: [RFC] AF_ALG AIO and IV

2018-01-15 Thread Jonathan Cameron
On Mon, 15 Jan 2018 14:15:42 +0100 Stephan Mueller wrote: > Am Montag, 15. Januar 2018, 13:59:27 CET schrieb Jonathan Cameron: > > Hi Jonathan, > > > > > > But there may be hardware that cannot/will not track such dependencies. > > > Yet, it has multiple hardware queues. Such hardware can still

[PATCH 0/4] KVM: SVM: kbuild test robot warning fixes

2018-01-15 Thread Brijesh Singh
The patch series fixes the warnings reported by kbuild test robot after SEV patches. Additionally, during testing I found that LAUNCH_SECRET command was broken and patch series contains the fix for it. The patch series applies on kvm/queue branch. Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Boris

[PATCH 1/4] crypto: ccp: Fix sparse, use plain integer as NULL pointer

2018-01-15 Thread Brijesh Singh
Fix sparse warning: Using plain integer as NULL pointer. Replaces assignment of 0 to pointer with NULL assignment. Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Borislav Petkov Cc: Herbert Xu Cc: Gary Hook Cc: Tom Lendacky Cc: linux-crypto@vger.kernel.org Cc: linux-ker...@vger.kernel.org Signed-o

Re: [RFC] AF_ALG AIO and IV

2018-01-15 Thread Stephan Mueller
Am Montag, 15. Januar 2018, 13:59:27 CET schrieb Jonathan Cameron: Hi Jonathan, > > > > But there may be hardware that cannot/will not track such dependencies. > > Yet, it has multiple hardware queues. Such hardware can still handle > > parallel requests when they are totally independent from eac

Re: [RFC] AF_ALG AIO and IV

2018-01-15 Thread Jonathan Cameron
On Mon, 15 Jan 2018 13:07:16 +0100 Stephan Mueller wrote: > Am Montag, 15. Januar 2018, 12:05:03 CET schrieb Jonathan Cameron: > > Hi Jonathan, > > > On Fri, 12 Jan 2018 14:21:15 +0100 > > > > Stephan Mueller wrote: > > > Hi, > > > > > > The kernel crypto API requires the caller to set an

[PATCH 4.4 43/87] hwrng: core - sleep interruptible in read

2018-01-15 Thread Greg Kroah-Hartman
4.4-stable review patch. If anyone has any objections, please let me know. -- From: Jiri Slaby commit 1ab87298cb59b649d8d648d25dc15b36ab865f5a upstream. hwrng kthread can be waiting via hwrng_fillfn for some data from a rng like virtio-rng: hwrng D 880093e17798

Re: [RFC] AF_ALG AIO and IV

2018-01-15 Thread Stephan Mueller
Am Montag, 15. Januar 2018, 12:05:03 CET schrieb Jonathan Cameron: Hi Jonathan, > On Fri, 12 Jan 2018 14:21:15 +0100 > > Stephan Mueller wrote: > > Hi, > > > > The kernel crypto API requires the caller to set an IV in the request data > > structure. That request data structure shall define one

[PATCH] crypto/generic: sha3: rewrite KECCAK transform to help the GCC optimizer

2018-01-15 Thread Ard Biesheuvel
The way the KECCAK transform is currently coded involves many references into the state array using indexes that are calculated at runtime using simple but non-trivial arithmetic. This forces the compiler to treat the state matrix as an array in memory rather than keep it in registers, which result

Re: [RFC] AF_ALG AIO and IV

2018-01-15 Thread Jonathan Cameron
On Fri, 12 Jan 2018 14:21:15 +0100 Stephan Mueller wrote: > Hi, > > The kernel crypto API requires the caller to set an IV in the request data > structure. That request data structure shall define one particular cipher > operation. During the cipher operation, the IV is read by the cipher > i

Re: AF_ALG: skb limits

2018-01-15 Thread Jonathan Cameron
On Sat, 13 Jan 2018 15:04:20 +0100 Stephan Müller wrote: > Am Dienstag, 12. Dezember 2017, 14:59:21 CET schrieb Jonathan Cameron: > Hi Stephan, > Hi Jonathan, > > > On Fri, 8 Dec 2017 13:43:20 +0100 > > > > Stephan Mueller wrote: > > > Am Freitag, 8. Dezember 2017, 12:39:06 CET schrieb Jon

Re: [RFC] AF_ALG AIO and IV

2018-01-15 Thread Stephan Mueller
Am Freitag, 12. Januar 2018, 14:21:15 CET schrieb Stephan Mueller: Hi, > > 1. Require that the cipher implementations serialize any AIO requests that > have dependencies. I.e. for CBC, requests need to be serialized by the > driver. For, say, ECB or XTS no serialization is necessary. > > 2. Chan

[PATCH] crypto: AF_ALG - inline IV support

2018-01-15 Thread Stephan Mueller
The kernel crypto API requires the caller to set an IV in the request data structure. That request data structure shall define one particular cipher operation. During the cipher operation, the IV is read by the cipher implementation and eventually the potentially updated IV (e.g. in case of CBC) is

Re: [PATCH][next] hwrng: exynos: check for -ve error return from readl_poll_timeout

2018-01-15 Thread Krzysztof Kozlowski
On Fri, Jan 12, 2018 at 5:30 PM, Colin King wrote: > From: Colin Ian King > > Currently, the return from readl_poll_timeout is being assigned to > a u32 and this is being checked for a -ve return which is always > false since a u32 cannot be less than zero. Fix this by changing > val to an int s

Re: [PATCH v2 1/3] crypto/generic: sha3 - fixes for alignment and big endian operation

2018-01-15 Thread Ard Biesheuvel
On 15 January 2018 at 05:53, Chris Moore wrote: > Hi, > > Le 14/01/2018 à 17:41, Ard Biesheuvel a écrit : >> >> Ensure that the input is byte swabbed before injecting it into the > > > Nitpick : s/swabbed/swapped/ > Thanks Chris - byte swapping is often referred to as swabbing, but I guess 'byte