Re: [PATCH v3 07/29] crypto: arm/chacha - remove dependency on generic ChaCha driver

2019-10-10 Thread Eric Biggers
On Mon, Oct 07, 2019 at 06:45:48PM +0200, Ard Biesheuvel wrote: > +static int chacha_stream_xor(struct skcipher_request *req, > + const struct chacha_ctx *ctx, const u8 *iv) > +{ > + struct skcipher_walk walk; > + u32 state[16]; > + int err; > + > + err = sk

Re: [PATCH v3 28/29] crypto: chacha20poly1305 - import construction and selftest from Zinc

2019-10-10 Thread Eric Biggers
On Mon, Oct 07, 2019 at 06:46:09PM +0200, Ard Biesheuvel wrote: > diff --git a/crypto/Kconfig b/crypto/Kconfig > index b9b0e969a1ce..05e80d7d5e40 100644 > --- a/crypto/Kconfig > +++ b/crypto/Kconfig > @@ -302,6 +302,13 @@ config CRYPTO_GCM > Support for Galois/Counter Mode (GCM) and Galois

Re: [PATCH v3 07/29] crypto: arm/chacha - remove dependency on generic ChaCha driver

2019-10-10 Thread Eric Biggers
On Mon, Oct 07, 2019 at 06:45:48PM +0200, Ard Biesheuvel wrote: > diff --git a/arch/arm/crypto/chacha-scalar-core.S > b/arch/arm/crypto/chacha-scalar-core.S > index 2140319b64a0..0970ae107590 100644 > --- a/arch/arm/crypto/chacha-scalar-core.S > +++ b/arch/arm/crypto/chacha-scalar-core.S > @@ -41,

Re: [PATCH v3 11/29] crypto: chacha - unexport chacha_generic routines

2019-10-10 Thread Eric Biggers
On Mon, Oct 07, 2019 at 06:45:52PM +0200, Ard Biesheuvel wrote: > Now that all users of generic ChaCha code have moved to the core library, > there is no longer a need for the generic ChaCha skcpiher driver to > export parts of it implementation for reuse by other drivers. So drop > the exports, an

Re: [PATCH v3 21/29] crypto: BLAKE2s - generic C library implementation and selftest

2019-10-10 Thread Eric Biggers
On Mon, Oct 07, 2019 at 06:46:02PM +0200, Ard Biesheuvel wrote: > From: "Jason A. Donenfeld" > > The C implementation was originally based on Samuel Neves' public > domain reference implementation but has since been heavily modified > for the kernel. We're able to do compile-time optimizations by

Re: [PATCH v3 02/29] crypto: x86/chacha - depend on generic chacha library instead of crypto driver

2019-10-10 Thread Eric Biggers
On Mon, Oct 07, 2019 at 06:45:43PM +0200, Ard Biesheuvel wrote: > In preparation of extending the x86 ChaCha driver to also expose the ChaCha > library interface, drop the dependency on the chacha_generic crypto driver > as a non-SIMD fallback, and depend on the generic ChaCha library directly. > T

[PATCH] crypto: geode-aes - convert to skcipher API and make thread-safe

2019-10-10 Thread Eric Biggers
From: Eric Biggers The geode AES driver is heavily broken because it stores per-request state in the transform context. So it will crash or produce the wrong result if used by any of the many places in the kernel that issue concurrent requests for the same transform object. This driver is also

Re: [PATCH 0/4] crypto: hisilicon: misc sgl fixes

2019-10-10 Thread Zhou Wang
On 2019/10/10 20:54, Herbert Xu wrote: > On Mon, Sep 30, 2019 at 03:08:51PM +0800, Zhou Wang wrote: >> This series fixes some preblems in sgl code. The main change is merging sgl >> code into hisi_qm module. >> >> These problem are also fixed: >> - Let user driver to pass the configure of sge num

Re: [cryptodev:master 65/78] drivers/crypto//hisilicon/sgl.c:168:16: note: in expansion of macro 'cpu_to_le32'

2019-10-10 Thread Zhou Wang
On 2019/10/10 22:25, kbuild test robot wrote: > tree: > https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git > master > head: 504582e8e40b90b8f8c58783e2d1e4f6a2b71a3a > commit: a92a00f809503c6db9dac518951e060ab3d6f6ee [65/78] crypto: hisilicon - > misc fix about sgl > co

Re: [PATCH v3] crypto: add blake2b generic implementation

2019-10-10 Thread Eric Biggers
A couple more comments: On Thu, Oct 10, 2019 at 04:10:05PM +0200, David Sterba wrote: > +static void blake2b_set_lastnode(struct blake2b_state *S) > +{ > + S->f[1] = (u64)-1; > +} > + [...] > +static void blake2b_set_lastblock(struct blake2b_state *S) > +{ > + if (S->last_node) > +

Re: [PATCH v3] crypto: add blake2b generic implementation

2019-10-10 Thread Eric Biggers
Hi David, thanks for working on this. Comments below. On Thu, Oct 10, 2019 at 04:10:05PM +0200, David Sterba wrote: > The patch brings support of several BLAKE2 variants (2b with various > digest lengths). The keyed digest is supported, using tfm->setkey call. > The in-tree user will be btrfs (f

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

2019-10-10 Thread Rob Herring
On Fri, 20 Sep 2019 18:36:35 +0200, Krzysztof Kozlowski wrote: > 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

Re: [PATCH v3] dt-bindings: rng: exynos4-rng: Convert Exynos PRNG bindings to json-schema

2019-10-10 Thread Rob Herring
On Wed, 2 Oct 2019 18:13:40 +0200, Krzysztof Kozlowski wrote: > Convert Samsung Exynos Pseudo Random Number Generator bindings to DT > schema format using json-schema. > > Signed-off-by: Krzysztof Kozlowski > > --- > > Changes since v2: > 1. Add additionalProperties false, > 2. Include clock h

[PATCH v3 05/11] ARM: dts: sun8i: H3: Add Crypto Engine node

2019-10-10 Thread Corentin Labbe
The Crypto Engine is a hardware cryptographic accelerator that supports many algorithms. It could be found on most Allwinner SoCs. This patch enables the Crypto Engine on the Allwinner H3 SoC Device-tree. Signed-off-by: Corentin Labbe --- arch/arm/boot/dts/sun8i-h3.dtsi | 10 ++ 1 file

[PATCH v3 00/11] crypto: add sun8i-ce driver for Allwinner crypto engine

2019-10-10 Thread Corentin Labbe
Hello This patch serie adds support for the Allwinner crypto engine. The Crypto Engine is the third generation of Allwinner cryptogaphic offloader. The first generation is the Security System already handled by the sun4i-ss driver. The second is named also Security System and is present on A80 and

[PATCH v3 09/11] sunxi_defconfig: add new Allwinner crypto options

2019-10-10 Thread Corentin Labbe
This patch adds the new Allwinner crypto configs to sunxi_defconfig Signed-off-by: Corentin Labbe --- arch/arm/configs/sunxi_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/configs/sunxi_defconfig b/arch/arm/configs/sunxi_defconfig index df433abfcb02..d0ab8ba7710a 100644

[PATCH v3 01/11] crypto: Add allwinner subdirectory

2019-10-10 Thread Corentin Labbe
Since a second Allwinner crypto driver will be added, it is better to create a dedicated subdirectory. Signed-off-by: Corentin Labbe --- MAINTAINERS | 6 ++ drivers/crypto/Kconfig | 2 ++ drivers/crypto/Makefile | 1 + drivers/crypto/allwinner/Kconfig

[PATCH v3 08/11] ARM64: dts: allwinner: sun50i: Add Crypto Engine node on H6

2019-10-10 Thread Corentin Labbe
The Crypto Engine is a hardware cryptographic accelerator that supports many algorithms. This patch enables the Crypto Engine on the Allwinner H6 SoC Device-tree. Signed-off-by: Corentin Labbe --- arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 10 ++ 1 file changed, 10 insertions(+) di

[PATCH v3 07/11] ARM64: dts: allwinner: sun50i: Add crypto engine node on H5

2019-10-10 Thread Corentin Labbe
The Crypto Engine is a hardware cryptographic accelerator that supports many algorithms. It could be found on most Allwinner SoCs. This patch enables the Crypto Engine on the Allwinner H5 SoC Device-tree. Signed-off-by: Corentin Labbe --- arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi | 10 ++

[PATCH v3 11/11] crypto: sun4i-ss: Move to Allwinner directory

2019-10-10 Thread Corentin Labbe
Since we have a dedicated Allwinner directory for crypto driver, move the sun4i-ss driver in it. Signed-off-by: Corentin Labbe --- MAINTAINERS | 6 - drivers/crypto/Kconfig| 26 -- drivers/crypto/Makefile

[PATCH v3 02/11] crypto: Add Allwinner sun8i-ce Crypto Engine

2019-10-10 Thread Corentin Labbe
The Crypto Engine is an hardware cryptographic offloader present on all recent Allwinner SoCs H2+, H3, R40, A64, H5, H6 This driver supports AES cipher in CBC/ECB mode. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/Kconfig | 27 + drivers/crypto/allwinner/Makefile

[PATCH v3 06/11] ARM64: dts: allwinner: sun50i: Add Crypto Engine node on A64

2019-10-10 Thread Corentin Labbe
The Crypto Engine is a hardware cryptographic accelerator that supports many algorithms. It could be found on most Allwinner SoCs. This patch enables the Crypto Engine on the Allwinner A64 SoC Device-tree. Signed-off-by: Corentin Labbe --- arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 10

[PATCH v3 10/11] arm64: defconfig: add new Allwinner crypto options

2019-10-10 Thread Corentin Labbe
This patch adds the new allwinner crypto configs to ARM64 defconfig Signed-off-by: Corentin Labbe --- arch/arm64/configs/defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index c9adae41bac0..c45fb6822e4a 100644 --- a/arch/

[PATCH v3 03/11] dt-bindings: crypto: Add DT bindings documentation for sun8i-ce Crypto Engine

2019-10-10 Thread Corentin Labbe
This patch adds documentation for Device-Tree bindings for the Crypto Engine cryptographic accelerator driver. Signed-off-by: Corentin Labbe --- .../bindings/crypto/allwinner,sun8i-ce.yaml | 92 +++ 1 file changed, 92 insertions(+) create mode 100644 Documentation/devicetree/

[PATCH v3 04/11] ARM: dts: sun8i: R40: add crypto engine node

2019-10-10 Thread Corentin Labbe
The Crypto Engine is a hardware cryptographic offloader that supports many algorithms. It could be found on most Allwinner SoCs. This patch enables the Crypto Engine on the Allwinner R40 SoC Device-tree. Signed-off-by: Corentin Labbe --- arch/arm/boot/dts/sun8i-r40.dtsi | 10 ++ 1 file

Re: [GIT PULL] Crypto Fixes for 5.4

2019-10-10 Thread pr-tracker-bot
The pull request you sent on Thu, 10 Oct 2019 23:38:49 +1100: > git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6.git linus has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/fb20da6af705597cefcf05fc99e48d5c066dbdff Thank you! -- Deet-doot-dot, I am a bot

[PATCH] crypto: fix ptr_ret.cocci warnings

2019-10-10 Thread kbuild test robot
From: kbuild test robot drivers/crypto/inside-secure/safexcel_hash.c:2081:1-3: WARNING: PTR_ERR_OR_ZERO can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Generated by: scripts/coccinelle/api/ptr_ret.cocci Fixes: 38f21b4bab11 ("crypto: inside-secure - Added support for th

[cryptodev:master 3/78] drivers/crypto/inside-secure/safexcel_hash.c:2081:1-3: WARNING: PTR_ERR_OR_ZERO can be used

2019-10-10 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master head: 504582e8e40b90b8f8c58783e2d1e4f6a2b71a3a commit: 38f21b4bab11fc877ff18dd02f77f2c34f1105b9 [3/78] crypto: inside-secure - Added support for the AES XCBC ahash If you fix the issue, kindly add followin

Re: [PATCH v3] crypto: add blake2b generic implementation

2019-10-10 Thread Ard Biesheuvel
On Thu, 10 Oct 2019 at 16:09, David Sterba wrote: > > The patch brings support of several BLAKE2 variants (2b with various > digest lengths). The keyed digest is supported, using tfm->setkey call. > The in-tree user will be btrfs (for checksumming), we're going to use > the BLAKE2b-256 variant. >

Hello

2019-10-10 Thread Nicole Malachowski
Hello Dearest, Our company is looking for a representative in USA. You earn commission in every transaction carried out in USA. If you're interested reply urgently before it is given out to other interested applicants.

[cryptodev:master 65/78] drivers/crypto//hisilicon/sgl.c:168:16: note: in expansion of macro 'cpu_to_le32'

2019-10-10 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master head: 504582e8e40b90b8f8c58783e2d1e4f6a2b71a3a commit: a92a00f809503c6db9dac518951e060ab3d6f6ee [65/78] crypto: hisilicon - misc fix about sgl config: riscv-allyesconfig (attached as .config) compiler: risc

[PATCH v3] crypto: add blake2b generic implementation

2019-10-10 Thread David Sterba
The patch brings support of several BLAKE2 variants (2b with various digest lengths). The keyed digest is supported, using tfm->setkey call. The in-tree user will be btrfs (for checksumming), we're going to use the BLAKE2b-256 variant. The code is reference implementation taken from the official

Re: [PATCH v2] crypto: add blake2b generic implementation

2019-10-10 Thread David Sterba
Hi, On Wed, Oct 09, 2019 at 03:47:09PM +0200, Ard Biesheuvel wrote: > I have a couple more comments - apologies for not spotting these the > first time around. No problem, there was a lot of churn since v1. > > +enum { > > + BLAKE2_DUMMY_2 = 1 / (sizeof(struct blake2b_param) == > > BLAKE2

[cryptodev:master 66/78] drivers/crypto/hisilicon/hpre/hpre_main.c:450:16: sparse: sparse: incorrect type in assignment (different base types)

2019-10-10 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master head: 504582e8e40b90b8f8c58783e2d1e4f6a2b71a3a commit: c8b4b477079d1995cc0a1c10d5cdfd02be938cdf [66/78] crypto: hisilicon - add HiSilicon HPRE accelerator reproduce: # apt-get install sparse

Apply For Financial investment at a lower rate 2%

2019-10-10 Thread Coryna Rizky Amelia, SST
-- Hello, We are private lenders based in UK. Do you need a loan (credit) as soon as possible. Are you in search of money to solve your personal needs or finance your business venture, then get Your desired loan today! Consult us at Sunrise Funding Ltd. * We offer personal loan & huge capital lo

Re: [PATCH v2] crypto: geode-aes - switch to skcipher for cbc(aes) fallback

2019-10-10 Thread Herbert Xu
On Sat, Oct 05, 2019 at 11:11:10AM +0200, Ard Biesheuvel wrote: > Commit 79c65d179a40e145 ("crypto: cbc - Convert to skcipher") updated > the generic CBC template wrapper from a blkcipher to a skcipher algo, > to get away from the deprecated blkcipher interface. However, as a side > effect, drivers

Re: [PATCH] crypto: user - fix memory leak in crypto_reportstat

2019-10-10 Thread Herbert Xu
On Fri, Oct 04, 2019 at 02:34:54PM -0500, Navid Emamdoost wrote: > In crypto_reportstat, a new skb is created by nlmsg_new(). This skb is > leaked if crypto_reportstat_alg() fails. Required release for skb is > added. > > Fixes: cac5818c25d0 ("crypto: user - Implement a generic crypto statistics")

Re: [PATCH] crypto: user - fix memory leak in crypto_report

2019-10-10 Thread Herbert Xu
On Fri, Oct 04, 2019 at 02:29:16PM -0500, Navid Emamdoost wrote: > In crypto_report, a new skb is created via nlmsg_new(). This skb should > be released if crypto_report_alg() fails. > > Fixes: a38f7907b926 ("crypto: Add userspace configuration API") > Signed-off-by: Navid Emamdoost > --- > cryp

Re: [PATCH] crypto: atmel-aes - Fix IV handling when req->nbytes < ivsize

2019-10-10 Thread Herbert Xu
On Fri, Oct 04, 2019 at 08:55:37AM +, tudor.amba...@microchip.com wrote: > From: Tudor Ambarus > > commit 394a9e044702 ("crypto: cfb - add missing 'chunksize' property") > adds a test vector where the input length is smaller than the IV length > (the second test vector). This revealed a NULL

Re: [af_alg v2] crypto:af_alg cast ki_complete ternary op to int

2019-10-10 Thread Herbert Xu
On Fri, Oct 04, 2019 at 10:50:58AM -0700, Ayush Sawal wrote: > when libkcapi test is executed using HW accelerator, cipher operation > return -74.Since af_alg_async_cb->ki_complete treat err as unsigned int, > libkcapi receive 429467222 even though it expect -ve value. > > Hence its required to c

Re: [PATCH] crypto: aegis128/simd - build 32-bit ARM for v8 architecture explicitly

2019-10-10 Thread Herbert Xu
On Wed, Oct 02, 2019 at 09:54:48AM +0200, Ard Biesheuvel wrote: > Now that the Clang compiler has taken it upon itself to police the > compiler command line, and reject combinations for arguments it views > as incompatible, the AEGIS128 no longer builds correctly, and errors > out like this: > >

Re: [PATCH 3/3] crypto: inside-secure - Remove #ifdef checks

2019-10-10 Thread Herbert Xu
On Mon, Sep 30, 2019 at 02:14:35PM +0200, Arnd Bergmann wrote: > When both PCI and OF are disabled, no drivers are registered, and > we get some unused-function warnings: > > drivers/crypto/inside-secure/safexcel.c:1221:13: error: unused function > 'safexcel_unregister_algorithms' [-Werror,-Wunus

Re: [PATCH 1/3] crypto: inside-secure - Fix a maybe-uninitialized warning

2019-10-10 Thread Herbert Xu
On Mon, Sep 30, 2019 at 02:14:33PM +0200, Arnd Bergmann wrote: > A previous fixup avoided an unused variable warning but replaced > it with a slightly scarier warning: > > drivers/crypto/inside-secure/safexcel.c:1100:6: error: variable 'irq' is used > uninitialized whenever 'if' condition is fals

Re: [PATCH 0/4] crypto: hisilicon: misc sgl fixes

2019-10-10 Thread Herbert Xu
On Mon, Sep 30, 2019 at 03:08:51PM +0800, Zhou Wang wrote: > This series fixes some preblems in sgl code. The main change is merging sgl > code into hisi_qm module. > > These problem are also fixed: > - Let user driver to pass the configure of sge number in one sgl when >creating hardware sg

Re: [PATCH 0/5] crypto: hisilicon - add HPRE support

2019-10-10 Thread Herbert Xu
On Mon, Sep 30, 2019 at 05:20:04PM +0800, Zaibo Xu wrote: > This series adds HiSilicon high performance RSA engine(HPRE) driver > in crypto subsystem. HPRE driver provides PCIe hardware device initiation > with RSA and DH algorithms registered to Crypto. Meanwhile, some debug > supporting of DebugF

Re: [PATCH] hw_random: move add_early_randomness() out of rng_mutex

2019-10-10 Thread Herbert Xu
On Thu, Sep 12, 2019 at 03:30:22PM +0200, Laurent Vivier wrote: > add_early_randomness() is called every time a new rng backend is added > and every time it is set as the current rng provider. > > add_early_randomness() is called from functions locking rng_mutex, > and if it hangs all the hw_rando

Re: [PATCH 2/3] crypto: inside-secure - Reduce stack usage

2019-10-10 Thread Herbert Xu
On Mon, Sep 30, 2019 at 02:14:34PM +0200, Arnd Bergmann wrote: > safexcel_aead_setkey() contains three large stack variables, totalling > slightly more than the 1024 byte warning limit: > > drivers/crypto/inside-secure/safexcel_cipher.c:303:12: error: stack frame > size of 1032 bytes in function

[GIT PULL] Crypto Fixes for 5.4

2019-10-10 Thread Herbert Xu
Hi Linus: This push fixes build issues in arm/aes-ce. The following changes since commit bf6a7a5ad6fa69e48b735be75eeb90569d9584bb: crypto: hisilicon - avoid unused function warning (2019-09-20 23:05:33 +1000) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel

[PATCH] crypto: zlib-deflate - add zlib-deflate test case in tcrypt

2019-10-10 Thread Zhou Wang
As a type CRYPTO_ALG_TYPE_ACOMPRESS is needed to trigger crypto acomp test, we introduce a new help function tcrypto_test_extend to pass type and mask to alg_test. Then tcrypto module can be used to do basic acomp test by: insmod tcrypto.ko alg="zlib-deflate" mode=55 type=10 Signed-off-by: Zhou W

Re: [PATCH 0/4] crypto: hisilicon: misc sgl fixes

2019-10-10 Thread Zhou Wang
On 2019/9/30 15:08, Zhou Wang wrote: > This series fixes some preblems in sgl code. The main change is merging sgl > code into hisi_qm module. > > These problem are also fixed: > - Let user driver to pass the configure of sge number in one sgl when >creating hardware sgl resources. > - When