Re: [PATCH] crypto: talitos - fix missing break in switch statement

2019-09-20 Thread Gustavo A. R. Silva
Hi all, Friendly ping: Who can take this? Thanks -- Gustavo On 9/10/19 01:06, Christophe Leroy wrote: > > > Le 09/09/2019 à 07:29, Gustavo A. R. Silva a écrit : >> Add missing break statement in order to prevent the code from falling >> through to case CRYPTO_ALG_TYPE_AHASH. >> >> Fixes: aeb4

Re: [PATCH 2/2] [v2] crypto: hisilicon - allow compile-testing on x86

2019-09-20 Thread John Garry
On 19/09/2019 15:09, Arnd Bergmann wrote: To avoid missing arm64 specific warnings that get introduced in this driver, allow compile-testing on all 64-bit architectures. The only actual arm64 specific code in this driver is an open- coded 128 bit MMIO write. On non-arm64 the same can be done usi

Re: [PATCHv4] crypto: inside-secure - Fix unused variable warning when CONFIG_PCI=n

2019-09-20 Thread Herbert Xu
On Fri, Sep 13, 2019 at 11:04:40AM +0200, Pascal van Leeuwen wrote: > This patch fixes an unused variable warning from the compiler when the > driver is being compiled without PCI support in the kernel. > > changes since v1: > - capture the platform_register_driver error code as well > - actually

Re: [PATCH 1/2] crypto: hisilicon - Fix double free in sec_free_hw_sgl()

2019-09-20 Thread Herbert Xu
On Sun, Sep 15, 2019 at 05:26:56PM +0800, Yunfeng Ye wrote: > There are two problems in sec_free_hw_sgl(): > > First, when sgl_current->next is valid, @hw_sgl will be freed in the > first loop, but it free again after the loop. > > Second, sgl_current and sgl_current->next_sgl is not match when >

Re: [PATCH] crypto: hisilicon - Fix return value check in hisi_zip_acompress()

2019-09-20 Thread Herbert Xu
On Mon, Sep 16, 2019 at 02:38:25PM +0800, Yunfeng Ye wrote: > The return valude of add_comp_head() is int, but @head_size is size_t, > which is a unsigned type. > > size_t head_size; > ... > if (head_size < 0) // it will never work > return -ENOMEM > > Modify the

Re: [PATCH] hw_random: don't wait on add_early_randomness()

2019-09-20 Thread Herbert Xu
On Tue, Sep 17, 2019 at 03:02:26PM +0200, Laurent Vivier wrote: > On 17/09/2019 14:40, Herbert Xu wrote: > > On Tue, Sep 17, 2019 at 11:54:50AM +0200, Laurent Vivier wrote: > >> add_early_randomness() is called by hwrng_register() when the > >> hardware is added. If this hardware and its module are

Re: [PATCH 1/2] [v2] crypto: hisilicon - avoid unused function warning

2019-09-20 Thread Herbert Xu
On Thu, Sep 19, 2019 at 04:05:52PM +0200, Arnd Bergmann wrote: > The only caller of hisi_zip_vf_q_assign() is hidden in an #ifdef, > so the function causes a warning when CONFIG_PCI_IOV is disabled: > > drivers/crypto/hisilicon/zip/zip_main.c:740:12: error: unused function > 'hisi_zip_vf_q_assign

Re: [PATCH] crypto: talitos - fix missing break in switch statement

2019-09-20 Thread Herbert Xu
On Mon, Sep 09, 2019 at 12:29:52AM -0500, Gustavo A. R. Silva wrote: > Add missing break statement in order to prevent the code from falling > through to case CRYPTO_ALG_TYPE_AHASH. > > Fixes: aeb4c132f33d ("crypto: talitos - Convert to new AEAD interface") > Cc: sta...@vger.kernel.org > Reported-

Re: [PATCH 2/2] [v2] crypto: hisilicon - allow compile-testing on x86

