Re: [PATCH v33 01/12] Linux Random Number Generator

2020-08-21 Thread Stephan Müller
Am Freitag, 21. August 2020, 21:42:17 CEST schrieb kernel test robot: Hi, > >hppa-linux-ld: lib/random32.o: in function `prandom_u32': > >> (.text+0x318): undefined reference to `__tracepoint_prandom_u32' > >> hppa-linux-ld: (.text+0x31c): undefined reference to > >> `__tracepoint_prandom_u32

Re: [PATCH v33 01/12] Linux Random Number Generator

2020-08-21 Thread kernel test robot
Hi "Stephan, Thank you for the patch! Yet something to improve: [auto build test ERROR on char-misc/char-misc-testing] [also build test ERROR on cryptodev/master crypto/master v5.9-rc1 next-20200821] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submi

Re: [PATCHv6 2/7] crypto: sa2ul: Add crypto driver

2020-08-21 Thread Nathan Chancellor
On Mon, Jul 13, 2020 at 11:34:22AM +0300, Tero Kristo wrote: > From: Keerthy > > Adds a basic crypto driver and currently supports AES/3DES > in cbc mode for both encryption and decryption. > > Signed-off-by: Keerthy > [t-kri...@ti.com: major re-work to fix various bugs in the driver and to >

Re: [PATCH v33 01/12] Linux Random Number Generator

2020-08-21 Thread kernel test robot
Hi "Stephan, Thank you for the patch! Yet something to improve: [auto build test ERROR on char-misc/char-misc-testing] [also build test ERROR on cryptodev/master crypto/master v5.9-rc1 next-20200821] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submi

it's for your sick

2020-08-21 Thread officewesternunion skyebank
How are you and your family today, I hope everything is alright? I'm sorry for the late reply, I am very happy to inform you of my success in translating these funds into cooperation with a new partner of Portugal. Currently, I am in Qatar for investment projects with a share of the total amount t

[PATCH] crypto: stm32 - Fix sparse warnings

2020-08-21 Thread Herbert Xu
This patch fixes most of the sparse endianness warnings in stm32. The patch itself doesn't change anything apart from markings, but there is some questionable code in stm32_cryp_check_ctr_counter. That function operates on the counters as if they're in CPU order, however, they're then written out

[PATCH v5 18/18] crypto: sun8i-ce: fix some style issue

2020-08-21 Thread Corentin Labbe
This patch fix a double empty line issue reported by checkpatch. While at it, since now the maximum line length is now 100, reorder some wrapped line. Signed-off-by: Corentin Labbe --- .../allwinner/sun8i-ce/sun8i-ce-cipher.c | 34 ++- .../crypto/allwinner/sun8i-ce/sun8i-ce-

[PATCH v5 02/18] crypto: sun8i-ss: Add support for the PRNG

2020-08-21 Thread Corentin Labbe
This patch had support for the PRNG present in the SS. The output was tested with rngtest without any failure. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/Kconfig | 8 + drivers/crypto/allwinner/sun8i-ss/Makefile| 1 + .../crypto/allwinner/sun8i-ss/sun8i-ss-co

[PATCH v5 05/18] crypto: sun8i-ss: Add more comment on some structures

2020-08-21 Thread Corentin Labbe
This patch adds some comment on structures used by sun8i-ss. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h b/drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h index da7

[PATCH v5 06/18] crypto: sun8i-ss: better debug printing

2020-08-21 Thread Corentin Labbe
This patch reworks the way debug info are printed. Instead of printing raw numbers, let's add a bit of context. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/sun8i-ss/sun8i-ss-core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/crypto/allwinner/s

[PATCH v5 13/18] crypto: sun8i-ce: Add stat_bytes debugfs

2020-08-21 Thread Corentin Labbe
This patch adds a new stat_bytes counter in the sun8i-ce debugfs. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h inde

[PATCH v5 11/18] crypto: sun8i-ce: rename has_t_dlen_in_bytes to cipher_t_dlen_in_bytes

2020-08-21 Thread Corentin Labbe
Hash algorithms will need also a spetial t_dlen handling, but since the meaning will be different, rename the current flag to specify it apply only on ciphers algorithms. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c | 2 +- drivers/crypto/allwinner/sun8i-

[PATCH v5 12/18] crypto: sun8i-ce: support hash algorithms

2020-08-21 Thread Corentin Labbe
The CE support multiples hash algorithms, this patch adds support for MD5, SHA1, SHA224, SHA256, SHA384 and SHA512. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/Kconfig | 10 + drivers/crypto/allwinner/sun8i-ce/Makefile| 1 + .../crypto/allwinner/sun8i-ce/sun8i-

[PATCH v5 14/18] crypto: sun8i-ce: Add support for the PRNG

2020-08-21 Thread Corentin Labbe
This patch had support for the PRNG present in the CE. The output was tested with rngtest without any failure. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/Kconfig | 8 + drivers/crypto/allwinner/sun8i-ce/Makefile| 1 + .../crypto/allwinner/sun8i-ce/sun8i-ce-co

[PATCH v5 16/18] crypto: sun8i-ce: fix comparison of integer expressions of different signedness

2020-08-21 Thread Corentin Labbe
This patch fixes the warning: warning: comparison of integer expressions of different signedness: 'int' and 'long unsigned int' [-Wsign-compare] Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff

[PATCH v5 15/18] crypto: sun8i-ce: Add support for the TRNG

2020-08-21 Thread Corentin Labbe
This patch had support for the TRNG present in the CE. Note that according to the algorithm ID, 2 version of the TRNG exists, the first present in H3/H5/R40/A64 and the second present in H6. This patch adds support for both, but only the second is working reliabily according to rngtest. Signed-off

[PATCH v5 08/18] crypto: sun8i-ce: move iv data to request context

2020-08-21 Thread Corentin Labbe
Instead of storing IV data in the channel context, store them in the request context. Storing them in the channel structure was conceptualy wrong since they are per request related. Signed-off-by: Corentin Labbe --- .../allwinner/sun8i-ce/sun8i-ce-cipher.c | 27 +-- drivers/

[PATCH v5 17/18] crypto: sun8i-ss: fix comparison of integer expressions of different signedness

2020-08-21 Thread Corentin Labbe
This patch fixes the warning: warning: comparison of integer expressions of different signedness: 'int' and 'long unsigned int' [-Wsign-compare] Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/sun8i-ss/sun8i-ss-core.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff

[PATCH v5 10/18] crypto: sun8i-ce: handle different error registers

2020-08-21 Thread Corentin Labbe
Error registers are different across SoCs. This patch handle those difference. Signed-off-by: Corentin Labbe --- .../crypto/allwinner/sun8i-ce/sun8i-ce-core.c | 62 --- drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h | 8 +++ 2 files changed, 62 insertions(+), 8 deletions(-) diff

[PATCH v5 07/18] crypto: sun8i-ce: handle endianness of t_common_ctl

2020-08-21 Thread Corentin Labbe
t_common_ctl is LE32 so we need to convert its value before using it. This value is only used on H6 (ignored on other SoCs) and not handling the endianness cause failure on xRNG/hashes operations on H6 when running BE. Fixes: 06f751b61329 ("crypto: allwinner - Add sun8i-ce Crypto Engine") Signed-o

[PATCH v5 09/18] crypto: sun8i-ce: split into prepare/run/unprepare

2020-08-21 Thread Corentin Labbe
This patch split the do_one_request into three. Prepare will handle all DMA mapping and initialisation of the task structure. Unprepare will clean all DMA mapping. And the do_one_request will be limited to just executing the task. Signed-off-by: Corentin Labbe --- .../allwinner/sun8i-ce/sun8i-ce

[PATCH v5 04/18] crypto: sun8i-ss: fix a trivial typo

2020-08-21 Thread Corentin Labbe
This fixes a trivial typo. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h b/drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h index 377ea7acb54d..da71d8059

[PATCH v5 03/18] crypto: sun8i-ss: support hash algorithms

2020-08-21 Thread Corentin Labbe
The SS support multiples hash algorithms, this patch adds support for MD5, SHA1, SHA224 and SHA256. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/Kconfig | 9 + drivers/crypto/allwinner/sun8i-ss/Makefile| 1 + .../crypto/allwinner/sun8i-ss/sun8i-ss-core.c | 155

[PATCH v5 00/18] crypto: allwinner: add xRNG and hashes

2020-08-21 Thread Corentin Labbe
Hello The main goal of this serie is to add support for TRNG, PRNG and hashes to the sun8i-ss/sun8i-ce driver. The whole serie is tested with CRYPTO_EXTRA_TESTS enabled and loading tcrypt. The PRNG and TRNG are tested with rngtest. Both LE and BE kernel are tested. This serie was tested on: - sun

[PATCH v5 01/18] crypto: sun8i-ss: Add SS_START define

2020-08-21 Thread Corentin Labbe
Instead of using an hardcoded value, let's use a defined value for SS_START. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/sun8i-ss/sun8i-ss-core.c | 2 +- drivers/crypto/allwinner/sun8i-ss/sun8i-ss.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers

[cryptodev:master 2/35] drivers/crypto/stm32/stm32-crc32.c:128:2: error: implicit declaration of function 'writel_relaxed'

2020-08-21 Thread kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master head: 3d29e98d1d7550fc959a7ad4258bd804b533b493 commit: 0c3dc787a62aef3ca7aedf3797ec42fff9b0a913 [2/35] crypto: algapi - Remove skbuff.h inclusion config: arm-randconfig-r016-20200820 (attached as .config) c

[PATCH] crypto: stm32 - Add missing header inclusions

2020-08-21 Thread Herbert Xu
On Fri, Aug 21, 2020 at 08:22:37PM +0800, kernel test robot wrote: > tree: > https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git > master > head: 3d29e98d1d7550fc959a7ad4258bd804b533b493 > commit: 0c3dc787a62aef3ca7aedf3797ec42fff9b0a913 [2/35] crypto: algapi - > Remove

Re: [PATCH RESEND 1/9] crypto: caam/jr - add fallback for XTS with more than 8B IV

2020-08-21 Thread Horia Geantă
On 8/21/2020 6:47 AM, Herbert Xu wrote: > On Tue, Aug 11, 2020 at 05:30:41PM +0300, Horia Geantă wrote: >> >>> + if (IS_ERR(fallback)) { >>> + pr_err("Failed to allocate %s fallback: %ld\n", >>> + tfm_name, PTR_ERR(fallback)); >>> +

Re: [build break] aegis128-neon-inner.c fails to build on v5.9-rc1

2020-08-21 Thread Ard Biesheuvel
On Fri, 21 Aug 2020 at 05:55, Herbert Xu wrote: > > On Mon, Aug 17, 2020 at 03:03:11PM +0300, Felipe Balbi wrote: > > > > Hi, > > > > I'm not sure if there's already a patch for this, but I notices arm64 > > allmodconfig fails to build with GCC 10.2 as shown below: > > > > crypto/aegis128-neon-inn

[PATCH] crypto: ccree - fix runtime PM imbalance on error

2020-08-21 Thread dinghao . liu
pm_runtime_get_sync() increments the runtime PM usage counter even when it returns an error code. However, users of cc_pm_get(), a direct wrapper of pm_runtime_get_sync(), assume that PM usage counter will not change on error. Thus a pairing decrement is needed on the error handling path to keep th

Re: [PATCH] crypto: ccree - fix runtime PM imbalance on error

2020-08-21 Thread Herbert Xu
On Sat, Aug 15, 2020 at 11:27:55AM +0800, Dinghao Liu wrote: > pm_runtime_get_sync() increments the runtime PM usage counter > even when it returns an error code. However, users of cc_pm_get(), > a direct wrapper of pm_runtime_get_sync(), assume that PM usage > counter will not change on error. Thu

Re: [PATCH] crypto: virtio - don't use 'default m'

2020-08-21 Thread Herbert Xu
Eric Biggers wrote: > From: Ram Muthiah > > Drivers shouldn't be enabled by default unless there is a very good > reason to do so. There doesn't seem to be any such reason for the > virtio crypto driver, so change it to the default of 'n'. > > Signed-off-by: Ram Muthiah > [EB: adjusted commit

Re: [PATCH v5 00/10] crypto: hisilicon/qm - misc fixes

2020-08-21 Thread Herbert Xu
On Sat, Aug 15, 2020 at 05:56:07PM +0800, Yang Shen wrote: > This patchset fix some qm bugs: > patch 1: store the string address before pass to 'strsep' > patch 2: clear 'qp_status->used' when init the 'qp' > patch 3: use 'dev_info_ratelimited' to avoid printk flooding. > patch 4: fix the judgement

Re: [PATCH] drivers: crypto: picoxcell_crypto: Fix potential race condition bug

2020-08-21 Thread Herbert Xu
On Tue, Aug 11, 2020 at 06:00:24PM +0530, madhuparnabhowmi...@gmail.com wrote: > From: Madhuparna Bhowmik > > engine->stat_irq_thresh was initialized after device_create_file() in > the probe function, the initialization may race with call to > spacc_stat_irq_thresh_store() which updates engine->

Re: [PATCHv3 1/2] hwrng: optee: handle unlimited data rates

2020-08-21 Thread Herbert Xu
On Thu, Aug 06, 2020 at 12:00:09PM +0200, Jorge Ramirez-Ortiz wrote: > Data rates of MAX_UINT32 will schedule an unnecessary one jiffy > timeout on the call to msleep. Avoid this scenario by using 0 as the > unlimited data rate. > > Signed-off-by: Jorge Ramirez-Ortiz > Reviewed-by: Sumit Garg >

Re: [PATCH 0/2] Cyrpto: Clean up kmap() use

2020-08-21 Thread Herbert Xu
On Mon, Aug 10, 2020 at 05:40:13PM -0700, ira.we...@intel.com wrote: > From: Ira Weiny > > While going through kmap() users the following 2 issues were found via code > inspection. > > Ira Weiny (2): > crypto/ux500: Fix kmap() bug > crypto: Remove unused async iterators > > crypto/ahash.c

Re: [v3 PATCH] crypto: caam - Move debugfs fops into standalone file

2020-08-21 Thread Herbert Xu
On Thu, Aug 06, 2020 at 09:09:49PM +0300, Horia Geantă wrote: > > Currently the debugfs fops are defined in caam/intern.h. This causes > problems because it creates identical static functions and variables > in multiple files. It also creates warnings when those files don't > use the fops. > > T

Re: [PATCH] hwrng : cleanup initialization

2020-08-21 Thread Herbert Xu
On Sun, Aug 09, 2020 at 08:04:23AM -0700, t...@redhat.com wrote: > From: Tom Rix > > clang static analysis reports this problem > > intel-rng.c:333:2: warning: Assigned value is garbage or undefined > void __iomem *mem = mem; > ^ ~~~ > > Because mem is assigned

Re: [PATCH -next] crypto: sa2ul: add Kconfig selects to fix build error

2020-08-21 Thread Herbert Xu
On Thu, Aug 06, 2020 at 08:54:48AM -0700, Randy Dunlap wrote: > From: Randy Dunlap > > sa2ul.c uses sha{1,256,512}_zero_message_hash, so select the > Kconfig symbols that provide those, like other crypto drivers do. > > Fixes this build error: > > ld: drivers/crypto/sa2ul.o: in function `sa_sha

Re: [PATCH 0/2] Remove none supported ciphers

2020-08-21 Thread Herbert Xu
On Wed, Aug 05, 2020 at 09:22:59AM +0300, Gilad Ben-Yossef wrote: > the CryptoCell HW has support for ciphers and modes not supported > and used at this time by Linux. Remove the code supporting this > in the ccree ddriver until such time support is added in the kernel. > > Gilad Ben-Yossef (2): >

Re: [PATCH v2] crypto/x86: Use CRC32 mnemonic in crc32c-intel_glue.c

2020-08-21 Thread Herbert Xu
On Wed, Aug 05, 2020 at 01:17:29PM +0200, Uros Bizjak wrote: > Current minimum required version of binutils is 2.23, > which supports CRC32 instruction mnemonic. > > Replace the byte-wise specification of CRC32 with this proper mnemonic. > The compiler is now able to pass memory operand to the ins

Re: [PATCH] crypto: ixp4xx - Fix the size used in a 'dma_free_coherent()' call

2020-08-21 Thread Herbert Xu
On Sun, Aug 02, 2020 at 04:56:48PM +0200, Christophe JAILLET wrote: > Update the size used in 'dma_free_coherent()' in order to match the one > used in the corresponding 'dma_alloc_coherent()', in 'setup_crypt_desc()'. > > Fixes: 81bef0150074 ("crypto: ixp4xx - Hardware crypto support for IXP4xx

Re: [PATCH] crypto: mediatek - Fix wrong return value in mtk_desc_ring_alloc()

2020-08-21 Thread Herbert Xu
On Sun, Aug 02, 2020 at 07:15:32PM +0800, Tianjia Zhang wrote: > In case of memory allocation failure, a negative error code should > be returned. > > Fixes: 785e5c616c849 ("crypto: mediatek - Add crypto driver support for some > MediaTek chips") > Cc: Ryder Lee > Signed-off-by: Tianjia Zhang >

Re: [PATCH] crypto: ingenic - Drop kfree for memory allocated with devm_kzalloc

2020-08-21 Thread Herbert Xu
On Tue, Aug 04, 2020 at 08:11:53AM +, Wei Yongjun wrote: > It's not necessary to free memory allocated with devm_kzalloc > and using kfree leads to a double free. > > Fixes: 190873a0ea45 ("crypto: ingenic - Add hardware RNG for Ingenic JZ4780 > and X1000") > Reported-by: Hulk Robot > Signed-

Re: [PATCH 0/6] crypto: delete or fix duplicated words

2020-08-21 Thread Herbert Xu
On Thu, Jul 30, 2020 at 07:39:18PM -0700, Randy Dunlap wrote: > Drop doubled words or fix them to what they should be. > > > Cc: Herbert Xu > Cc: "David S. Miller" > Cc: linux-crypto@vger.kernel.org > > crypto/algif_aead.c |2 +- > crypto/asymmetric_keys/pkcs7_parser.h |

Re: [PATCH] crypto: hifn_795x - switch from 'pci_' to 'dma_' API

2020-08-21 Thread Herbert Xu
On Mon, Jul 27, 2020 at 11:30:27AM +0200, Christophe JAILLET wrote: > The wrappers in include/linux/pci-dma-compat.h should go away. > > The patch has been generated with the coccinelle script below and has been > hand modified to replace GFP_ with a correct flag. > It has been compile tested. >

Re: [PATCH] crypto: qat - add delay before polling mailbox

2020-08-21 Thread Herbert Xu
On Thu, Jul 30, 2020 at 01:27:42PM +0100, Giovanni Cabiddu wrote: > The mailbox CSR register has a write latency and requires a delay before > being read. This patch replaces readl_poll_timeout with read_poll_timeout > that allows to sleep before read. > The initial sleep was removed when the mailb

[PATCH] crypto: mediatek - Fix endianness bugs and sparse warnings

2020-08-21 Thread Herbert Xu
This patch squashes all the sparse warnings in mediatek, some of which appear to be genuine bugs. In particular, previously on BE the keys and IVs all get 32-bit swabbed which can't be right because they don't get swabbed on LE. I presume LE is the one that actually works. Another funky thing is

Re: [PATCH v4 08/17] crypto: sun8i-ce: move iv data to request context

2020-08-21 Thread Herbert Xu
On Fri, Aug 21, 2020 at 09:35:04AM +0200, LABBE Corentin wrote: > > Since cryptodev now have 453431a54934 ("mm, treewide: rename kzfree() to > kfree_sensitive()"), my serie should apply cleanly. Please resubmit. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP K

Re: [PATCH v4 08/17] crypto: sun8i-ce: move iv data to request context

2020-08-21 Thread LABBE Corentin
On Fri, Jul 31, 2020 at 06:24:27PM +1000, Herbert Xu wrote: > On Tue, Jul 21, 2020 at 07:06:22PM +, Corentin Labbe wrote: > > Instead of storing IV data in the channel context, store them in the > > request context. > > Storing them in the channel structure was conceptualy wrong since they > >