Re: [PATCH] crypto: arm64: Use PTR_ERR_OR_ZERO rather than its implementation.

2019-09-04 Thread zhong jiang
On 2019/9/4 18:25, Will Deacon wrote: > On Tue, Sep 03, 2019 at 02:54:16PM +0800, zhong jiang wrote: >> PTR_ERR_OR_ZERO contains if(IS_ERR(...)) + PTR_ERR. It is better to >> use it directly. hence just replace it. >> >> Signed-off-by: zhong jiang >> --- >> arch/arm64/crypto/aes-glue.c | 4 +--- >

Re: crypto: skcipher - Unmap pages after an external error

2019-09-04 Thread Herbert Xu
On Wed, Sep 04, 2019 at 10:22:17PM -0700, Eric Biggers wrote: > > Okay, but what about external callers that pass in an error? (I mean, I don't > actually see any currently, but the point of this patch is to allow it...) > What would prevent the crash in scatterwalk_done() in that case? With exte

Re: crypto: skcipher - Unmap pages after an external error

2019-09-04 Thread Eric Biggers
On Wed, Sep 04, 2019 at 08:36:41AM +1000, Herbert Xu wrote: > On Tue, Sep 03, 2019 at 08:50:20AM -0500, Eric Biggers wrote: > > > > Doesn't this re-introduce the same bug that my patch fixed -- that > > scatterwalk_done() could be called after 0 bytes processed, causing a crash > > in > > scatterw

Re: [PATCH 0/9] crypto: sha256 - Merge crypto/sha256.h into crypto/sha.h

2019-09-04 Thread Herbert Xu
On Sun, Sep 01, 2019 at 10:35:23PM +0200, Hans de Goede wrote: > Hi All, > > As promised here is a follow-up series to my earlier sha256 series. > > Note I have only compiled and tested this series on x86_64 !! > > All changes to architecture specific code on other archs have not even > been te

Re: [PATCH] hw_random: timeriomem_rng: relax check on memory resource size

2019-09-04 Thread Herbert Xu
On Sat, Aug 31, 2019 at 01:55:55PM +0200, Daniel Mack wrote: > The timeriomem_rng driver only accesses the first 4 bytes of the given > memory area and currently, it also forces that memory resource to be > exactly 4 bytes in size. > > This, however, is problematic when used with device-trees that

Re: [PATCH 0/4] Add support for AES-GCM, AES-CFB, AES-OFB and AES-CCM

2019-09-04 Thread Herbert Xu
Pascal van Leeuwen wrote: > This patchset adds support for the AES-GCM and AES-CCM AEAD ciphersuites > and the AES-CFB and AES-OFB feedback modes for AES. > > Pascal van Leeuwen (4): > crypto: inside-secure - Added support for basic AES-GCM > crypto: inside-secure - Added AES-CFB support > cry

Re: [PATCH] crypto: inside-secure - Minor code cleanup and optimizations

2019-09-04 Thread Herbert Xu
Pascal van Leeuwen wrote: > Some minor cleanup changing e.g. "if (!x) A else B" to "if (x) B else A", > merging some back-to-back if's with the same condition, collapsing some > back-to-back assignments to the same variable and replacing some weird > assignments with proper symbolics. > > Signed-

Re: [PATCH] crypto: inside-secure - Minor optimization recognizing CTR is always AES

2019-09-04 Thread Herbert Xu
Pascal van Leeuwen wrote: > Moved counter mode handling code in front as it doesn't depend on the > rest of the code to be executed, it can just do its thing and exit. > > Signed-off-by: Pascal van Leeuwen > --- > drivers/crypto/inside-secure/safexcel_cipher.c | 25 ++--- > 1

Re: [PATCH] crypto: inside-secure - Made .cra_priority value a define

2019-09-04 Thread Herbert Xu
Pascal van Leeuwen wrote: > Instead of having a fixed value (of 300) all over the place, the value for > for .cra_priority is now made into a define (SAFEXCEL_CRA_PRIORITY). > This makes it easier to play with, e.g. during development. > > Signed-off-by: Pascal van Leeuwen > --- > drivers/crypto

Re: [PATCH 0/3] crypto: inside-secure - Add AES-XTS cipher support

2019-09-04 Thread Herbert Xu
Pascal van Leeuwen wrote: > This patch adds support for the AES-XTS algorithm for HW that supports it. > > Pascal van Leeuwen (3): > crypto: inside-secure - Move static cipher alg & mode settings to init > crypto: inside-secure - Add support for the AES-XTS algorithm > crypto: inside-secure -

Re: [PATCH 1/5] crypto: mediatek: move mtk_aes_find_dev() to the right place

2019-09-04 Thread Herbert Xu
On Wed, Aug 28, 2019 at 02:37:12PM +0800, Vic Wu wrote: > From: Ryder Lee > > Move mtk_aes_find_dev() to right functions as nobody uses the > 'cryp' under current flows. > > We can also avoid duplicate checks here and there in this way. > > Signed-off-by: Ryder Lee > Signed-off-by: Vic Wu > -

crypto: ux500 - Fix COMPILE_TEST warnings

2019-09-04 Thread Herbert Xu
This patch fixes a number of warnings encountered when this driver is built on a 64-bit platform with COMPILE_TEST. Signed-off-by: Herbert Xu diff --git a/drivers/crypto/ux500/cryp/cryp_core.c b/drivers/crypto/ux500/cryp/cryp_core.c index e966e9a64501..1628ae7a1467 100644 --- a/drivers/crypto/u

Re: [PATCH v2 0/9] padata: use unbound workqueues for parallel jobs

2019-09-04 Thread Herbert Xu
On Thu, Aug 29, 2019 at 01:30:29PM -0400, Daniel Jordan wrote: > Hello, > > Everything in the Testing section has been rerun after the suggestion > from Herbert last round. Thanks again to Steffen for giving this a run. > > Any comments welcome. > > Daniel > > v1[*] -> v2: > - Updated patch

Re: [PATCH v2 1/5] padata: make flushing work with async users

2019-09-04 Thread Herbert Xu
On Wed, Aug 28, 2019 at 06:14:21PM -0400, Daniel Jordan wrote: > > @@ -453,24 +456,15 @@ static void padata_free_pd(struct parallel_data *pd) > /* Flush all objects out of the padata queues. */ > static void padata_flush_queues(struct parallel_data *pd) > { > - int cpu; > - struct padata

Re: [PATCH] random: Support freezable kthreads in add_hwgenerator_randomness()

2019-09-04 Thread Stephen Boyd
Quoting Sebastian Andrzej Siewior (2019-09-04 04:00:38) > On 2019-08-22 15:55:19 [+1000], Herbert Xu wrote: > > Patch applied. Thanks. > [ ff296293b3538 ("random: Support freezable kthreads in > add_hwgenerator_randomness()") ] > > and since kthread_freezable_should_stop() has might_sleep() in i

[PATCH] crypto: x86/aes-ni - use AES library instead of single-use AES cipher

2019-09-04 Thread Ard Biesheuvel
The RFC4106 key derivation code instantiates an AES cipher transform to encrypt only a single block before it is freed again. Switch to the new AES library which is more suitable for such use cases. Signed-off-by: Ard Biesheuvel --- arch/x86/crypto/aesni-intel_glue.c | 17 ++--- 1 fi

RE: [PATCH V2 4/4] crypto: Add Xilinx AES driver

2019-09-04 Thread Kalyani Akula
Hi Corentin, Thanks for the review comments. Please find my response/queries inline. > -Original Message- > From: Corentin Labbe > Sent: Monday, September 2, 2019 12:29 PM > To: Kalyani Akula > Cc: herb...@gondor.apana.org.au; kstew...@linuxfoundation.org; > gre...@linuxfoundation.org;

Zdravstvujte! Vas interesujut klientskie bazy dannyh?

2019-09-04 Thread prodawez
Zdravstvujte! Vas interesujut klientskie bazy dannyh?

Zdravstvujte! Vas interesujut klientskie bazy dannyh?

2019-09-04 Thread prodawez
Zdravstvujte! Vas interesujut klientskie bazy dannyh?

Re: PCI: Add stub pci_irq_vector and others

2019-09-04 Thread Yuehaibing
On 2019/9/4 20:26, Herbert Xu wrote: > On Wed, Sep 04, 2019 at 05:10:34AM -0700, Ard Biesheuvel wrote: >> >> This is the reason we have so many empty static inline functions in >> header files - it ensures that the symbols are declared even if the >> only invocations are from dead code. > > Does t

Re: [PATCH cryptodev buildfix] crypto: s390/aes - fix typo in XTS_BLOCK_SIZE identifier

2019-09-04 Thread Ard Biesheuvel
On Wed, 4 Sep 2019 at 07:21, Harald Freudenberger wrote: > > On 22.08.19 12:24, Ard Biesheuvel wrote: > > Fix a typo XTS_BLOCKSIZE -> XTS_BLOCK_SIZE, causing the build to > > break. > > > > Signed-off-by: Ard Biesheuvel > > --- > > Apologies for the sloppiness. > > > > Herbert, could we please me

Re: [PATCH cryptodev buildfix] crypto: s390/aes - fix typo in XTS_BLOCK_SIZE identifier

2019-09-04 Thread Harald Freudenberger
On 22.08.19 12:24, Ard Biesheuvel wrote: > Fix a typo XTS_BLOCKSIZE -> XTS_BLOCK_SIZE, causing the build to > break. > > Signed-off-by: Ard Biesheuvel > --- > Apologies for the sloppiness. > > Herbert, could we please merge this before cryptodev hits -next? > > arch/s390/crypto/aes_s390.c | 4 ++-

[PATCH] crypto: cavium/zip - Add missing single_release()

2019-09-04 Thread Wei Yongjun
When using single_open() for opening, single_release() should be used instead of seq_release(), otherwise there is a memory leak. Fixes: 09ae5d37e093 ("crypto: zip - Add Compression/Decompression statistics") Signed-off-by: Wei Yongjun --- drivers/crypto/cavium/zip/zip_main.c | 3 +++ 1 file cha

Re: [PATCH v2 -next] crypto: inside-secure - Fix build error without CONFIG_PCI

2019-09-04 Thread Herbert Xu
On Wed, Sep 04, 2019 at 12:45:00PM +, Pascal Van Leeuwen wrote: > So, with that patch you ONLY get a warning on that unused int rc, right? > > I do understand that one, that should have been inside an #ifdef as well. > Everybody happy if I just fix that and leave the rest as is? Yes please se

Re: [PATCH 0/9] crypto: sha256 - Merge crypto/sha256.h into crypto/sha.h

2019-09-04 Thread Ard Biesheuvel
On Sun, 1 Sep 2019 at 13:35, Hans de Goede wrote: > > Hi All, > > As promised here is a follow-up series to my earlier sha256 series. > > Note I have only compiled and tested this series on x86_64 !! > > All changes to architecture specific code on other archs have not even > been tested to compil

RE: [PATCH v2 -next] crypto: inside-secure - Fix build error without CONFIG_PCI

2019-09-04 Thread Pascal Van Leeuwen
So, with that patch you ONLY get a warning on that unused int rc, right? I do understand that one, that should have been inside an #ifdef as well. Everybody happy if I just fix that and leave the rest as is? Regards, Pascal van Leeuwen Silicon IP Architect, Multi-Protocol Engines @ Verimatrix www

RE: [PATCH v2 -next] crypto: inside-secure - Fix build error without CONFIG_PCI

2019-09-04 Thread Pascal Van Leeuwen
> -Original Message- > From: Ard Biesheuvel > Sent: Wednesday, September 4, 2019 2:27 PM > To: Pascal Van Leeuwen > Cc: YueHaibing ; antoine.ten...@bootlin.com; > herb...@gondor.apana.org.au; da...@davemloft.net; > pvanleeu...@insidesecure.com; linux- > cry...@vger.kernel.org; linux-ker.

Re: [PATCH v2 -next] crypto: inside-secure - Fix build error without CONFIG_PCI

2019-09-04 Thread Herbert Xu
On Wed, Sep 04, 2019 at 05:27:19AM -0700, Ard Biesheuvel wrote: > > Did you try disabling CONFIG_PCI? Indeed. Even with my patch if you compile with CONFIG_PCI you still get a warning: CC [M] drivers/crypto/inside-secure/safexcel.o ../drivers/crypto/inside-secure/safexcel.c: In function \u2

Re: [PATCH v2 -next] crypto: inside-secure - Fix build error without CONFIG_PCI

2019-09-04 Thread Ard Biesheuvel
On Wed, 4 Sep 2019 at 05:25, Pascal Van Leeuwen wrote: > > > -Original Message- > > From: Ard Biesheuvel > > Sent: Wednesday, September 4, 2019 2:11 PM > > To: Pascal Van Leeuwen > > Cc: YueHaibing ; antoine.ten...@bootlin.com; > > herb...@gondor.apana.org.au; da...@davemloft.net; > > p

PCI: Add stub pci_irq_vector and others

2019-09-04 Thread Herbert Xu
On Wed, Sep 04, 2019 at 05:10:34AM -0700, Ard Biesheuvel wrote: > > This is the reason we have so many empty static inline functions in > header files - it ensures that the symbols are declared even if the > only invocations are from dead code. Does this patch work? ---8<--- This patch adds stub

RE: [PATCH v2 -next] crypto: inside-secure - Fix build error without CONFIG_PCI

2019-09-04 Thread Pascal Van Leeuwen
> -Original Message- > From: Ard Biesheuvel > Sent: Wednesday, September 4, 2019 2:11 PM > To: Pascal Van Leeuwen > Cc: YueHaibing ; antoine.ten...@bootlin.com; > herb...@gondor.apana.org.au; da...@davemloft.net; > pvanleeu...@insidesecure.com; linux- > cry...@vger.kernel.org; linux-ker.

Re: [PATCH v2 -next] crypto: inside-secure - Fix build error without CONFIG_PCI

2019-09-04 Thread Ard Biesheuvel
On Wed, 4 Sep 2019 at 04:57, Pascal Van Leeuwen wrote: > > > > -Original Message- > > From: linux-crypto-ow...@vger.kernel.org > > On Behalf Of > > YueHaibing > > Sent: Tuesday, September 3, 2019 3:45 AM > > To: antoine.ten...@bootlin.com; herb...@gondor.apana.org.au; > > da...@davemlof

RE: [PATCH v2 -next] crypto: inside-secure - Fix build error without CONFIG_PCI

2019-09-04 Thread Pascal Van Leeuwen
> -Original Message- > From: linux-crypto-ow...@vger.kernel.org > On Behalf Of > YueHaibing > Sent: Tuesday, September 3, 2019 3:45 AM > To: antoine.ten...@bootlin.com; herb...@gondor.apana.org.au; > da...@davemloft.net; > pvanleeu...@insidesecure.com > Cc: linux-crypto@vger.kernel.org

Re: [PATCH] random: Support freezable kthreads in add_hwgenerator_randomness()

2019-09-04 Thread Sebastian Andrzej Siewior
On 2019-08-22 15:55:19 [+1000], Herbert Xu wrote: > Patch applied. Thanks. [ ff296293b3538 ("random: Support freezable kthreads in add_hwgenerator_randomness()") ] and since kthread_freezable_should_stop() has might_sleep() in it, I get this: |: do not call blocking ops when !TASK_RUNNING; stat

Question: kexec() ISO images using encrypted partitions and/or "persistent RAM".

2019-09-04 Thread Hunter Nins
Good day, I'm currently experimenting with the use of kexec() to change the currently-running kernel on my test machine (Intel PC). So far, so good: I'm able to change the currently-running kernel and initrd image via kexec, and am now attempting to live-boot an ISO image (i.e. Ubuntu 18.04 Server

Re: [PATCH] crypto: arm64: Use PTR_ERR_OR_ZERO rather than its implementation.

2019-09-04 Thread Will Deacon
On Tue, Sep 03, 2019 at 02:54:16PM +0800, zhong jiang wrote: > PTR_ERR_OR_ZERO contains if(IS_ERR(...)) + PTR_ERR. It is better to > use it directly. hence just replace it. > > Signed-off-by: zhong jiang > --- > arch/arm64/crypto/aes-glue.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions

[PATCH 3/3] crypto: inside-secure - Added support for the AES-CMAC ahash

2019-09-04 Thread Pascal van Leeuwen
This patch adds support for the AES-CMAC authentication algorithm. Signed-off-by: Pascal van Leeuwen --- drivers/crypto/inside-secure/safexcel.c | 1 + drivers/crypto/inside-secure/safexcel.h | 1 + drivers/crypto/inside-secure/safexcel_hash.c | 99 3 fil

[PATCH 1/3] crypto: inside-secure - Added support for the AES CBCMAC ahash

2019-09-04 Thread Pascal van Leeuwen
This patch adds support for the AES-CBCMAC authentication algorithm. Signed-off-by: Pascal van Leeuwen --- drivers/crypto/inside-secure/safexcel.c | 1 + drivers/crypto/inside-secure/safexcel.h | 1 + drivers/crypto/inside-secure/safexcel_hash.c | 235 ++- 3

[PATCH 0/3] crypto: inside-secure - Add support for the CBCMAC

2019-09-04 Thread Pascal van Leeuwen
This patchset adds support for the (AES) CBCMAC family of authentication algorithms: AES-CBCMAC, AES-XCBCMAC and AES-MAC It has been verified with a Xilinx PCIE FPGA board as well as the Marvell Armada A8K based Macchiatobin development board. Pascal van Leeuwen (3): crypto: inside-secure - Adde

[PATCH 2/3] crypto: inside-secure - Added support for the AES XCBC ahash

2019-09-04 Thread Pascal van Leeuwen
This patch adds support for the AES XCBC authentication algorithm Signed-off-by: Pascal van Leeuwen --- drivers/crypto/inside-secure/safexcel.c | 1 + drivers/crypto/inside-secure/safexcel.h | 1 + drivers/crypto/inside-secure/safexcel_hash.c | 136 ++- 3 fi