2019-09-20 Thread Arnd Bergmann
On Fri, Sep 20, 2019 at 10:34 AM John Garry wrote: > > + if (!IS_ENABLED(CONFIG_ARM64)) { > > + memcpy_toio(fun_base, src, 16); > > + wmb(); > > + return; > > + } > > + > > asm volatile("ldp %0, %1, %3\n" > >"stp %0, %1, %2\n"

Re: [PATCH 2/2] [v2] crypto: hisilicon - allow compile-testing on x86

2019-09-20 Thread Arnd Bergmann
On Fri, Sep 20, 2019 at 3:26 PM Arnd Bergmann wrote: > > On Fri, Sep 20, 2019 at 10:34 AM John Garry wrote: > > > > + if (!IS_ENABLED(CONFIG_ARM64)) { > > > + memcpy_toio(fun_base, src, 16); > > > + wmb(); > > > + return; > > > + } > > > + > > > a

Re: [PATCH v6 01/12] tpm-buf: move from static inlines to real functions

2019-09-20 Thread Jarkko Sakkinen
On Fri, Sep 20, 2019 at 05:06:15PM +0300, Jarkko Sakkinen wrote: > On Mon, Sep 09, 2019 at 01:17:56PM +0100, James Bottomley wrote: > > This separates out the old tpm_buf_... handling functions from static > > inlines in tpm.h and makes them their own tpm-buf.c file. This is a > > precursor so we

Re: [PATCH v6 01/12] tpm-buf: move from static inlines to real functions

2019-09-20 Thread Jarkko Sakkinen
On Mon, Sep 09, 2019 at 01:17:56PM +0100, James Bottomley wrote: > This separates out the old tpm_buf_... handling functions from static > inlines in tpm.h and makes them their own tpm-buf.c file. This is a > precursor so we can add new functions for other TPM type handling > > Signed-off-by: Jam

Re: [PATCH 2/2] [v2] crypto: hisilicon - allow compile-testing on x86

2019-09-20 Thread John Garry
On 20/09/2019 14:36, Arnd Bergmann wrote: On Fri, Sep 20, 2019 at 3:26 PM Arnd Bergmann wrote: On Fri, Sep 20, 2019 at 10:34 AM John Garry wrote: + if (!IS_ENABLED(CONFIG_ARM64)) { + memcpy_toio(fun_base, src, 16); + wmb(); + return; + } + a

Re: [PATCH v6 02/12] tpm-buf: add handling for TPM2B types

2019-09-20 Thread Jarkko Sakkinen
On Mon, Sep 09, 2019 at 01:18:35PM +0100, James Bottomley wrote: > Most complex TPM commands require appending TPM2B buffers to the > command body. Since TPM2B types are essentially variable size arrays, > it makes it impossible to represent these complex command arguments as > structures and we s

Re: [PATCH v6 05/12] tpm2-sessions: Add full HMAC and encrypt/decrypt session handling

2019-09-20 Thread Jarkko Sakkinen
On Mon, Sep 09, 2019 at 01:20:57PM +0100, James Bottomley wrote: > This code adds true session based HMAC authentication plus parameter > decryption and response encryption using AES. > > The basic design of this code is to segregate all the nasty crypto, > hash and hmac code into tpm2-sessions.c

Re: [PATCH v6 05/12] tpm2-sessions: Add full HMAC and encrypt/decrypt session handling

2019-09-20 Thread Jarkko Sakkinen
On Fri, Sep 20, 2019 at 05:34:00PM +0300, Jarkko Sakkinen wrote: > On Mon, Sep 09, 2019 at 01:20:57PM +0100, James Bottomley wrote: Forgot to ask: what is the new field handles? /Jarkko

Re: [PATCH 08/12] crypto: caam - use devres to de-initialize QI

2019-09-20 Thread Horia Geanta
On 9/4/2019 5:35 AM, Andrey Smirnov wrote: > Use devres to de-initialize the QI and drop explicit de-initialization > code in caam_remove(). > > Signed-off-by: Andrey Smirnov > Cc: Chris Healy > Cc: Lucas Stach > Cc: Horia Geantă > Cc: Herbert Xu > Cc: Iuliana Prodan > Cc: linux-crypto@vger.

Re: [PATCH 09/12] crypto: caam - user devres to populate platform devices

2019-09-20 Thread Horia Geanta
On 9/4/2019 5:35 AM, Andrey Smirnov wrote: > Use devres to de-initialize the RNG and drop explicit de-initialization > code in caam_remove(). > > Signed-off-by: Andrey Smirnov > Cc: Chris Healy > Cc: Lucas Stach > Cc: Horia Geantă > Cc: Herbert Xu > Cc: Iuliana Prodan > Cc: linux-crypto@vger

Re: [PATCH 10/12] crypto: caam - populate platform devices last

2019-09-20 Thread Horia Geanta
On 9/4/2019 5:35 AM, Andrey Smirnov wrote: > @@ -906,6 +900,13 @@ static int caam_probe(struct platform_device *pdev) > debugfs_create_blob("tdsk", S_IRUSR | S_IRGRP | S_IROTH, ctrlpriv->ctl, > &ctrlpriv->ctl_tdsk_wrap); > #endif > + > + ret = devm_of_platform_p

Re: [PATCH] crypto: caam - use the same jr for rng init/exit

2019-09-20 Thread Horia Geanta
On 9/18/2019 9:01 AM, Andrey Smirnov wrote: > On Wed, Sep 11, 2019 at 2:35 AM Horia Geanta wrote: >> >> On 9/4/2019 5:35 AM, Andrey Smirnov wrote: >>> In order to allow caam_jr_enqueue() to lock underlying JR's >>> device (via device_lock(), see commit that follows) we need to make >>> sure that n

Re: [PATCH v6 01/12] tpm-buf: move from static inlines to real functions

2019-09-20 Thread James Bottomley
On Fri, 2019-09-20 at 17:06 +0300, Jarkko Sakkinen wrote: > On Fri, Sep 20, 2019 at 05:06:15PM +0300, Jarkko Sakkinen wrote: > > On Mon, Sep 09, 2019 at 01:17:56PM +0100, James Bottomley wrote: > > > This separates out the old tpm_buf_... handling functions from > > > static > > > inlines in tpm.h

[PATCH v2] dt-bindings: crypto: samsung: Convert SSS and SlimSSS bindings to json-schema

2019-09-20 Thread Krzysztof Kozlowski
Convert Samsung Exynos Security SubSystem (SSS) and SlimSSS hardware crypto accelerator bindings to DT schema format using json-schema. Signed-off-by: Krzysztof Kozlowski --- Rebased on linux-next due to conflicting change in MAINTAINERS file coming through arm-soc tree. Changes since v1: 1. A

Re: PCI: Add stub pci_irq_vector and others

2019-09-20 Thread Bjorn Helgaas
On Wed, Sep 04, 2019 at 10:26:00PM +1000, 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

Re: PCI: Add stub pci_irq_vector and others

2019-09-20 Thread Herbert Xu
On Fri, Sep 20, 2019 at 02:42:16PM -0500, Bjorn Helgaas wrote: > On Wed, Sep 04, 2019 at 10:26:00PM +1000, 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 en

Re: [PATCH v2 1/3] mm: Introduce page_size()

2019-09-20 Thread Andrew Morton
On Tue, 23 Jul 2019 09:02:48 -0700 Matthew Wilcox wrote: > On Mon, Jul 22, 2019 at 05:43:07PM -0700, Ira Weiny wrote: > > > diff --git a/drivers/crypto/chelsio/chtls/chtls_io.c > > > b/drivers/crypto/chelsio/chtls/chtls_io.c > > > index 551bca6fef24..925be5942895 100644 > > > --- a/drivers/crypt

Re: [PATCH v2 1/3] mm: Introduce page_size()

2019-09-20 Thread Matthew Wilcox
On Fri, Sep 20, 2019 at 04:28:48PM -0700, Andrew Morton wrote: > On Tue, 23 Jul 2019 09:02:48 -0700 Matthew Wilcox wrote: > > > On Mon, Jul 22, 2019 at 05:43:07PM -0700, Ira Weiny wrote: > > > > diff --git a/drivers/crypto/chelsio/chtls/chtls_io.c > > > > b/drivers/crypto/chelsio/chtls/chtls_io.