[PATCH 0/2] crypto: ccp - Remove unnecessary includes

2019-08-02 Thread Bjorn Helgaas
From: Bjorn Helgaas CCP includes many times unnecessarily. Add a couple DMA-related includes for dma_direction and dma_get_mask(), which were previously included indirectly via . Then remove the unnecessary includes of . Bjorn Helgaas (2): crypto: ccp - Include DMA declarations explicitly

[PATCH 2/2] crypto: ccp - Remove unnecessary linux/pci.h include

2019-08-02 Thread Bjorn Helgaas
From: Bjorn Helgaas Remove unused includes of linux/pci.h. Signed-off-by: Bjorn Helgaas --- drivers/crypto/ccp/ccp-crypto.h | 1 - drivers/crypto/ccp/ccp-dev-v3.c | 1 - drivers/crypto/ccp/ccp-dev-v5.c | 1 - drivers/crypto/ccp/ccp-dev.h| 1 - drivers/crypto/ccp/ccp-ops.c| 1 - drivers

[PATCH 1/2] crypto: ccp - Include DMA declarations explicitly

2019-08-02 Thread Bjorn Helgaas
From: Bjorn Helgaas ccp-dev.h uses dma_direction, which is defined in linux/dma-direction.h. Include that explicitly instead of relying on it being included via linux/pci.h, since ccp-dev.h requires nothing else from linux/pci.h. Similarly, ccp-dmaengine.c uses dma_get_mask(), which is defined i

Re: [RFC/RFT v2 1/2] KEYS: trusted: create trusted keys subsystem

2019-08-02 Thread Jarkko Sakkinen
On Fri, Aug 02, 2019 at 11:20:09AM +0530, Sumit Garg wrote: > On Thu, 1 Aug 2019 at 22:54, Jarkko Sakkinen > wrote: > > > > On Thu, Jul 18, 2019 at 04:54:45PM +0530, Sumit Garg wrote: > > > Move existing code to trusted keys subsystem. Also, rename files with > > > "tpm" as suffix which provides t

Re: [PATCH v7 14/16] f2fs: wire up new fscrypt ioctls

2019-08-02 Thread Eric Biggers
On Fri, Aug 02, 2019 at 04:10:15PM +0800, Chao Yu wrote: > Hi Eric, > > On 2019/7/27 6:41, Eric Biggers wrote: > > From: Eric Biggers > > > > Wire up the new ioctls for adding and removing fscrypt keys to/from the > > filesystem, and the new ioctl for retrieving v2 encryption policies. > > > >

Re: [PATCH -next 05/12] crypto: inside-secure - use devm_platform_ioremap_resource() to simplify code

2019-08-02 Thread Antoine Tenart
Hello, On Fri, Aug 02, 2019 at 09:28:02PM +0800, YueHaibing wrote: > Use devm_platform_ioremap_resource() to simplify the code a bit. > This is detected by coccinelle. > > Reported-by: Hulk Robot > Signed-off-by: YueHaibing Acked-by: Antoine Tenart Thanks, Antoine > --- > drivers/crypto/in

Re: [PATCH -next 09/12] crypto: rockchip - use devm_platform_ioremap_resource() to simplify code

2019-08-02 Thread Heiko Stuebner
Am Freitag, 2. August 2019, 15:28:06 CEST schrieb YueHaibing: > Use devm_platform_ioremap_resource() to simplify the code a bit. > This is detected by coccinelle. > > Reported-by: Hulk Robot > Signed-off-by: YueHaibing looks like nice and simple improvement Reviewed-by: Heiko Stuebner Thanks

[PATCH RFC 3/3] crypto: arm64/aegis128 - implement plain NEON version

2019-08-02 Thread Ard Biesheuvel
Provide a version of the core AES transform to the aegis128 SIMD code that does not rely on the special AES instructions, but uses plain NEON instructions instead. This allows the SIMD version of the aegis128 driver to be used on arm64 systems that do not implement those instructions (which are not

[PATCH 0/3] crypto: aegis128 followup

2019-08-02 Thread Ard Biesheuvel
This series resubmits the aegis128 SIMD patches that were reverted due to the fact that the compiler's optimization behavior wrt variables with static linkage does not turn out to guarantee that function calls that are conditional on the value of such a variable are optimized away if the value is a

[PATCH resend 2/3] crypto: aegis128 - provide a SIMD implementation based on NEON intrinsics

2019-08-02 Thread Ard Biesheuvel
Provide an accelerated implementation of aegis128 by wiring up the SIMD hooks in the generic driver to an implementation based on NEON intrinsics, which can be compiled to both ARM and arm64 code. This results in a performance of 2.2 cycles per byte on Cortex-A53, which is a performance increase o

[PATCH resend 1/3] crypto: aegis128 - add support for SIMD acceleration

2019-08-02 Thread Ard Biesheuvel
Add some plumbing to allow the AEGIS128 code to be built with SIMD routines for acceleration. Reviewed-by: Ondrej Mosnacek Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu --- crypto/Makefile| 1 + crypto/{aegis128.c => aegis128-core.c} | 52 ++--

[PATCH -next 05/12] crypto: inside-secure - use devm_platform_ioremap_resource() to simplify code

2019-08-02 Thread YueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot Signed-off-by: YueHaibing --- drivers/crypto/inside-secure/safexcel.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/crypto/inside-secure/safe

[PATCH -next 06/12] crypto: mediatek - use devm_platform_ioremap_resource() to simplify code

2019-08-02 Thread YueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot Signed-off-by: YueHaibing --- drivers/crypto/mediatek/mtk-platform.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/crypto/mediatek/mtk-platfor

[PATCH -next 03/12] crypto: exynos - use devm_platform_ioremap_resource() to simplify code

2019-08-02 Thread YueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot Signed-off-by: YueHaibing --- drivers/crypto/exynos-rng.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/crypto/exynos-rng.c b/drivers/crypto/

[PATCH -next 10/12] crypto: stm32 - use devm_platform_ioremap_resource() to simplify code

2019-08-02 Thread YueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot Signed-off-by: YueHaibing --- drivers/crypto/stm32/stm32-crc32.c | 4 +--- drivers/crypto/stm32/stm32-cryp.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff

[PATCH -next 12/12] crypto: qcom-rng - use devm_platform_ioremap_resource() to simplify code

2019-08-02 Thread YueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot Signed-off-by: YueHaibing --- drivers/crypto/qcom-rng.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/crypto/qcom-rng.c b/drivers/crypto/qcom

[PATCH -next 09/12] crypto: rockchip - use devm_platform_ioremap_resource() to simplify code

2019-08-02 Thread YueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot Signed-off-by: YueHaibing --- drivers/crypto/rockchip/rk3288_crypto.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/crypto/rockchip/rk3288_cr

[PATCH -next 08/12] crypto: sunxi-ss - use devm_platform_ioremap_resource() to simplify code

2019-08-02 Thread YueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot Signed-off-by: YueHaibing --- drivers/crypto/sunxi-ss/sun4i-ss-core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/crypto/sunxi-ss/sun4i-ss-

[PATCH -next 07/12] crypto: picoxcell - use devm_platform_ioremap_resource() to simplify code

2019-08-02 Thread YueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot Signed-off-by: YueHaibing --- drivers/crypto/picoxcell_crypto.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/crypto/picoxcell_crypto.c b/

[PATCH -next 11/12] crypto: qce - use devm_platform_ioremap_resource() to simplify code

2019-08-02 Thread YueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot Signed-off-by: YueHaibing --- drivers/crypto/qce/core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/crypto/qce/core.c b/drivers/crypto/qce/

[PATCH -next 02/12] crypto: ccp - use devm_platform_ioremap_resource() to simplify code

2019-08-02 Thread YueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot Signed-off-by: YueHaibing --- drivers/crypto/ccp/sp-platform.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/crypto/ccp/sp-platform.c b/drive

[PATCH -next 00/12] crypto: use devm_platform_ioremap_resource() to simplify code

2019-08-02 Thread YueHaibing
devm_platform_ioremap_resource() internally have platform_get_resource() and devm_ioremap_resource() in it. So instead of calling them separately use devm_platform_ioremap_resource() directly. YueHaibing (12): crypto: artpec6 - use devm_platform_ioremap_resource() to simplify code crypto:

[PATCH -next 04/12] crypto: img-hash - use devm_platform_ioremap_resource() to simplify code

2019-08-02 Thread YueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot Signed-off-by: YueHaibing --- drivers/crypto/img-hash.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/crypto/img-hash.c b/drivers/crypto/img-

[PATCH -next 01/12] crypto: artpec6 - use devm_platform_ioremap_resource() to simplify code

2019-08-02 Thread YueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot Signed-off-by: YueHaibing --- drivers/crypto/axis/artpec6_crypto.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/crypto/axis/artpec6_crypto.c

[PATCH 4.9 082/223] crypto: crypto4xx - fix a potential double free in ppc4xx_trng_probe

2019-08-02 Thread Greg Kroah-Hartman
From: Wen Yang commit 95566aa75cd6b3b404502c06f66956b5481194b3 upstream. There is a possible double free issue in ppc4xx_trng_probe(): 85: dev->trng_base = of_iomap(trng, 0); 86: of_node_put(trng); ---> released here 87: if (!dev->trng_base) 88: goto err_out; ..

[PATCH 4.9 098/223] padata: use smp_mb in padata_reorder to avoid orphaned padata jobs

2019-08-02 Thread Greg Kroah-Hartman
From: Daniel Jordan commit cf144f81a99d1a3928f90b0936accfd3f45c9a0a upstream. Testing padata with the tcrypt module on a 5.2 kernel... # modprobe tcrypt alg="pcrypt(rfc4106(gcm(aes)))" type=3 # modprobe tcrypt mode=211 sec=1 ...produces this splat: INFO: task modprobe:10075 blocke

[PATCH 4.4 068/158] padata: use smp_mb in padata_reorder to avoid orphaned padata jobs

2019-08-02 Thread Greg Kroah-Hartman
From: Daniel Jordan commit cf144f81a99d1a3928f90b0936accfd3f45c9a0a upstream. Testing padata with the tcrypt module on a 5.2 kernel... # modprobe tcrypt alg="pcrypt(rfc4106(gcm(aes)))" type=3 # modprobe tcrypt mode=211 sec=1 ...produces this splat: INFO: task modprobe:10075 blocke

RE: [PATCH 0/2] Add support for the AES-XTS algorithm

2019-08-02 Thread Pascal Van Leeuwen
> -Original Message- > From: linux-crypto-ow...@vger.kernel.org > On Behalf Of > Herbert Xu > Sent: Friday, August 2, 2019 6:45 AM > To: Pascal van Leeuwen > Cc: linux-crypto@vger.kernel.org; antoine.ten...@bootlin.com; > da...@davemloft.net; Pascal > Van Leeuwen > Subject: Re: [PATCH

RE: Need help with failling gcm_base(ctr,ghash-generic) selftest

2019-08-02 Thread Pascal Van Leeuwen
> -Original Message- > From: Corentin Labbe > Sent: Friday, August 2, 2019 7:19 AM > To: Pascal Van Leeuwen > Cc: herb...@gondor.apana.org.au; linux-crypto@vger.kernel.org; linux- > ker...@vger.kernel.org > Subject: Re: Need help with failling gcm_base(ctr,ghash-generic) selftest > > O

[PATCH v5] crypto: gcm - restrict assoclen for rfc4543

2019-08-02 Thread Iuliana Prodan
Based on seqiv, IPsec ESP and rfc4543/rfc4106 the assoclen can be 16 or 20 bytes. >From esp4/esp6, assoclen is sizeof IP Header. This includes spi, seq_no and extended seq_no, that is 8 or 12 bytes. In seqiv, to asscolen is added the IV size (8 bytes). Therefore, the assoclen, for rfc4543, should

[PATCH v3 3/7] crypto: hisilicon - add HiSilicon ZIP accelerator support

2019-08-02 Thread Zhou Wang
The HiSilicon ZIP accelerator implements the zlib and gzip algorithm. It uses Hisilicon QM as the interface to the CPU. This patch provides PCIe driver to the accelerator and registers it to crypto acomp interface. It also uses sgl as data input/output interface. Signed-off-by: Zhou Wang Signed-

[PATCH v3 2/7] crypto: hisilicon - add hardware SGL support

2019-08-02 Thread Zhou Wang
HiSilicon accelerators in Hip08 use same hardware scatterlist for data format. We support it in this module. Specific accelerator drivers can use hisi_acc_create_sgl_pool to allocate hardware SGLs ahead. Then use hisi_acc_sg_buf_map_to_hw_sgl to get one hardware SGL and pass related information to

[PATCH v3 4/7] crypto: hisilicon - add SRIOV support for ZIP

2019-08-02 Thread Zhou Wang
HiSilicon ZIP engine supports PCI SRIOV. This patch enable this feature. User can enable VFs and pass through them to VM, same ZIP driver can work in VM to provide ZLIB and GZIP algorithm by crypto acomp interface. Signed-off-by: Zhou Wang --- drivers/crypto/hisilicon/qm.c | 97 ++

[PATCH v3 7/7] MAINTAINERS: add maintainer for HiSilicon QM and ZIP controller driver

2019-08-02 Thread Zhou Wang
Add Zhou Wang as a maintainer for HiSilicon QM and ZIP controller driver. Signed-off-by: Zhou Wang Reviewed-by: John Garry --- MAINTAINERS | 11 +++ 1 file changed, 11 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 783569e..667aac4 100644 --- a/MAINTAINERS +++ b/MAINTAINERS

[PATCH v3 6/7] crypto: hisilicon - add debugfs for ZIP and QM

2019-08-02 Thread Zhou Wang
HiSilicon ZIP engine driver uses debugfs to provide debug information, the usage can be found in /Documentation/ABI/testing/debugfs-hisi-zip. Signed-off-by: Zhou Wang --- drivers/crypto/hisilicon/qm.c | 301 + drivers/crypto/hisilicon/qm.h | 29 +++ d

[PATCH v3 1/7] crypto: hisilicon - add queue management driver for HiSilicon QM module

2019-08-02 Thread Zhou Wang
QM is a general IP used by HiSilicon accelerators. It provides a general PCIe interface for the CPU and the accelerator to share a group of queues. A QM integrated in an accelerator provides queue management service. Queues can be assigned to PF and VFs, and queues can be controlled by unified mai

[PATCH v3 5/7] Documentation: Add debugfs doc for hisi_zip

2019-08-02 Thread Zhou Wang
Add debugfs descriptions for HiSilicon ZIP and QM driver. Signed-off-by: Zhou Wang Reviewed-by: Jonathan Cameron --- Documentation/ABI/testing/debugfs-hisi-zip | 50 ++ 1 file changed, 50 insertions(+) create mode 100644 Documentation/ABI/testing/debugfs-hisi-zip d

[PATCH v3 0/7] crypto: hisilicon: Add HiSilicon QM and ZIP controller driver

2019-08-02 Thread Zhou Wang
This series adds HiSilicon QM and ZIP controller driver in crypto subsystem. A simple QM/ZIP driver which helps to provide an example for a general accelerator framework is under review in community[1]. Based on this simple driver, this series adds HW v2 support, PCI passthrough, PCI/misc error ha

Re: [PATCH v7 14/16] f2fs: wire up new fscrypt ioctls

2019-08-02 Thread Chao Yu
Hi Eric, On 2019/7/27 6:41, Eric Biggers wrote: > From: Eric Biggers > > Wire up the new ioctls for adding and removing fscrypt keys to/from the > filesystem, and the new ioctl for retrieving v2 encryption policies. > > FS_IOC_REMOVE_ENCRYPTION_KEY also required making f2fs_drop_inode() call >